2021-02-05 17:12:51 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, gnum4, pam, fscrypt-experimental }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Don't use this for anything important yet!
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "fscrypt";
|
2022-03-05 16:20:37 +00:00
|
|
|
version = "0.3.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "fscrypt";
|
|
|
|
rev = "v${version}";
|
2022-03-05 16:20:37 +00:00
|
|
|
hash = "sha256-kkcZuX8tB7N8l9O3X6H92EqEqdAcqSbX+pwr7GrcRFY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace 'TAG_VERSION := $(shell git describe --tags)' "" \
|
|
|
|
--replace "/usr/local" "$out"
|
|
|
|
'';
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
vendorSha256 = "sha256-6zcHz7ePJFSxxfIlhVK2VEf6+soBoUInT9ZsZK/Ag78=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [ gnum4 ];
|
|
|
|
buildInputs = [ pam ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
2022-03-05 16:20:37 +00:00
|
|
|
runHook preBuild
|
2020-04-24 23:36:52 +00:00
|
|
|
make
|
2022-03-05 16:20:37 +00:00
|
|
|
runHook postBuild
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2022-03-05 16:20:37 +00:00
|
|
|
runHook preInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
make install
|
2022-03-05 16:20:37 +00:00
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description =
|
|
|
|
"A high-level tool for the management of Linux filesystem encryption";
|
|
|
|
longDescription = ''
|
|
|
|
This tool manages metadata, key generation, key wrapping, PAM integration,
|
|
|
|
and provides a uniform interface for creating and modifying encrypted
|
|
|
|
directories.
|
|
|
|
'';
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
changelog = "https://github.com/google/fscrypt/releases/tag/v${version}";
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ primeos ];
|
|
|
|
};
|
2020-05-29 06:06:01 +00:00
|
|
|
}
|