summary refs log tree commit diff
path: root/nixos/modules/system/boot/stage-1.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-09-27 15:26:37 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-09-29 13:05:28 +0200
commit75a1ec8a655e7e00a6bb6fc944663c21624fff60 (patch)
treefcbfd398fd7e7b41f88bd3104040c12101bb8343 /nixos/modules/system/boot/stage-1.nix
parent750195db7f369a6e73d400c0271ef2fa1e0479f0 (diff)
downloadnixpkgs-75a1ec8a655e7e00a6bb6fc944663c21624fff60.tar
nixpkgs-75a1ec8a655e7e00a6bb6fc944663c21624fff60.tar.gz
nixpkgs-75a1ec8a655e7e00a6bb6fc944663c21624fff60.tar.bz2
nixpkgs-75a1ec8a655e7e00a6bb6fc944663c21624fff60.tar.lz
nixpkgs-75a1ec8a655e7e00a6bb6fc944663c21624fff60.tar.xz
nixpkgs-75a1ec8a655e7e00a6bb6fc944663c21624fff60.tar.zst
nixpkgs-75a1ec8a655e7e00a6bb6fc944663c21624fff60.zip
NixOS: Use runCommand instead of mkDerivation in a few places
Diffstat (limited to 'nixos/modules/system/boot/stage-1.nix')
-rw-r--r--nixos/modules/system/boot/stage-1.nix18
1 files changed, 6 insertions, 12 deletions
diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix
index 40e67fa5f8d..8d02cd81e0e 100644
--- a/nixos/modules/system/boot/stage-1.nix
+++ b/nixos/modules/system/boot/stage-1.nix
@@ -134,10 +134,9 @@ let
     ''; # */
 
 
-  udevRules = pkgs.stdenv.mkDerivation {
-    name = "udev-rules";
-    allowedReferences = [ extraUtils ];
-    buildCommand = ''
+  udevRules = pkgs.runCommand "udev-rules"
+    { allowedReferences = [ extraUtils ]; }
+    ''
       mkdir -p $out
 
       echo 'ENV{LD_LIBRARY_PATH}="${extraUtils}/lib"' > $out/00-env.rules
@@ -176,7 +175,6 @@ let
       substituteInPlace $out/60-persistent-storage.rules \
         --replace ID_CDROM_MEDIA_TRACK_COUNT_DATA ID_CDROM_MEDIA
     ''; # */
-  };
 
 
   # The init script of boot stage 1 (loading kernel modules for
@@ -230,16 +228,12 @@ let
         { object = pkgs.writeText "mdadm.conf" config.boot.initrd.mdadmConf;
           symlink = "/etc/mdadm.conf";
         }
-        { object = pkgs.stdenv.mkDerivation {
-            name = "initrd-kmod-blacklist-ubuntu";
-            builder = pkgs.writeText "builder.sh" ''
-              source $stdenv/setup
+        { object = pkgs.runCommand "initrd-kmod-blacklist-ubuntu"
+            { src = "${pkgs.kmod-blacklist-ubuntu}/modprobe.conf"; }
+            ''
               target=$out
-
               ${pkgs.perl}/bin/perl -0pe 's/## file: iwlwifi.conf(.+?)##/##/s;' $src > $out
             '';
-            src = "${pkgs.kmod-blacklist-ubuntu}/modprobe.conf";
-          };
           symlink = "/etc/modprobe.d/ubuntu.conf";
         }
         { object = pkgs.kmod-debian-aliases;