2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2020-09-13 13:07:37 +01:00
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, openssl
|
|
|
|
, pandoc
|
|
|
|
, pkg-config
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
2019-07-11 06:29:36 +01:00
|
|
|
pname = "gocryptfs";
|
2020-08-28 22:10:49 +01:00
|
|
|
version = "1.8.0";
|
2016-11-17 13:15:47 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rfjakob";
|
2019-07-11 06:29:36 +01:00
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-08-28 22:10:49 +01:00
|
|
|
sha256 = "1acalwrr5xqhpqca3gypj0s68w6vpckxmg5z5gfgh8wx6nqx4aw9";
|
2016-11-17 13:15:47 +00:00
|
|
|
};
|
|
|
|
|
2020-09-13 13:07:37 +01:00
|
|
|
runVend = true;
|
|
|
|
vendorSha256 = "0z3y51sgr1rmr23jpc5h5d5lw14p3qzv48rc7zj7qa4rd5cfhsgi";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pandoc pkg-config ];
|
|
|
|
buildInputs = [ openssl ];
|
2016-11-17 13:15:47 +00:00
|
|
|
|
|
|
|
buildFlagsArray = ''
|
|
|
|
-ldflags=
|
2018-07-05 23:18:36 +01:00
|
|
|
-X main.GitVersion=${version}
|
2020-09-13 13:07:37 +01:00
|
|
|
-X main.GitVersionFuse=[vendored]
|
|
|
|
-X main.BuildDate=unknown
|
2016-11-17 13:15:47 +00:00
|
|
|
'';
|
|
|
|
|
2020-09-13 13:07:37 +01:00
|
|
|
subPackages = [ "." "gocryptfs-xray" "contrib/statfs" ];
|
2018-07-05 23:18:36 +01:00
|
|
|
|
|
|
|
postBuild = ''
|
2020-09-13 13:07:37 +01:00
|
|
|
pushd Documentation/
|
2018-07-05 23:18:36 +01:00
|
|
|
mkdir -p $out/share/man/man1
|
|
|
|
pandoc MANPAGE.md -s -t man -o $out/share/man/man1/gocryptfs.1
|
|
|
|
pandoc MANPAGE-XRAY.md -s -t man -o $out/share/man/man1/gocryptfs-xray.1
|
2020-09-13 13:07:37 +01:00
|
|
|
pandoc MANPAGE-STATFS.md -s -t man -o $out/share/man/man1/statfs.1
|
2018-07-05 23:18:36 +01:00
|
|
|
popd
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2016-11-17 13:15:47 +00:00
|
|
|
description = "Encrypted overlay filesystem written in Go";
|
|
|
|
license = licenses.mit;
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://nuetzlich.net/gocryptfs/";
|
2020-09-13 13:07:37 +01:00
|
|
|
maintainers = with maintainers; [ flokli offline prusnak ];
|
2018-07-05 23:18:36 +01:00
|
|
|
platforms = platforms.unix;
|
2016-11-17 13:15:47 +00:00
|
|
|
};
|
|
|
|
}
|