diff options
author | Robert Hensing <robert@roberthensing.nl> | 2018-04-05 16:58:50 +0200 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2018-04-05 17:00:00 +0200 |
commit | 30bff42231ae088d7f567bda5b9af9a3905999bf (patch) | |
tree | 14669b9e7c940208f1bfbf7bda564a6bee072f1b /pkgs/os-specific/linux/kmod | |
parent | 59ddb3ebfbe43625a36d4863739280cedf88c404 (diff) | |
download | nixpkgs-30bff42231ae088d7f567bda5b9af9a3905999bf.tar nixpkgs-30bff42231ae088d7f567bda5b9af9a3905999bf.tar.gz nixpkgs-30bff42231ae088d7f567bda5b9af9a3905999bf.tar.bz2 nixpkgs-30bff42231ae088d7f567bda5b9af9a3905999bf.tar.lz nixpkgs-30bff42231ae088d7f567bda5b9af9a3905999bf.tar.xz nixpkgs-30bff42231ae088d7f567bda5b9af9a3905999bf.tar.zst nixpkgs-30bff42231ae088d7f567bda5b9af9a3905999bf.zip |
linux module handling: support kernels without modules
Diffstat (limited to 'pkgs/os-specific/linux/kmod')
-rw-r--r-- | pkgs/os-specific/linux/kmod/aggregator.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/kmod/aggregator.nix b/pkgs/os-specific/linux/kmod/aggregator.nix index 9bd7c8480c1..7d46a13f356 100644 --- a/pkgs/os-specific/linux/kmod/aggregator.nix +++ b/pkgs/os-specific/linux/kmod/aggregator.nix @@ -9,6 +9,12 @@ buildEnv { '' source ${stdenv}/setup + if ! test -d "$out/lib/modules"; then + echo "No modules found." + # To support a kernel without modules + exit 0 + fi + kernelVersion=$(cd $out/lib/modules && ls -d *) if test "$(echo $kernelVersion | wc -w)" != 1; then echo "inconsistent kernel versions: $kernelVersion" |