about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-07-24 17:37:55 +0100
committerSergei Trofimovich <slyich@gmail.com>2022-07-25 07:40:54 +0100
commitab4d64dd741d39a1c3eb4f2a607fadf2897ef92d (patch)
tree9686ef4ff75ff69925242c118cbc0e12e4d8a9fa /pkgs
parentff56c775c82c3820ad375a1487d785fd03f12e8d (diff)
downloadnixlib-ab4d64dd741d39a1c3eb4f2a607fadf2897ef92d.tar
nixlib-ab4d64dd741d39a1c3eb4f2a607fadf2897ef92d.tar.gz
nixlib-ab4d64dd741d39a1c3eb4f2a607fadf2897ef92d.tar.bz2
nixlib-ab4d64dd741d39a1c3eb4f2a607fadf2897ef92d.tar.lz
nixlib-ab4d64dd741d39a1c3eb4f2a607fadf2897ef92d.tar.xz
nixlib-ab4d64dd741d39a1c3eb4f2a607fadf2897ef92d.tar.zst
nixlib-ab4d64dd741d39a1c3eb4f2a607fadf2897ef92d.zip
pciutils, ntfs3g: don't pull in `kmod` on darwin
`kmod` is a linux-only package. Previous versions worked on `darwin`
by chance and might break in the future. Remove `kmod` import from
there.

Co-authored-by: Artturi <Artturin@artturin.com>
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/tools/filesystems/ntfs-3g/default.nix1
-rw-r--r--pkgs/tools/system/pciutils/default.nix7
2 files changed, 5 insertions, 3 deletions
diff --git a/pkgs/tools/filesystems/ntfs-3g/default.nix b/pkgs/tools/filesystems/ntfs-3g/default.nix
index fe0ae20f557b..018621b8019a 100644
--- a/pkgs/tools/filesystems/ntfs-3g/default.nix
+++ b/pkgs/tools/filesystems/ntfs-3g/default.nix
@@ -40,6 +40,7 @@ stdenv.mkDerivation rec {
     "--enable-extras"
     "--with-mount-helper=${mount}/bin/mount"
     "--with-umount-helper=${mount}/bin/umount"
+  ] ++ lib.optionals stdenv.isLinux [
     "--with-modprobe-helper=${kmod}/bin/modprobe"
   ];
 
diff --git a/pkgs/tools/system/pciutils/default.nix b/pkgs/tools/system/pciutils/default.nix
index 315321671818..b7cfde580706 100644
--- a/pkgs/tools/system/pciutils/default.nix
+++ b/pkgs/tools/system/pciutils/default.nix
@@ -14,10 +14,11 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ pkg-config ];
-  buildInputs = [ zlib kmod which ] ++
-    lib.optional stdenv.hostPlatform.isDarwin IOKit;
+  buildInputs = [ which zlib ]
+    ++ lib.optionals stdenv.hostPlatform.isDarwin [ IOKit ]
+    ++ lib.optionals stdenv.hostPlatform.isLinux [ kmod ];
 
-  preConfigure = if stdenv.cc.isGNU then null else ''
+  preConfigure = lib.optionalString (!stdenv.cc.isGNU) ''
     substituteInPlace Makefile --replace 'CC=$(CROSS_COMPILE)gcc' ""
   '';