2018-07-06 00:18:36 +02:00
|
|
|
# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
|
|
|
|
{ stdenv, buildGoPackage, fetchFromGitHub, openssl, pandoc, pkgconfig }:
|
2016-11-17 14:15:47 +01:00
|
|
|
|
|
|
|
let
|
2018-07-06 00:18:36 +02:00
|
|
|
goFuseVersion = with stdenv.lib; substring 0 7 (head (filter (
|
2016-11-17 14:15:47 +01:00
|
|
|
d: d.goPackagePath == "github.com/hanwen/go-fuse"
|
|
|
|
) (import ./deps.nix))).fetch.rev;
|
2018-07-06 00:18:36 +02:00
|
|
|
in
|
|
|
|
buildGoPackage rec {
|
2019-07-11 07:29:36 +02:00
|
|
|
pname = "gocryptfs";
|
|
|
|
version = "1.7"; # TODO: Drop `patches` with next release. Remove `fix-unix2syscall_darwin.go-build-failure.patch`.
|
2016-11-17 14:15:47 +01:00
|
|
|
|
|
|
|
goPackagePath = "github.com/rfjakob/gocryptfs";
|
|
|
|
|
2018-07-06 00:18:36 +02:00
|
|
|
nativeBuildInputs = [ pandoc pkgconfig ];
|
|
|
|
buildInputs = [ openssl ];
|
|
|
|
|
2016-11-17 14:15:47 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rfjakob";
|
2019-07-11 07:29:36 +02:00
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1sr3i73haw07faqpw785cdda2kna8q3a0zhwab1p3i935rvp4qaa";
|
2016-11-17 14:15:47 +01:00
|
|
|
};
|
|
|
|
|
2019-07-11 07:29:36 +02:00
|
|
|
# Fixes build on darwin
|
|
|
|
# Source: https://github.com/rfjakob/gocryptfs/commit/b1468a732fa26550f2a6f8a21cc7bd47b65a8c96
|
|
|
|
patches = [ ./fix-unix2syscall_darwin.go-build-failure.patch ];
|
|
|
|
|
2016-11-17 14:15:47 +01:00
|
|
|
postPatch = "rm -r tests";
|
|
|
|
|
|
|
|
buildFlagsArray = ''
|
|
|
|
-ldflags=
|
2018-07-06 00:18:36 +02:00
|
|
|
-X main.GitVersion=${version}
|
2016-11-17 14:15:47 +01:00
|
|
|
-X main.GitVersionFuse=${goFuseVersion}
|
|
|
|
'';
|
|
|
|
|
2018-07-06 00:18:36 +02:00
|
|
|
goDeps = ./deps.nix;
|
|
|
|
|
|
|
|
postBuild = ''
|
|
|
|
pushd go/src/github.com/rfjakob/gocryptfs/Documentation/
|
|
|
|
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
|
|
|
|
popd
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2016-11-17 14:15:47 +01:00
|
|
|
description = "Encrypted overlay filesystem written in Go";
|
|
|
|
license = licenses.mit;
|
|
|
|
homepage = https://nuetzlich.net/gocryptfs/;
|
2018-07-06 00:18:36 +02:00
|
|
|
maintainers = with maintainers; [ flokli offline ];
|
|
|
|
platforms = platforms.unix;
|
2016-11-17 14:15:47 +01:00
|
|
|
};
|
|
|
|
}
|