mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-22 03:53:47 +00:00
Merge pull request #128097 from Infinisil/writers-paths
writers: Allow string paths
This commit is contained in:
commit
61e983dbac
@ -15,12 +15,12 @@ rec {
|
|||||||
name = last (builtins.split "/" nameOrPath);
|
name = last (builtins.split "/" nameOrPath);
|
||||||
in
|
in
|
||||||
|
|
||||||
pkgs.runCommandLocal name (if (types.str.check content) then {
|
pkgs.runCommandLocal name (if types.path.check content then {
|
||||||
inherit content interpreter;
|
|
||||||
passAsFile = [ "content" ];
|
|
||||||
} else {
|
|
||||||
inherit interpreter;
|
inherit interpreter;
|
||||||
contentPath = content;
|
contentPath = content;
|
||||||
|
} else {
|
||||||
|
inherit content interpreter;
|
||||||
|
passAsFile = [ "content" ];
|
||||||
}) ''
|
}) ''
|
||||||
# On darwin a script cannot be used as an interpreter in a shebang but
|
# On darwin a script cannot be used as an interpreter in a shebang but
|
||||||
# there doesn't seem to be a limit to the size of shebang and multiple
|
# there doesn't seem to be a limit to the size of shebang and multiple
|
||||||
|
Loading…
Reference in New Issue
Block a user