From ab4d64dd741d39a1c3eb4f2a607fadf2897ef92d Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 24 Jul 2022 17:37:55 +0100 Subject: 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 --- pkgs/tools/filesystems/ntfs-3g/default.nix | 1 + pkgs/tools/system/pciutils/default.nix | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'pkgs') 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' "" ''; -- cgit 1.4.1