zig
This commit is contained in:
parent
ec14f5608f
commit
ba57e9ce3d
|
@ -13,6 +13,9 @@ let
|
|||
dockerImage = callPackage ./pkgs/dockerImage.nix { };
|
||||
srcNoTarget = import ./pkgs/srcNoTarget.nix;
|
||||
|
||||
# zig
|
||||
zig = callPackage ./pkgs/zig.nix { };
|
||||
|
||||
# other
|
||||
MoonPlus = callPackage ./pkgs/moonplus { };
|
||||
minica = callPackage ./pkgs/minica { };
|
||||
|
|
|
@ -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
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue