about summary refs log tree commit diff
path: root/nixpkgs/pkgs/build-support/writers
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/build-support/writers')
-rw-r--r--nixpkgs/pkgs/build-support/writers/data.nix2
-rw-r--r--nixpkgs/pkgs/build-support/writers/scripts.nix8
2 files changed, 5 insertions, 5 deletions
diff --git a/nixpkgs/pkgs/build-support/writers/data.nix b/nixpkgs/pkgs/build-support/writers/data.nix
index 02f08b9ca0b6..315150378e69 100644
--- a/nixpkgs/pkgs/build-support/writers/data.nix
+++ b/nixpkgs/pkgs/build-support/writers/data.nix
@@ -30,7 +30,7 @@ in
     ```
   */
   makeDataWriter = lib.warn "pkgs.writers.makeDataWriter is deprecated. Use pkgs.writeTextFile." ({ input ? lib.id, output ? "cp $inputPath $out" }: nameOrPath: data:
-    assert lib.or (types.path.check nameOrPath) (builtins.match "([0-9A-Za-z._])[0-9A-Za-z._-]*" nameOrPath != null);
+    assert (types.path.check nameOrPath) || (builtins.match "([0-9A-Za-z._])[0-9A-Za-z._-]*" nameOrPath != null);
     let
       name = last (builtins.split "/" nameOrPath);
     in
diff --git a/nixpkgs/pkgs/build-support/writers/scripts.nix b/nixpkgs/pkgs/build-support/writers/scripts.nix
index 8a23e5dd4a66..1dd25c500719 100644
--- a/nixpkgs/pkgs/build-support/writers/scripts.nix
+++ b/nixpkgs/pkgs/build-support/writers/scripts.nix
@@ -19,8 +19,8 @@ rec {
   #   writeBash = makeScriptWriter { interpreter = "${pkgs.bash}/bin/bash"; }
   #   makeScriptWriter { interpreter = "${pkgs.dash}/bin/dash"; } "hello" "echo hello world"
   makeScriptWriter = { interpreter, check ? "" }: nameOrPath: content:
-    assert lib.or (types.path.check nameOrPath) (builtins.match "([0-9A-Za-z._])[0-9A-Za-z._-]*" nameOrPath != null);
-    assert lib.or (types.path.check content) (types.str.check content);
+    assert (types.path.check nameOrPath) || (builtins.match "([0-9A-Za-z._])[0-9A-Za-z._-]*" nameOrPath != null);
+    assert (types.path.check content) || (types.str.check content);
     let
       name = last (builtins.split "/" nameOrPath);
     in
@@ -82,8 +82,8 @@ rec {
   # Examples:
   #   writeSimpleC = makeBinWriter { compileScript = name: "gcc -o $out $contentPath"; }
   makeBinWriter = { compileScript, strip ? true }: nameOrPath: content:
-    assert lib.or (types.path.check nameOrPath) (builtins.match "([0-9A-Za-z._])[0-9A-Za-z._-]*" nameOrPath != null);
-    assert lib.or (types.path.check content) (types.str.check content);
+    assert (types.path.check nameOrPath) || (builtins.match "([0-9A-Za-z._])[0-9A-Za-z._-]*" nameOrPath != null);
+    assert (types.path.check content) || (types.str.check content);
     let
       name = last (builtins.split "/" nameOrPath);
     in