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 { } }:
version: sha256:
version: shasums:
let
url = if pkgs.stdenv.isDarwin then
"https://ziglang.org/builds/zig-macos-x86_64-${version}.tar.xz"
else
"https://ziglang.org/builds/zig-linux-x86_64-${version}.tar.xz";
attrs = if pkgs.stdenv.isDarwin then {
url = "https://ziglang.org/builds/zig-macos-x86_64-${version}.tar.xz";
sha256 = shasums.mac;
} 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 {
name = "zig";