diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-09-27 15:26:37 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2016-09-29 13:05:28 +0200 |
commit | 75a1ec8a655e7e00a6bb6fc944663c21624fff60 (patch) | |
tree | fcbfd398fd7e7b41f88bd3104040c12101bb8343 /nixos/modules/services/hardware/udev.nix | |
parent | 750195db7f369a6e73d400c0271ef2fa1e0479f0 (diff) | |
download | nixpkgs-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/services/hardware/udev.nix')
-rw-r--r-- | nixos/modules/services/hardware/udev.nix | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/nixos/modules/services/hardware/udev.nix b/nixos/modules/services/hardware/udev.nix index 7c4c93d0fcb..14d65978c32 100644 --- a/nixos/modules/services/hardware/udev.nix +++ b/nixos/modules/services/hardware/udev.nix @@ -32,13 +32,11 @@ let ''; # Perform substitutions in all udev rules files. - udevRules = stdenv.mkDerivation { - name = "udev-rules"; - - preferLocalBuild = true; - allowSubstitutes = false; - - buildCommand = '' + udevRules = pkgs.runCommand "udev-rules" + { preferLocalBuild = true; + allowSubstitutes = false; + } + '' mkdir -p $out shopt -s nullglob set +o pipefail @@ -130,15 +128,12 @@ let ln -s /dev/null $out/80-drivers.rules ''} ''; # */ - }; - hwdbBin = stdenv.mkDerivation { - name = "hwdb.bin"; - - preferLocalBuild = true; - allowSubstitutes = false; - - buildCommand = '' + hwdbBin = pkgs.runCommand "hwdb.bin" + { preferLocalBuild = true; + allowSubstitutes = false; + } + '' mkdir -p etc/udev/hwdb.d for i in ${toString ([udev] ++ cfg.packages)}; do echo "Adding hwdb files for package $i" @@ -151,7 +146,6 @@ let ${udev}/bin/udevadm hwdb --update --root=$(pwd) mv etc/udev/hwdb.bin $out ''; - }; # Udev has a 512-character limit for ENV{PATH}, so create a symlink # tree to work around this. |