2017-02-28 16:28:23 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub, kernel }:
|
2017-02-03 19:44:59 +01:00
|
|
|
|
2017-02-28 16:28:23 +01: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 15:46:57 +01:00
|
|
|
|
2017-02-03 19:44:59 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "exfat-nofuse-${version}-${kernel.version}";
|
2017-07-23 17:43:01 +02:00
|
|
|
version = "2017-06-19";
|
2017-02-03 19:44:59 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dorimanx";
|
|
|
|
repo = "exfat-nofuse";
|
2017-07-23 17:43:01 +02:00
|
|
|
rev = "de4c760bc9a05ead83bc3ec6eec6cf1fb106f523";
|
|
|
|
sha256 = "0v979d8sbcb70lakm4jal2ck3gspkdgq9108k127f7ph08vf8djm";
|
2017-02-03 19:44:59 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
|
2018-01-13 19:44:19 +01:00
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
2017-02-03 19:44:59 +01: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";
|
|
|
|
homepage = https://github.com/dorimanx/exfat-nofuse;
|
2017-02-28 16:28:23 +01:00
|
|
|
license = lib.licenses.gpl2;
|
|
|
|
maintainers = with lib.maintainers; [ makefu ];
|
|
|
|
platforms = lib.platforms.linux;
|
2017-02-03 19:44:59 +01:00
|
|
|
};
|
|
|
|
}
|