summary refs log tree commit diff
path: root/pkgs/tools/filesystems/gocryptfs/default.nix
blob: 8491bf20e8f133485f5a11c52b73d0c1d4d41e80 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
{ stdenv, buildGoPackage, fetchFromGitHub, openssl, pandoc, pkgconfig }:

let
  goFuseVersion = with stdenv.lib; substring 0 7 (head (filter (
    d: d.goPackagePath == "github.com/hanwen/go-fuse"
  ) (import ./deps.nix))).fetch.rev;
in
buildGoPackage rec {
  pname = "gocryptfs";
  version = "1.7.1";

  goPackagePath = "github.com/rfjakob/gocryptfs";

  nativeBuildInputs = [ pandoc pkgconfig ];
  buildInputs = [ openssl ];

  src = fetchFromGitHub {
    owner = "rfjakob";
    repo = pname;
    rev = "v${version}";
    sha256 = "1zhzhvjhvi6xzib985bsnj9yzp4zsnm91m1679nbab6vm3kanq06";
  };

  postPatch = "rm -r tests";

  buildFlagsArray = ''
    -ldflags=
      -X main.GitVersion=${version}
      -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; {
    description = "Encrypted overlay filesystem written in Go";
    license = licenses.mit;
    homepage = https://nuetzlich.net/gocryptfs/;
    maintainers = with maintainers; [ flokli offline ];
    platforms = platforms.unix;
  };
}