2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2023-04-29 16:46:19 +00:00
|
|
|
, nixosTests
|
2021-06-28 23:13:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "apfsprogs";
|
2023-07-15 17:15:38 +00:00
|
|
|
version = "unstable-2023-06-06";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linux-apfs";
|
|
|
|
repo = "apfsprogs";
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "91827679dfb1d6f5719fbe22fa67e89c17adb133";
|
|
|
|
hash = "sha256-gF7bOozAGGpuVP23mnPW81qH2gnVUdT9cxukzGJ+ydI=";
|
2021-06-28 23:13:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
2023-05-24 13:37:59 +00:00
|
|
|
make -C apfs-snap $makeFlags
|
2021-06-28 23:13:55 +00:00
|
|
|
make -C apfsck $makeFlags
|
|
|
|
make -C mkapfs $makeFlags
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
2023-05-24 13:37:59 +00:00
|
|
|
make -C apfs-snap install DESTDIR="$out" $installFlags
|
2021-12-19 01:06:50 +00:00
|
|
|
make -C apfsck install DESTDIR="$out" $installFlags
|
|
|
|
make -C mkapfs install DESTDIR="$out" $installFlags
|
2021-06-28 23:13:55 +00:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
passthru.tests = {
|
|
|
|
apfs = nixosTests.apfs;
|
|
|
|
};
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Experimental APFS tools for linux";
|
|
|
|
homepage = "https://github.com/linux-apfs/apfsprogs";
|
|
|
|
license = licenses.gpl2Only;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ Luflosi ];
|
|
|
|
};
|
|
|
|
}
|