git.iko.soy/typeable/nixpkgs
on master help sign in
gocryptfs: switch buildGoPackage to buildGoModule
commit2b27d94f016796f3f0ac6f79f618505be990ead5 authorPavol Rusnak <pavol@rusnak.io> dateSun 13 Sep 2020, 14:07 (6 years ago) parent5f4b381
2 files changed+20−94
pkgs/tools/filesystems/gocryptfs/default.nix+20−19 pkgs/tools/filesystems/gocryptfs/deps.nix−75
pkgs/tools/filesystems/gocryptfs/default.nix+20−19
@@ -1,20 +1,15 @@
1−# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
2−{ stdenv, buildGoPackage, fetchFromGitHub, openssl, pandoc, pkgconfig }:
3−
4−let
5− goFuseVersion = with stdenv.lib; substring 0 7 (head (filter (
6− d: d.goPackagePath == "github.com/hanwen/go-fuse"
7− ) (import ./deps.nix))).fetch.rev;
8−in
9−buildGoPackage rec {
1+{ stdenv
2+, buildGoModule
3+, fetchFromGitHub
4+, openssl
5+, pandoc
6+, pkg-config
7+}:
8+
9+buildGoModule rec {
1010 pname = "gocryptfs";
1111 version = "1.8.0";
1212
13− goPackagePath = "github.com/rfjakob/gocryptfs";
14−
15− nativeBuildInputs = [ pandoc pkgconfig ];
16− buildInputs = [ openssl ];
17−
1813 src = fetchFromGitHub {
1914 owner = "rfjakob";
2015 repo = pname;
@@ -22,21 +17,27 @@ buildGoPackage rec {
2217 sha256 = "1acalwrr5xqhpqca3gypj0s68w6vpckxmg5z5gfgh8wx6nqx4aw9";
2318 };
2419
25− postPatch = "rm -r tests";
20+ runVend = true;
21+ vendorSha256 = "0z3y51sgr1rmr23jpc5h5d5lw14p3qzv48rc7zj7qa4rd5cfhsgi";
22+
23+ nativeBuildInputs = [ pandoc pkg-config ];
24+ buildInputs = [ openssl ];
2625
2726 buildFlagsArray = ''
2827 -ldflags=
2928 -X main.GitVersion=${version}
30− -X main.GitVersionFuse=${goFuseVersion}
29+ -X main.GitVersionFuse=[vendored]
30+ -X main.BuildDate=unknown
3131 '';
3232
33− goDeps = ./deps.nix;
33+ subPackages = [ "." "gocryptfs-xray" "contrib/statfs" ];
3434
3535 postBuild = ''
36− pushd go/src/github.com/rfjakob/gocryptfs/Documentation/
36+ pushd Documentation/
3737 mkdir -p $out/share/man/man1
3838 pandoc MANPAGE.md -s -t man -o $out/share/man/man1/gocryptfs.1
3939 pandoc MANPAGE-XRAY.md -s -t man -o $out/share/man/man1/gocryptfs-xray.1
40+ pandoc MANPAGE-STATFS.md -s -t man -o $out/share/man/man1/statfs.1
4041 popd
4142 '';
4243
@@ -44,7 +45,7 @@ buildGoPackage rec {
4445 description = "Encrypted overlay filesystem written in Go";
4546 license = licenses.mit;
4647 homepage = "https://nuetzlich.net/gocryptfs/";
47− maintainers = with maintainers; [ flokli offline ];
48+ maintainers = with maintainers; [ flokli offline prusnak ];
4849 platforms = platforms.unix;
4950 };
5051}
pkgs/tools/filesystems/gocryptfs/deps.nixdeleted−75
@@ -1,75 +0,0 @@
1−# file generated from Gopkg.lock using dep2nix (https://github.com/nixcloud/dep2nix)
2−[
3− {
4− goPackagePath = "github.com/hanwen/go-fuse";
5− fetch = {
6− type = "git";
7− url = "https://github.com/hanwen/go-fuse";
8− rev = "161a164844568ebf4bfaa68c90ba3a9f2914dda4";
9− sha256 = "1r0rs76k9zg60i02jlcqxi7m4ivla1xwv3ijwav7pfbyyr1yqhsx";
10− };
11− }
12− {
13− goPackagePath = "github.com/jacobsa/crypto";
14− fetch = {
15− type = "git";
16− url = "https://github.com/jacobsa/crypto";
17− rev = "9f44e2d11115452dad8f404f029574422855f46a";
18− sha256 = "18c3cx8izxdajq22zdq0n19j9d2l6iickd3mz39j5h96kw7l5qmy";
19− };
20− }
21− {
22− goPackagePath = "github.com/pkg/xattr";
23− fetch = {
24− type = "git";
25− url = "https://github.com/pkg/xattr";
26− rev = "7782c2d6871d6e659e1563dc19c86b845264a6fc";
27− sha256 = "1j3z5b9nwgkxia925rkiq8n5avhf4zhmsdbpn2s3xb16a2w66prd";
28− };
29− }
30− {
31− goPackagePath = "github.com/rfjakob/eme";
32− fetch = {
33− type = "git";
34− url = "https://github.com/rfjakob/eme";
35− rev = "2222dbd4ba467ab3fc7e8af41562fcfe69c0d770";
36− sha256 = "0c227ly3z8pqaqg22lpd8nzgqrfsbjx5gi9rp9ks1cmd11dv2gl9";
37− };
38− }
39− {
40− goPackagePath = "github.com/sabhiram/go-gitignore";
41− fetch = {
42− type = "git";
43− url = "https://github.com/sabhiram/go-gitignore";
44− rev = "d3107576ba9425fc1c85f4b3569c4631b805a02e";
45− sha256 = "1rdwyxgcsiwgmlqnc3k6h300mzlvjc3j21np4yh1h476wc8dvl0l";
46− };
47− }
48− {
49− goPackagePath = "golang.org/x/crypto";
50− fetch = {
51− type = "git";
52− url = "https://go.googlesource.com/crypto";
53− rev = "a1f597ede03a7bef967a422b5b3a5bd08805a01e";
54− sha256 = "0yiczljll72ip2vkxgd6052rhpaba37a68vf6si3v8s8s3g870lc";
55− };
56− }
57− {
58− goPackagePath = "golang.org/x/sync";
59− fetch = {
60− type = "git";
61− url = "https://go.googlesource.com/sync";
62− rev = "e225da77a7e68af35c70ccbf71af2b83e6acac3c";
63− sha256 = "0bh3583smcfw6jw3w6lp0za93rz7hpxfdz8vhxng75b7a6vdlw4p";
64− };
65− }
66− {
67− goPackagePath = "golang.org/x/sys";
68− fetch = {
69− type = "git";
70− url = "https://go.googlesource.com/sys";
71− rev = "61b9204099cb1bebc803c9ffb9b2d3acd9d457d9";
72− sha256 = "110carnw1rxk9awbcdbg5is0zl28vynm649y7rza36pg1vlv8rrh";
73− };
74− }
75−]