Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- test = with pkgs; let
- inherit (pkgs) writeShellScriptBin;
- inherit (pkgs.stdenv) mkDerivation;
- some-shell = writeShellScriptBin "some-shell.sh" ''
- echo some stuff
- exit
- '';
- in {
- description = "Test User";
- shell = mkDerivation {
- name = "some-shell.sh";
- buildInputs = [ some-shell ];
- builder = ((writeShellScriptBin "shell-builder.sh" ''
- PATH=${lib.makeBinPath [ coreutils ]}
- mkdir $out
- cp $src $out
- '') + "/bin/shell-builder.sh");
- src = "${some-shell}/bin/some-shell.sh";
- passthru = {
- shellPath = "/bin/some-shell.sh";
- };
- };
- };
Add Comment
Please, Sign In to add comment