about summary refs log tree commit diff
path: root/modules/shell
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-03-15 21:33:58 +0000
committerAlyssa Ross <hi@alyssa.is>2019-03-15 21:33:58 +0000
commit87bdd8565d5490e99c11b33782c924dfa53896c9 (patch)
treea3a2378b3abf9a10fa86365abedf50e6d7eae135 /modules/shell
parentf100aa70d9de357c04bb97b7fe28c3751ecd2e0e (diff)
downloadnixlib-87bdd8565d5490e99c11b33782c924dfa53896c9.tar
nixlib-87bdd8565d5490e99c11b33782c924dfa53896c9.tar.gz
nixlib-87bdd8565d5490e99c11b33782c924dfa53896c9.tar.bz2
nixlib-87bdd8565d5490e99c11b33782c924dfa53896c9.tar.lz
nixlib-87bdd8565d5490e99c11b33782c924dfa53896c9.tar.xz
nixlib-87bdd8565d5490e99c11b33782c924dfa53896c9.tar.zst
nixlib-87bdd8565d5490e99c11b33782c924dfa53896c9.zip
modules: use pkgs.substituteAll where applicable
I misread the implmentation, and thought it only worked for derivations
that produced directories, so hadn't been using it until now.
Diffstat (limited to 'modules/shell')
-rw-r--r--modules/shell/git/default.nix18
1 files changed, 9 insertions, 9 deletions
diff --git a/modules/shell/git/default.nix b/modules/shell/git/default.nix
index 2f61a984aff3..8a7c10bfdb47 100644
--- a/modules/shell/git/default.nix
+++ b/modules/shell/git/default.nix
@@ -1,13 +1,13 @@
 { pkgs, ... }:
 
 let
-  mozlz4_textconv = pkgs.runCommand "mozlz4-textconv" {
+  mozlz4_textconv = pkgs.substituteAll {
+    src = diff/mozlz4.in;
+    isExecutable = true;
+
     inherit (pkgs) execline mozlz4a;
     python = pkgs.python3;
-  } ''
-    substituteAll ${diff/mozlz4.in} $out
-    chmod +x $out
-  '';
+  };
 
   # Git only supports absolute paths for this, so give it a wrapper
   # program that execs the msmtp in PATH.
@@ -16,16 +16,16 @@ let
     msmtp $@
   '';
 
-  config = pkgs.runCommand "gitconfig" {
+  config = pkgs.substituteAll {
+    src = ./config.in;
+
     inherit mozlz4_textconv;
     python = pkgs.python3;
     smtpServer = sendmail;
     attributesfile = ./attributes;
     ignorefile = ./ignore;
     preferLocalBuild = true;
-  } ''
-    substituteAll ${./config.in} $out
-  '';
+  };
 
 in
 {