2019-01-09 11:37:20 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub, fetchpatch, kernel }:
|
2017-02-03 19:44:59 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-09-17 22:29:25 +02:00
|
|
|
# linux kernel above 5.7 comes with its own exfat implementation https://github.com/arter97/exfat-linux/issues/27
|
|
|
|
# Assertion moved here due to some tests unintenionally triggering it,
|
|
|
|
# e.g. nixosTests.kernel-latest; it's unclear how/why so far.
|
|
|
|
assertion = assert lib.versionOlder kernel.version "5.8"; null;
|
|
|
|
|
2017-02-03 19:44:59 +01:00
|
|
|
name = "exfat-nofuse-${version}-${kernel.version}";
|
2020-09-09 20:13:57 +02:00
|
|
|
version = "2020-04-15";
|
2017-02-03 19:44:59 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-09-09 20:13:57 +02:00
|
|
|
owner = "barrybingo";
|
2017-02-03 19:44:59 +01:00
|
|
|
repo = "exfat-nofuse";
|
2020-09-09 20:13:57 +02:00
|
|
|
rev = "297a5739cd4a942a1d814d05a9cd9b542e7b8fc8";
|
|
|
|
sha256 = "14jahy7n6pr482fjfrlf9ck3f2rkr5ds0n5r85xdfsla37ria26d";
|
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"
|
2021-01-23 02:33:55 +01:00
|
|
|
"ARCH=${stdenv.hostPlatform.linuxArch}"
|
2021-01-15 15:45:37 +01:00
|
|
|
] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [
|
2020-06-18 11:27:27 +02:00
|
|
|
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
|
2017-02-03 19:44:59 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
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 08:43:15 +02:00
|
|
|
inherit (src.meta) homepage;
|
2017-02-28 16:28:23 +01:00
|
|
|
license = lib.licenses.gpl2;
|
|
|
|
maintainers = with lib.maintainers; [ makefu ];
|
|
|
|
platforms = lib.platforms.linux;
|
2022-01-10 04:20:56 +01:00
|
|
|
broken = true;
|
2017-02-03 19:44:59 +01:00
|
|
|
};
|
|
|
|
}
|