about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/filesystems/gocryptfs/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/filesystems/gocryptfs/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/filesystems/gocryptfs/default.nix50
1 files changed, 50 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/filesystems/gocryptfs/default.nix b/nixpkgs/pkgs/tools/filesystems/gocryptfs/default.nix
new file mode 100644
index 000000000000..8491bf20e8f1
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/gocryptfs/default.nix
@@ -0,0 +1,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;
+  };
+}