diff options
author | Vladimír Čunát <v@cunat.cz> | 2019-09-02 23:25:24 +0200 |
---|---|---|
committer | Vladimír Čunát <v@cunat.cz> | 2019-09-02 23:25:24 +0200 |
commit | f21211ebfe21797c6f0444d42ec7cb835c737388 (patch) | |
tree | 816465981f650242d4b22e0f01b912917e7008f8 /pkgs/build-support | |
parent | b291f2a9953d48d6edc5c73776db9ba289ccf213 (diff) | |
parent | 12ae04518b004adf949a43125954b99c05189e6f (diff) |
Merge branch 'master' into staging
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/writers/default.nix | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkgs/build-support/writers/default.nix b/pkgs/build-support/writers/default.nix index ae7b42449fb..8dbe0dbdbd0 100644 --- a/pkgs/build-support/writers/default.nix +++ b/pkgs/build-support/writers/default.nix @@ -10,12 +10,12 @@ rec { # 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.string.check content); + assert lib.or (types.path.check content) (types.str.check content); let name = last (builtins.split "/" nameOrPath); in - pkgs.runCommand name (if (types.string.check content) then { + pkgs.runCommand name (if (types.str.check content) then { inherit content interpreter; passAsFile = [ "content" ]; } else { @@ -42,11 +42,11 @@ rec { # writeSimpleC = makeBinWriter { compileScript = name: "gcc -o $out $contentPath"; } makeBinWriter = { compileScript }: 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.string.check content); + assert lib.or (types.path.check content) (types.str.check content); let name = last (builtins.split "/" nameOrPath); in - pkgs.runCommand name (if (types.string.check content) then { + pkgs.runCommand name (if (types.str.check content) then { inherit content; passAsFile = [ "content" ]; } else { |