This commit is contained in:
Cadey Ratio 2020-02-29 03:11:56 +00:00
parent ec14f5608f
commit ba57e9ce3d
2 changed files with 24 additions and 0 deletions

View File

@ -13,6 +13,9 @@ let
dockerImage = callPackage ./pkgs/dockerImage.nix { }; dockerImage = callPackage ./pkgs/dockerImage.nix { };
srcNoTarget = import ./pkgs/srcNoTarget.nix; srcNoTarget = import ./pkgs/srcNoTarget.nix;
# zig
zig = callPackage ./pkgs/zig.nix { };
# other # other
MoonPlus = callPackage ./pkgs/moonplus { }; MoonPlus = callPackage ./pkgs/moonplus { };
minica = callPackage ./pkgs/minica { }; minica = callPackage ./pkgs/minica { };

21
pkgs/zig.nix Normal file
View File

@ -0,0 +1,21 @@
{ sources ? import ./sources.nix, pkgs ? import sources.nixpkgs { } }:
version:
let
src = 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";
in pkgs.stdenv.mkDerivation {
name = "zig";
inherit src version;
installPhase = ''
mkdir -p $out
cp -rf * $out
mkdir -p $out/bin
mv $out/zig $out/bin/zig
'';
}