diff options
author | Klaus T. Aehlig <aehlig@linta.de> | 2024-06-27 16:30:53 +0200 |
---|---|---|
committer | Klaus T. Aehlig <aehlig@linta.de> | 2024-06-27 16:30:53 +0200 |
commit | 866e07a8baa21707ec73109b6e502af4fe4c41bf (patch) | |
tree | 67386b8a9812b2b49a8aa8fa976505dedfa814e1 /nix-dependencies/dependencies.nix | |
parent | 05b2d6fc51146fe07340a58bc87fbbd99e788143 (diff) | |
download | hello-nix-866e07a8baa21707ec73109b6e502af4fe4c41bf.tar.gz |
nix-shell: also add a wrapper script besides the alias
... as aliases are not honored in `nix-shell --run`. In this way,
we can add an outer script running all the tests in the correct
environment.
Diffstat (limited to 'nix-dependencies/dependencies.nix')
-rw-r--r-- | nix-dependencies/dependencies.nix | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/nix-dependencies/dependencies.nix b/nix-dependencies/dependencies.nix index 10a1b3e..2e73468 100644 --- a/nix-dependencies/dependencies.nix +++ b/nix-dependencies/dependencies.nix @@ -1,5 +1,6 @@ { stdenv , jo +, bash , pkg-config , coreutils , protobuf_25 @@ -25,6 +26,7 @@ stdenv.mkDerivation rec { protobuf_25 grpc jo + bash ]; buildInputs = [ @@ -52,12 +54,19 @@ stdenv.mkDerivation rec { ) > config.json cat config.json jo "just files"=$(jo config=$(jo -a $(jo root=system path=$out/share/config.json))) > rc.json + + cat > withRc-just-mr <<EOF + #!${bash}/bin/bash + exec just-mr --rc $out/share/rc.json "\$@" + EOF ''; installPhase = '' - mkdir -p $out/share + mkdir -p $out/share $out/bin cp config.json $out/share cp rc.json $out/share + cp withRc-just-mr $out/bin + chmod 555 $out/bin/withRc-just-mr ''; } |