mirror of
https://github.com/RGBCube/crash
synced 2025-07-27 08:27:44 +00:00
Add meta and handle fallbackShell better
This commit is contained in:
parent
2cfed82a3e
commit
d17a8c9d05
1 changed files with 17 additions and 4 deletions
21
package.nix
21
package.nix
|
@ -8,9 +8,12 @@
|
||||||
|
|
||||||
bashInteractive,
|
bashInteractive,
|
||||||
fallbackShell ? bashInteractive,
|
fallbackShell ? bashInteractive,
|
||||||
}:
|
}: let
|
||||||
|
fallbackShell' = if lib.isDerivation fallbackShell then
|
||||||
stdenvNoCC.mkDerivation {
|
"${fallbackShell}${fallbackShell.shellPath}"
|
||||||
|
else
|
||||||
|
fallbackShell;
|
||||||
|
in stdenvNoCC.mkDerivation {
|
||||||
name = "crash";
|
name = "crash";
|
||||||
version = lib.head (lib.strings.match ''.*\.version = "([^"]*)".*'' (lib.readFile ./build.zig.zon));
|
version = lib.head (lib.strings.match ''.*\.version = "([^"]*)".*'' (lib.readFile ./build.zig.zon));
|
||||||
|
|
||||||
|
@ -34,8 +37,18 @@ stdenvNoCC.mkDerivation {
|
||||||
--global-cache-dir $(pwd)/.cache \
|
--global-cache-dir $(pwd)/.cache \
|
||||||
--prefix $out \
|
--prefix $out \
|
||||||
-Doptimize=${optimize} \
|
-Doptimize=${optimize} \
|
||||||
-Dfallback_shell=${lib.getExe fallbackShell}
|
-Dfallback_shell=${fallbackShell'}
|
||||||
|
|
||||||
runHook postBuild
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
passthru.shellPath = "/bin/crash";
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A user configurable login shell wrapper";
|
||||||
|
homepage = "https://github.com/RGBCube/crash";
|
||||||
|
license = licenses.mit;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
maintainers = with maintainers; [ RGBCube ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue