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