2019-01-09 13:37:20 +03:00
|
|
|
{ stdenv, lib, fetchFromGitHub, fetchpatch, kernel }:
|
2017-02-03 21:44:59 +03:00
|
|
|
|
2017-02-28 18:28:23 +03:00
|
|
|
|
|
|
|
# Upstream build for kernel 4.1 is broken, 3.12 and below seems to be working
|
|
|
|
assert lib.versionAtLeast kernel.version "4.2" || lib.versionOlder kernel.version "4.0";
|
2017-02-28 17:46:57 +03:00
|
|
|
|
2017-02-03 21:44:59 +03:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "exfat-nofuse-${version}-${kernel.version}";
|
2019-09-13 09:43:15 +03:00
|
|
|
version = "2019-09-06";
|
2017-02-03 21:44:59 +03:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2019-09-13 09:43:15 +03:00
|
|
|
owner = "AdrianBan";
|
2017-02-03 21:44:59 +03:00
|
|
|
repo = "exfat-nofuse";
|
2019-09-13 09:43:15 +03:00
|
|
|
rev = "5536f067373c196f152061f5000fe0032dc07c48";
|
|
|
|
sha256 = "00mhadsv2iw8z00a6170hwbvk3afx484nn3irmd5f5kmhs34sw7k";
|
2017-02-03 21:44:59 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
2018-01-13 21:44:19 +03:00
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
2017-02-03 21:44:59 +03:00
|
|
|
makeFlags = [
|
|
|
|
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -m644 -b -D exfat.ko $out/lib/modules/${kernel.modDirVersion}/kernel/fs/exfat/exfat.ko
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "exfat kernel module";
|
2019-09-13 09:43:15 +03:00
|
|
|
inherit (src.meta) homepage;
|
2017-02-28 18:28:23 +03:00
|
|
|
license = lib.licenses.gpl2;
|
|
|
|
maintainers = with lib.maintainers; [ makefu ];
|
|
|
|
platforms = lib.platforms.linux;
|
2017-02-03 21:44:59 +03:00
|
|
|
};
|
|
|
|
}
|