nixpkgs/pkgs/tools/filesystems/gocryptfs/default.nix

51 lines
1.4 KiB
Nix
Raw Normal View History

# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
{ stdenv, buildGoPackage, fetchFromGitHub, openssl, pandoc, pkgconfig }:
2016-11-17 13:15:47 +00:00
let
version = "v1.5";
goFuseVersion = with stdenv.lib; substring 0 7 (head (filter (
2016-11-17 13:15:47 +00:00
d: d.goPackagePath == "github.com/hanwen/go-fuse"
) (import ./deps.nix))).fetch.rev;
in
buildGoPackage rec {
2016-11-17 13:15:47 +00:00
name = "gocryptfs-${version}";
goPackagePath = "github.com/rfjakob/gocryptfs";
nativeBuildInputs = [ pandoc pkgconfig ];
buildInputs = [ openssl ];
2016-11-17 13:15:47 +00:00
src = fetchFromGitHub {
owner = "rfjakob";
repo = "gocryptfs";
rev = version;
sha256 = "0s5smjc7n9088n8a2mv7cy3cx31ci13i1i8fhg1vslc17a15qs2d";
2016-11-17 13:15:47 +00:00
};
postPatch = "rm -r tests";
buildFlagsArray = ''
-ldflags=
-X main.GitVersion=${version}
2016-11-17 13:15:47 +00:00
-X main.GitVersionFuse=${goFuseVersion}
'';
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 13:15:47 +00:00
description = "Encrypted overlay filesystem written in Go";
license = licenses.mit;
homepage = https://nuetzlich.net/gocryptfs/;
maintainers = with maintainers; [ flokli offline ];
platforms = platforms.unix;
2016-11-17 13:15:47 +00:00
};
}