2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, kernel
|
2022-12-17 10:02:37 +00:00
|
|
|
, nixosTests
|
2021-06-28 23:13:55 +00:00
|
|
|
}:
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
let
|
2023-10-09 19:29:22 +00:00
|
|
|
tag = "0.3.4";
|
2023-02-02 18:25:31 +00:00
|
|
|
in
|
2021-06-28 23:13:55 +00:00
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "apfs";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "${tag}-${kernel.version}";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linux-apfs";
|
|
|
|
repo = "linux-apfs-rw";
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "v${tag}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-EeVOrZtmKi5VfPerW9IntjRvdU3AbFPHG+pyAI4ciGk=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
makeFlags = kernel.makeFlags ++ [
|
2021-06-28 23:13:55 +00:00
|
|
|
"KERNELRELEASE=${kernel.modDirVersion}"
|
|
|
|
"KERNEL_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
|
|
|
"INSTALL_MOD_PATH=$(out)"
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
passthru.tests.apfs = nixosTests.apfs;
|
2022-12-17 10:02:37 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "APFS module for linux";
|
2023-02-02 18:25:31 +00:00
|
|
|
longDescription = ''
|
|
|
|
The Apple File System (APFS) is the copy-on-write filesystem currently
|
|
|
|
used on all Apple devices. This module provides a degree of experimental
|
|
|
|
support on Linux.
|
|
|
|
If you make use of the write support, expect data corruption.
|
|
|
|
Read-only support is somewhat more complete, with sealed volumes,
|
|
|
|
snapshots, and all the missing compression algorithms recently added.
|
|
|
|
Encryption is still not in the works though.
|
|
|
|
'';
|
2021-06-28 23:13:55 +00:00
|
|
|
homepage = "https://github.com/linux-apfs/linux-apfs-rw";
|
|
|
|
license = licenses.gpl2Only;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ Luflosi ];
|
|
|
|
};
|
|
|
|
}
|