mac and linux sums

This commit is contained in:
Cadey Ratio 2020-02-29 03:21:47 +00:00
parent 001b3b83a5
commit 6cb39704e7
1 changed files with 9 additions and 6 deletions

View File

@ -1,14 +1,17 @@
{ sources ? import ./sources.nix, pkgs ? import sources.nixpkgs { } }: { sources ? import ./sources.nix, pkgs ? import sources.nixpkgs { } }:
version: sha256: version: shasums:
let let
url = if pkgs.stdenv.isDarwin then attrs = if pkgs.stdenv.isDarwin then {
"https://ziglang.org/builds/zig-macos-x86_64-${version}.tar.xz" url = "https://ziglang.org/builds/zig-macos-x86_64-${version}.tar.xz";
else sha256 = shasums.mac;
"https://ziglang.org/builds/zig-linux-x86_64-${version}.tar.xz"; } else {
url = "https://ziglang.org/builds/zig-linux-x86_64-${version}.tar.xz";
sha256 = shasums.linux;
};
src = pkgs.fetchurl { inherit sha256 url; }; src = pkgs.fetchurl attrs;
in pkgs.stdenv.mkDerivation { in pkgs.stdenv.mkDerivation {
name = "zig"; name = "zig";