mirror of
https://github.com/RGBCube/crash
synced 2025-07-27 08:27:44 +00:00
Fix index out of bounds and clean package.nix
This commit is contained in:
parent
00c77812f1
commit
886ca98838
3 changed files with 8 additions and 29 deletions
|
@ -1,6 +0,0 @@
|
|||
# generated by zon2nix (https://github.com/nix-community/zon2nix)
|
||||
|
||||
{ linkFarm, fetchzip }:
|
||||
|
||||
linkFarm "zig-packages" [
|
||||
]
|
29
package.nix
29
package.nix
|
@ -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";
|
||||
|
||||
|
|
|
@ -16,8 +16,8 @@ pub fn main() noreturn {
|
|||
|
||||
var argi = std.process.args();
|
||||
while (argi.next()) |arg| {
|
||||
args[args.len] = arg;
|
||||
args.len += 1;
|
||||
args[args.len - 1] = arg;
|
||||
}
|
||||
|
||||
const shells = std.posix.getenv("SHELLS") orelse fallback(alloc);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue