gocryptfs: switch buildGoPackage to buildGoModule

This commit is contained in:
Pavol Rusnak 2020-09-13 14:07:37 +02:00
parent 5f4b381527
commit 2b27d94f01
No known key found for this signature in database
GPG key ID: 91F3B339B9A02A3D
2 changed files with 19 additions and 93 deletions

View file

@ -1,20 +1,15 @@
# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
{ stdenv, buildGoPackage, fetchFromGitHub, openssl, pandoc, pkgconfig }:
{ stdenv
, buildGoModule
, fetchFromGitHub
, openssl
, pandoc
, pkg-config
}:
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 {
buildGoModule rec {
pname = "gocryptfs";
version = "1.8.0";
goPackagePath = "github.com/rfjakob/gocryptfs";
nativeBuildInputs = [ pandoc pkgconfig ];
buildInputs = [ openssl ];
src = fetchFromGitHub {
owner = "rfjakob";
repo = pname;
@ -22,21 +17,27 @@ buildGoPackage rec {
sha256 = "1acalwrr5xqhpqca3gypj0s68w6vpckxmg5z5gfgh8wx6nqx4aw9";
};
postPatch = "rm -r tests";
runVend = true;
vendorSha256 = "0z3y51sgr1rmr23jpc5h5d5lw14p3qzv48rc7zj7qa4rd5cfhsgi";
nativeBuildInputs = [ pandoc pkg-config ];
buildInputs = [ openssl ];
buildFlagsArray = ''
-ldflags=
-X main.GitVersion=${version}
-X main.GitVersionFuse=${goFuseVersion}
-X main.GitVersionFuse=[vendored]
-X main.BuildDate=unknown
'';
goDeps = ./deps.nix;
subPackages = [ "." "gocryptfs-xray" "contrib/statfs" ];
postBuild = ''
pushd go/src/github.com/rfjakob/gocryptfs/Documentation/
pushd 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
pandoc MANPAGE-STATFS.md -s -t man -o $out/share/man/man1/statfs.1
popd
'';
@ -44,7 +45,7 @@ buildGoPackage rec {
description = "Encrypted overlay filesystem written in Go";
license = licenses.mit;
homepage = "https://nuetzlich.net/gocryptfs/";
maintainers = with maintainers; [ flokli offline ];
maintainers = with maintainers; [ flokli offline prusnak ];
platforms = platforms.unix;
};
}

View file

@ -1,75 +0,0 @@
# file generated from Gopkg.lock using dep2nix (https://github.com/nixcloud/dep2nix)
[
{
goPackagePath = "github.com/hanwen/go-fuse";
fetch = {
type = "git";
url = "https://github.com/hanwen/go-fuse";
rev = "161a164844568ebf4bfaa68c90ba3a9f2914dda4";
sha256 = "1r0rs76k9zg60i02jlcqxi7m4ivla1xwv3ijwav7pfbyyr1yqhsx";
};
}
{
goPackagePath = "github.com/jacobsa/crypto";
fetch = {
type = "git";
url = "https://github.com/jacobsa/crypto";
rev = "9f44e2d11115452dad8f404f029574422855f46a";
sha256 = "18c3cx8izxdajq22zdq0n19j9d2l6iickd3mz39j5h96kw7l5qmy";
};
}
{
goPackagePath = "github.com/pkg/xattr";
fetch = {
type = "git";
url = "https://github.com/pkg/xattr";
rev = "7782c2d6871d6e659e1563dc19c86b845264a6fc";
sha256 = "1j3z5b9nwgkxia925rkiq8n5avhf4zhmsdbpn2s3xb16a2w66prd";
};
}
{
goPackagePath = "github.com/rfjakob/eme";
fetch = {
type = "git";
url = "https://github.com/rfjakob/eme";
rev = "2222dbd4ba467ab3fc7e8af41562fcfe69c0d770";
sha256 = "0c227ly3z8pqaqg22lpd8nzgqrfsbjx5gi9rp9ks1cmd11dv2gl9";
};
}
{
goPackagePath = "github.com/sabhiram/go-gitignore";
fetch = {
type = "git";
url = "https://github.com/sabhiram/go-gitignore";
rev = "d3107576ba9425fc1c85f4b3569c4631b805a02e";
sha256 = "1rdwyxgcsiwgmlqnc3k6h300mzlvjc3j21np4yh1h476wc8dvl0l";
};
}
{
goPackagePath = "golang.org/x/crypto";
fetch = {
type = "git";
url = "https://go.googlesource.com/crypto";
rev = "a1f597ede03a7bef967a422b5b3a5bd08805a01e";
sha256 = "0yiczljll72ip2vkxgd6052rhpaba37a68vf6si3v8s8s3g870lc";
};
}
{
goPackagePath = "golang.org/x/sync";
fetch = {
type = "git";
url = "https://go.googlesource.com/sync";
rev = "e225da77a7e68af35c70ccbf71af2b83e6acac3c";
sha256 = "0bh3583smcfw6jw3w6lp0za93rz7hpxfdz8vhxng75b7a6vdlw4p";
};
}
{
goPackagePath = "golang.org/x/sys";
fetch = {
type = "git";
url = "https://go.googlesource.com/sys";
rev = "61b9204099cb1bebc803c9ffb9b2d3acd9d457d9";
sha256 = "110carnw1rxk9awbcdbg5is0zl28vynm649y7rza36pg1vlv8rrh";
};
}
]