diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2018-11-26 17:26:00 -0600 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2018-12-02 14:12:42 -0600 |
commit | 7a2c07d29bf9bb7582e5df2dfcb879278d65a8e8 (patch) | |
tree | 2a530d051b4b536dd8db020c7adaac35f97d464a /pkgs/os-specific/linux/kmod/default.nix | |
parent | 9ddc2ec27db0453597532eee589bcf20a158a36f (diff) | |
download | nixpkgs-7a2c07d29bf9bb7582e5df2dfcb879278d65a8e8.tar nixpkgs-7a2c07d29bf9bb7582e5df2dfcb879278d65a8e8.tar.gz nixpkgs-7a2c07d29bf9bb7582e5df2dfcb879278d65a8e8.tar.bz2 nixpkgs-7a2c07d29bf9bb7582e5df2dfcb879278d65a8e8.tar.lz nixpkgs-7a2c07d29bf9bb7582e5df2dfcb879278d65a8e8.tar.xz nixpkgs-7a2c07d29bf9bb7582e5df2dfcb879278d65a8e8.tar.zst nixpkgs-7a2c07d29bf9bb7582e5df2dfcb879278d65a8e8.zip |
kmod: enable on darwin
This is needed to build linux kernels on darwin. While we can’t actually use it to load kernel modules, we can use it to create indexes of modules on macOS. (cherry picked from commit ebb31480e8a45efbaff4c4a212bdfc0b053adde0)
Diffstat (limited to 'pkgs/os-specific/linux/kmod/default.nix')
-rw-r--r-- | pkgs/os-specific/linux/kmod/default.nix | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pkgs/os-specific/linux/kmod/default.nix b/pkgs/os-specific/linux/kmod/default.nix index 43d69ac9574..cace828685a 100644 --- a/pkgs/os-specific/linux/kmod/default.nix +++ b/pkgs/os-specific/linux/kmod/default.nix @@ -1,4 +1,5 @@ -{ stdenv, buildPackages, lib, fetchurl, autoreconfHook, pkgconfig, libxslt, xz }: +{ stdenv, buildPackages, lib, fetchurl, autoreconfHook, pkgconfig +, libxslt, xz, elf-header }: let systems = [ "/run/current-system/kernel-modules" "/run/booted-system/kernel-modules" "" ]; @@ -14,7 +15,7 @@ in stdenv.mkDerivation rec { }; nativeBuildInputs = [ autoreconfHook pkgconfig libxslt ]; - buildInputs = [ xz ]; + buildInputs = [ xz elf-header ]; configureFlags = [ "--sysconfdir=/etc" @@ -22,7 +23,8 @@ in stdenv.mkDerivation rec { "--with-modulesdirs=${modulesDirs}" ]; - patches = [ ./module-dir.patch ]; + patches = [ ./module-dir.patch ] + ++ lib.optional stdenv.isDarwin ./darwin.patch; postInstall = '' for prog in rmmod insmod lsmod modinfo modprobe depmod; do @@ -37,6 +39,6 @@ in stdenv.mkDerivation rec { homepage = https://www.kernel.org/pub/linux/utils/kernel/kmod/; description = "Tools for loading and managing Linux kernel modules"; license = licenses.lgpl21; - platforms = platforms.linux; + platforms = platforms.unix; }; } |