Guest User

Untitled

a guest
May 17th, 2020
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. test = with pkgs; let
  2. inherit (pkgs) writeShellScriptBin;
  3. inherit (pkgs.stdenv) mkDerivation;
  4.  
  5. some-shell = writeShellScriptBin "some-shell.sh" ''
  6. echo some stuff
  7. exit
  8. '';
  9. in {
  10. description = "Test User";
  11. shell = mkDerivation {
  12. name = "some-shell.sh";
  13. buildInputs = [ some-shell ];
  14. builder = ((writeShellScriptBin "shell-builder.sh" ''
  15. PATH=${lib.makeBinPath [ coreutils ]}
  16. mkdir $out
  17. cp $src $out
  18. '') + "/bin/shell-builder.sh");
  19. src = "${some-shell}/bin/some-shell.sh";
  20. passthru = {
  21. shellPath = "/bin/some-shell.sh";
  22. };
  23. };
  24. };
Add Comment
Please, Sign In to add comment