1
Fork 0
mirror of https://github.com/RGBCube/crash synced 2025-07-27 00:17:44 +00:00

fix build

This commit is contained in:
RGBCube 2025-02-22 17:49:14 +03:00
parent ec77c04485
commit 3405a772ba
Signed by: RGBCube
SSH key fingerprint: SHA256:CzqbPcfwt+GxFYNnFVCqoN5Itn4YFrshg1TrnACpA5M
4 changed files with 45 additions and 25 deletions

View file

@ -114,32 +114,32 @@ Host myvps
Then just SSH in like normal. This will launch you into fish, if that fails, into nu and so on...
## Common Mistakes
<!-- ## Common Mistakes -->
### Using `~` in the `SHELLS` variable
<!-- ### Using `~` in the `SHELLS` variable -->
So, the way `SHELLS` is handled is like so:
1. Split the variable into a list of shells using `:`.
2. Searches PATH for the shell, invokes it if it can find it there.
3. If it can't find the shell there, assumes the shell is a file.
If it is an absolute path, it directly invokes the executable, if
it isn'it, joins the path with the current working directory before executing.
<!-- So, the way `SHELLS` is handled is like so: -->
<!-- 1. Split the variable into a list of shells using `:`. -->
<!-- 2. Searches PATH for the shell, invokes it if it can find it there. -->
<!-- 3. If it can't find the shell there, assumes the shell is a file. -->
<!-- If it is an absolute path, it directly invokes the executable, if -->
<!-- it isn'it, joins the path with the current working directory before executing. -->
Did you notice something? Yup, it doesn't expand the tilde (`~`)!
But no worries, you don't need it anyway as the PWD of your login shell
(in this case, Crash) is always your home directory. So if you wanted to do
<!-- Did you notice something? Yup, it doesn't expand the tilde (`~`)! -->
<!-- But no worries, you don't need it anyway as the PWD of your login shell -->
<!-- (in this case, Crash) is always your home directory. So if you wanted to do -->
```shell
SHELLS=~/.config/shell # Won't work!
```
<!-- ```shell -->
<!-- SHELLS=~/.config/shell # Won't work! -->
<!-- ``` -->
You can do:
<!-- You can do: -->
```shell
SHELLS=.config/shell # WILL work!
```
<!-- ```shell -->
<!-- SHELLS=.config/shell # WILL work! -->
<!-- ``` -->
Instead and it will work perfectly fine.
<!-- Instead and it will work perfectly fine. -->
## Credits

18
flake.lock generated
View file

@ -18,7 +18,23 @@
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"systems": "systems"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},

View file

@ -6,12 +6,15 @@
extra-trusted-public-keys = "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=";
};
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
systems.url = "github:nix-systems/default";
};
outputs = { self, nixpkgs }: let
outputs = { self, nixpkgs, systems }: let
inherit (nixpkgs) lib;
forEachSystem = lib.genAttrs [ "x86_64-linux" "aarch64-linux" "riscv64-linux" ];
forEachSystem = lib.genAttrs (import systems);
in {
devShell = forEachSystem (system: with nixpkgs.legacyPackages.${system}; mkShell {
packages = [

View file

@ -2,7 +2,7 @@
lib,
stdenvNoCC,
zig_0_12,
zig,
bashInteractive,
fallbackShell ? bashInteractive,
@ -20,7 +20,7 @@ in stdenvNoCC.mkDerivation {
dontCheck = true;
nativeBuildInputs = [
zig_0_12.hook
zig.hook
];
zigBuildFlags = [
@ -33,6 +33,7 @@ in stdenvNoCC.mkDerivation {
description = "A user configurable login shell wrapper";
homepage = "https://github.com/RGBCube/crash";
license = licenses.mit;
mainProgram = "crash";
platforms = platforms.linux;
maintainers = with maintainers; [ RGBCube ];
};