2022-05-21 12:52:19 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2023-06-15 12:25:58 +00:00
|
|
|
, fetchzip
|
2022-05-21 12:52:19 +00:00
|
|
|
, openssl
|
|
|
|
, enableShared ? !stdenv.hostPlatform.isStatic
|
|
|
|
, enableManpages ? false
|
|
|
|
, pandoc
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "fsverity-utils";
|
2024-03-24 00:19:04 +00:00
|
|
|
version = "1.6";
|
2022-05-21 12:52:19 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "lib" "dev" ] ++ lib.optional enableManpages "man";
|
|
|
|
|
2023-06-15 12:25:58 +00:00
|
|
|
src = fetchzip {
|
|
|
|
url = "https://git.kernel.org/pub/scm/fs/fsverity/fsverity-utils.git/snapshot/fsverity-utils-v${version}.tar.gz";
|
2024-03-24 00:19:04 +00:00
|
|
|
sha256 = "sha256-FZN4MKNmymIXZ2Q0woA0SLzPf4SaUJkj4ssKPsY4xXc=";
|
2022-05-21 12:52:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = lib.optionals (!enableShared) [
|
|
|
|
./remove-dynamic-libs.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = lib.optional enableManpages pandoc;
|
|
|
|
buildInputs = [ openssl ];
|
|
|
|
|
|
|
|
makeFlags = [ "DESTDIR=$(out)" "PREFIX=" ] ++ lib.optional enableShared "USE_SHARED_LIB=1";
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
installTargets = [ "install" ] ++ lib.optional enableManpages "install-man";
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $lib
|
|
|
|
mv $out/lib $lib/lib
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://www.kernel.org/doc/html/latest/filesystems/fsverity.html#userspace-utility";
|
2023-06-15 12:24:59 +00:00
|
|
|
changelog = "https://git.kernel.org/pub/scm/fs/fsverity/fsverity-utils.git/tree/NEWS.md";
|
2022-05-21 12:52:19 +00:00
|
|
|
description = "Set of userspace utilities for fs-verity";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "fsverity";
|
2022-05-21 12:52:19 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jk ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|