about summary refs log tree commit diff
path: root/pkgs/tools/filesystems/nixpart
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2015-10-03 20:52:03 +0200
committerVladimír Čunát <vcunat@gmail.com>2015-10-04 10:03:53 +0200
commitb44d846990d779f7201f114076a2f2bcacdc91c5 (patch)
tree9a6f766bfb04765e1095be811aab38b94f88bd5d /pkgs/tools/filesystems/nixpart
parentec7a4ddd92e19e0084a07448671cd79d974cd818 (diff)
downloadnixlib-b44d846990d779f7201f114076a2f2bcacdc91c5.tar
nixlib-b44d846990d779f7201f114076a2f2bcacdc91c5.tar.gz
nixlib-b44d846990d779f7201f114076a2f2bcacdc91c5.tar.bz2
nixlib-b44d846990d779f7201f114076a2f2bcacdc91c5.tar.lz
nixlib-b44d846990d779f7201f114076a2f2bcacdc91c5.tar.xz
nixlib-b44d846990d779f7201f114076a2f2bcacdc91c5.tar.zst
nixlib-b44d846990d779f7201f114076a2f2bcacdc91c5.zip
udev: complete rework
- systemd puts all into one output now (except for man),
  because I wasn't able to fix all systemd/udev refernces
  for NixOS to work well
- libudev is now by default *copied* into another path,
  which is what most packages will use as build input :-)
- pkgs.udev = [ libudev.out libudev.dev ]; because there are too many
  references that just put `udev` into build inputs (to rewrite them all),
  also this made "${udev}/foo" fail at *evaluation* time
  so it's easier to catch and change to something more specific
Diffstat (limited to 'pkgs/tools/filesystems/nixpart')
-rw-r--r--pkgs/tools/filesystems/nixpart/0.4/blivet.nix8
-rw-r--r--pkgs/tools/filesystems/nixpart/0.4/default.nix6
-rw-r--r--pkgs/tools/filesystems/nixpart/0.4/lvm2.nix6
-rw-r--r--pkgs/tools/filesystems/nixpart/0.4/multipath-tools.nix6
4 files changed, 13 insertions, 13 deletions
diff --git a/pkgs/tools/filesystems/nixpart/0.4/blivet.nix b/pkgs/tools/filesystems/nixpart/0.4/blivet.nix
index 4033cdc87e0e..0995a8bfd23e 100644
--- a/pkgs/tools/filesystems/nixpart/0.4/blivet.nix
+++ b/pkgs/tools/filesystems/nixpart/0.4/blivet.nix
@@ -1,11 +1,11 @@
 { stdenv, fetchurl, buildPythonPackage, pykickstart, pyparted, pyblock
 , libselinux, cryptsetup, multipath_tools, lsof, utillinux
-, useNixUdev ? true, udev ? null
+, useNixUdev ? true, libudev ? null
 # This is only used when useNixUdev is false
 , udevSoMajor ? 1
 }:
 
-assert useNixUdev -> udev != null;
+assert useNixUdev -> libudev != null;
 
 buildPythonPackage rec {
   name = "blivet-${version}";
@@ -29,7 +29,7 @@ buildPythonPackage rec {
     sed -i '/pvscan/s/, *"--cache"//' blivet/devicelibs/lvm.py
   '' + (if useNixUdev then ''
     sed -i -e '/find_library/,/find_library/ {
-      c libudev = "${udev.libudev}/lib/libudev.so.1"
+      c libudev = "${libudev.out}/lib/libudev.so.1"
     }' blivet/pyudev.py
   '' else ''
     sed -i \
@@ -40,7 +40,7 @@ buildPythonPackage rec {
 
   propagatedBuildInputs = [
     pykickstart pyparted pyblock libselinux cryptsetup
-  ] ++ stdenv.lib.optional useNixUdev udev;
+  ] ++ stdenv.lib.optional useNixUdev libudev;
 
   # tests are currently _heavily_ broken upstream
   doCheck = false;
diff --git a/pkgs/tools/filesystems/nixpart/0.4/default.nix b/pkgs/tools/filesystems/nixpart/0.4/default.nix
index 9ea2f9bfdc77..1ac8083c2594 100644
--- a/pkgs/tools/filesystems/nixpart/0.4/default.nix
+++ b/pkgs/tools/filesystems/nixpart/0.4/default.nix
@@ -10,7 +10,7 @@ let
     inherit stdenv fetchurl buildPythonPackage;
     inherit pykickstart pyparted pyblock cryptsetup multipath_tools;
     inherit useNixUdev udevSoMajor;
-    inherit (pkgs) lsof utillinux udev;
+    inherit (pkgs) lsof utillinux libudev;
     libselinux = pkgs.libselinux.override { enablePython = true; };
   };
 
@@ -27,12 +27,12 @@ let
 
   lvm2 = import ./lvm2.nix {
     inherit stdenv fetchurl;
-    inherit (pkgs) pkgconfig utillinux udev coreutils;
+    inherit (pkgs) pkgconfig utillinux libudev systemd coreutils;
   };
 
   multipath_tools = import ./multipath-tools.nix {
     inherit stdenv fetchurl lvm2;
-    inherit (pkgs) readline udev libaio gzip;
+    inherit (pkgs) readline systemd libaio gzip;
   };
 
   parted = import ./parted.nix {
diff --git a/pkgs/tools/filesystems/nixpart/0.4/lvm2.nix b/pkgs/tools/filesystems/nixpart/0.4/lvm2.nix
index 32bf79e4a7af..b92c40ba99e6 100644
--- a/pkgs/tools/filesystems/nixpart/0.4/lvm2.nix
+++ b/pkgs/tools/filesystems/nixpart/0.4/lvm2.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pkgconfig, udev, utillinux, coreutils }:
+{ stdenv, fetchurl, pkgconfig, libudev, systemd, utillinux, coreutils }:
 
 let
   v = "2.02.106";
@@ -15,7 +15,7 @@ stdenv.mkDerivation {
   configureFlags =
     "--disable-readline --enable-udev_rules --enable-udev_sync --enable-pkgconfig --enable-applib";
 
-  buildInputs = [ pkgconfig udev ];
+  buildInputs = [ pkgconfig libudev ];
 
   preConfigure =
     ''
@@ -23,7 +23,7 @@ stdenv.mkDerivation {
         --replace /usr/bin/tr ${coreutils}/bin/tr
       substituteInPlace scripts/lvm2_activation_generator_systemd_red_hat.c \
         --replace /usr/sbin/lvm $out/sbin/lvm \
-        --replace /usr/bin/udevadm ${udev.out}/bin/udevadm
+        --replace /usr/bin/udevadm ${systemd.udev.bin}/bin/udevadm
 
       sed -i /DEFAULT_SYS_DIR/d Makefile.in
       sed -i /DEFAULT_PROFILE_DIR/d conf/Makefile.in
diff --git a/pkgs/tools/filesystems/nixpart/0.4/multipath-tools.nix b/pkgs/tools/filesystems/nixpart/0.4/multipath-tools.nix
index a3873fb25ff0..b78605504bf8 100644
--- a/pkgs/tools/filesystems/nixpart/0.4/multipath-tools.nix
+++ b/pkgs/tools/filesystems/nixpart/0.4/multipath-tools.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, lvm2, libaio, gzip, readline, udev }:
+{ stdenv, fetchurl, lvm2, libaio, gzip, readline, systemd }:
 
 stdenv.mkDerivation rec {
   name = "multipath-tools-0.4.9";
@@ -22,8 +22,8 @@ stdenv.mkDerivation rec {
       substituteInPlace kpartx/kpartx.rules --replace /sbin/kpartx $out/sbin/kpartx
       substituteInPlace kpartx/kpartx_id --replace /sbin/dmsetup ${lvm2}/sbin/dmsetup
 
-      substituteInPlace libmultipath/defaults.h --replace /lib/udev/scsi_id ${udev.libudev}/lib/udev/scsi_id
-      substituteInPlace libmultipath/hwtable.c --replace /lib/udev/scsi_id ${udev.libudev}/lib/udev/scsi_id
+      substituteInPlace libmultipath/defaults.h --replace /lib/udev/scsi_id ${systemd.udev.lib}/lib/udev/scsi_id
+      substituteInPlace libmultipath/hwtable.c --replace /lib/udev/scsi_id ${systemd.udev.lib}/lib/udev/scsi_id
     '';
 
   meta = {