diff options
author | tv <tv@krebsco.de> | 2016-11-25 00:15:13 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2016-11-25 00:16:44 +0100 |
commit | d59facd88c7d33d0ac125eb93392d2a67b46aea4 (patch) | |
tree | 02d8068ff0c1a38acf5472d592a7057111d9c3b2 /krebs/5pkgs | |
parent | 51fcdfac0aa76228f6e17342513e15c772b9e84d (diff) |
writeOut: add support for text checking
Diffstat (limited to 'krebs/5pkgs')
-rw-r--r-- | krebs/5pkgs/builders.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/krebs/5pkgs/builders.nix b/krebs/5pkgs/builders.nix index 5860b9a15..77055d16a 100644 --- a/krebs/5pkgs/builders.nix +++ b/krebs/5pkgs/builders.nix @@ -91,6 +91,7 @@ rec { writers.text = { path + , check ? null , executable ? false , mode ? if executable then "0755" else "0644" , text @@ -102,6 +103,9 @@ rec { var = "file_${hashString "sha1" path}"; val = text; install = /* sh */ '' + ${optionalString (check != null) /* sh */ '' + ${check} ''$${var}Path + ''} ${pkgs.coreutils}/bin/install -m ${mode} -D ''$${var}Path $out${path} ''; }; |