update
This commit is contained in:
parent
93a7ad9211
commit
de8eaf2519
1 changed files with 31 additions and 24 deletions
55
flake.nix
55
flake.nix
|
@ -83,17 +83,19 @@
|
||||||
pkgs.stdenvNoCC.mkDerivation {
|
pkgs.stdenvNoCC.mkDerivation {
|
||||||
inherit src;
|
inherit src;
|
||||||
name = "hostapps-zig-cache";
|
name = "hostapps-zig-cache";
|
||||||
buildInputs = [
|
nativeBuildInputs = [pkgs.git pkgs.zig_0_12.hook];
|
||||||
pkgs.zig_0_12
|
# buildInputs = [
|
||||||
];
|
# pkgs.zig_0_12
|
||||||
dontUseZigInstall = true;
|
# ];
|
||||||
dontUseZigBuild = true;
|
|
||||||
dontConfigure = true;
|
dontConfigure = true;
|
||||||
|
dontUseZigBuild = true;
|
||||||
|
dontUseZigInstall = true;
|
||||||
dontFixup = true;
|
dontFixup = true;
|
||||||
|
|
||||||
preBuild = ''
|
# preBuild = ''
|
||||||
export ZIG_GLOBAL_CACHE_DIR=$(mktemp -d)
|
# export ZIG_GLOBAL_CACHE_DIR=$(mktemp -d)
|
||||||
'';
|
# '';
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
|
@ -103,7 +105,7 @@
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
cp -r --reflink=auto $ZIG_GLOBAL_CACHE_DIR/p $out
|
cp -r --reflink=auto $ZIG_GLOBAL_CACHE_DIR $out
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
outputHash = "sha256-1RX8LJCu8jfGOfHj0uQrVk4ltjVm/q7YyH4EfDmsG1c=";
|
outputHash = "sha256-1RX8LJCu8jfGOfHj0uQrVk4ltjVm/q7YyH4EfDmsG1c=";
|
||||||
|
@ -117,28 +119,33 @@
|
||||||
|
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
|
||||||
buildInputs = [
|
nativeBuildInputs = [
|
||||||
pkgs.zig_0_12
|
pkgs.git
|
||||||
|
pkgs.zig_0_12.hook
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# buildInputs = [
|
||||||
|
# pkgs.zig_0_12
|
||||||
|
# ];
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
export ZIG_GLOBAL_CACHE_DIR=$(mktemp -d)
|
rm -rf $ZIG_GLOBAL_CACHE_DIR
|
||||||
cp -r --reflink=auto ${cache attrs.src} $ZIG_GLOBAL_CACHE_DIR/p
|
cp -r --reflink=auto ${cache attrs.src} $ZIG_GLOBAL_CACHE_DIR
|
||||||
chmod -R u+rwX $ZIG_GLOBAL_CACHE_DIR
|
chmod -R u+rwX $ZIG_GLOBAL_CACHE_DIR
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildPhase = ''
|
# buildPhase = ''
|
||||||
runHook preBuild
|
# runHook preBuild
|
||||||
zig build -Doptimize=ReleaseSafe
|
# zig build -Doptimize=ReleaseSafe
|
||||||
runHook postBuild
|
# runHook postBuild
|
||||||
'';
|
# '';
|
||||||
|
|
||||||
installPhase = ''
|
# installPhase = ''
|
||||||
runHook preInstall
|
# runHook preInstall
|
||||||
mkdir -p $out/bin
|
# mkdir -p $out/bin
|
||||||
cp zig-out/bin/hostapps $out/bin
|
# cp zig-out/bin/hostapps $out/bin
|
||||||
runHook postInstall
|
# runHook postInstall
|
||||||
'';
|
# '';
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue