1
Fork 0
mirror of https://github.com/RGBCube/crash synced 2025-07-28 08:57:45 +00:00

Fix index out of bounds and clean package.nix

This commit is contained in:
RGBCube 2024-05-15 16:46:53 +03:00
parent 00c77812f1
commit 886ca98838
No known key found for this signature in database
3 changed files with 8 additions and 29 deletions

View file

@ -1,10 +1,8 @@
{
lib,
stdenvNoCC,
callPackage,
zig_0_12,
optimize ? "ReleaseFast",
bashInteractive,
fallbackShell ? bashInteractive,
@ -19,28 +17,15 @@ in stdenvNoCC.mkDerivation {
src = ./.;
nativeBuildInputs = [ zig_0_12 ];
dontCheck = true;
dontConfigure = true;
dontInstall = true;
nativeBuildInputs = [
zig_0_12.hook
];
preBuild = ''
mkdir -p .cache
ln -s ${callPackage ./build.zig.zon.nix {}} .cache/p
'';
buildPhase = ''
runHook preBuild
zig build install \
--cache-dir $(pwd)/zig-cache \
--global-cache-dir $(pwd)/.cache \
--prefix $out \
-Doptimize=${optimize} \
-Dfallback_shell=${fallbackShell'}
runHook postBuild
'';
zigBuildFlags = [
"-Dfallback_shell=${fallbackShell'}"
];
passthru.shellPath = "/bin/crash";