summary refs log tree commit diff
diff options
context:
space:
mode:
authorLassulus <github@lassul.us>2021-06-25 18:18:36 +0300
committerGitHub <noreply@github.com>2021-06-25 18:18:36 +0300
commit61e983dbac933aa26cf913aef47aa92a5c40143c (patch)
treeb8ab4cb25f91bdb44da8c8af8360be2deebf9c1b
parent759f70945a909a73250ffe3978f6ca982fdd07d2 (diff)
parent33ffb05d390987802fe939f9c9a3d6a451076535 (diff)
downloadnixpkgs-61e983dbac933aa26cf913aef47aa92a5c40143c.tar
nixpkgs-61e983dbac933aa26cf913aef47aa92a5c40143c.tar.gz
nixpkgs-61e983dbac933aa26cf913aef47aa92a5c40143c.tar.bz2
nixpkgs-61e983dbac933aa26cf913aef47aa92a5c40143c.tar.lz
nixpkgs-61e983dbac933aa26cf913aef47aa92a5c40143c.tar.xz
nixpkgs-61e983dbac933aa26cf913aef47aa92a5c40143c.tar.zst
nixpkgs-61e983dbac933aa26cf913aef47aa92a5c40143c.zip
Merge pull request #128097 from Infinisil/writers-paths
writers: Allow string paths
-rw-r--r--pkgs/build-support/writers/default.nix8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkgs/build-support/writers/default.nix b/pkgs/build-support/writers/default.nix
index 47919c251af..5a70bcbe3cf 100644
--- a/pkgs/build-support/writers/default.nix
+++ b/pkgs/build-support/writers/default.nix
@@ -15,12 +15,12 @@ rec {
       name = last (builtins.split "/" nameOrPath);
     in
 
-    pkgs.runCommandLocal name (if (types.str.check content) then {
-      inherit content interpreter;
-      passAsFile = [ "content" ];
-    } else {
+    pkgs.runCommandLocal name (if types.path.check content then {
       inherit interpreter;
       contentPath = content;
+    } else {
+      inherit content interpreter;
+      passAsFile = [ "content" ];
     }) ''
       # 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