summary refs log tree commit diff
path: root/pkgs/build-support/writers/default.nix
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2021-06-26 00:09:11 +0000
committerGitHub <noreply@github.com>2021-06-26 00:09:11 +0000
commit947012b992faa88e9d5b0d168c8f81c8e7cf995e (patch)
tree3b5f923312bb65436d1ffe6134af9ba8c9e9f0f2 /pkgs/build-support/writers/default.nix
parent4966eff42cf9976319ac34fa28f3af224723a771 (diff)
parentf15360e6a41e77aa479dd47896e709fd77214e4f (diff)
downloadnixpkgs-947012b992faa88e9d5b0d168c8f81c8e7cf995e.tar
nixpkgs-947012b992faa88e9d5b0d168c8f81c8e7cf995e.tar.gz
nixpkgs-947012b992faa88e9d5b0d168c8f81c8e7cf995e.tar.bz2
nixpkgs-947012b992faa88e9d5b0d168c8f81c8e7cf995e.tar.lz
nixpkgs-947012b992faa88e9d5b0d168c8f81c8e7cf995e.tar.xz
nixpkgs-947012b992faa88e9d5b0d168c8f81c8e7cf995e.tar.zst
nixpkgs-947012b992faa88e9d5b0d168c8f81c8e7cf995e.zip
Merge staging-next into staging
Diffstat (limited to 'pkgs/build-support/writers/default.nix')
-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