Hello,
I did not find the answer here, sorry if I missed it.
(This is done using Home-Manager)
I don’t understand why this works:
(pkgs.writeShellScriptBin "myscript" ''
#!/usr/bin/env bash
echo "hello"
'')
but the same content in a file loaded by:
(pkgs.writeShellScriptBin "myscript1" ./bash/myscript.sh)
produces a
/nix/store/c7d6kwci1l2c7rkfgmshir25zzdvgrjb-myscript.sh: Permission denied
I suspect it happens because the file is created as
74099114 -r--r--r-- 1 0 0 36 1 janv. 1970 /nix/store/77zqc8sml6sysrrfs4cblpjcmmamff98-myscript.sh
So, how to make it executable automatically?
Thanks!