0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

NixOS: Use runCommand instead of mkDerivation in a few places

This commit is contained in:
Eelco Dolstra 2016-09-27 15:26:37 +02:00
parent 750195db7f
commit 75a1ec8a65
11 changed files with 89 additions and 140 deletions

View file

@ -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;