depot/third_party/nixpkgs/pkgs/os-specific/linux/apfs/default.nix
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00:00

49 lines
1.4 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, kernel
, nixosTests
}:
let
tag = "0.3.5";
in
stdenv.mkDerivation {
pname = "apfs";
version = "${tag}-${kernel.version}";
src = fetchFromGitHub {
owner = "linux-apfs";
repo = "linux-apfs-rw";
rev = "v${tag}";
hash = "sha256-rKz9a4Z+tx63rhknQIl/zu/WIMjxxM0+NGyaxnzxLk4=";
};
hardeningDisable = [ "pic" ];
nativeBuildInputs = kernel.moduleBuildDependencies;
makeFlags = kernel.makeFlags ++ [
"KERNELRELEASE=${kernel.modDirVersion}"
"KERNEL_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
"INSTALL_MOD_PATH=$(out)"
];
passthru.tests.apfs = nixosTests.apfs;
meta = with lib; {
description = "APFS module for linux";
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.
'';
homepage = "https://github.com/linux-apfs/linux-apfs-rw";
license = licenses.gpl2Only;
platforms = platforms.linux;
maintainers = with maintainers; [ Luflosi ];
};
}