tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
interlock: 2016.04.13 -> 2020.03.05
Azat Bahawi
3 years ago
4ea3d5e6
547a5c5b
+32
-81
2 changed files
expand all
collapse all
unified
split
pkgs
servers
interlock
default.nix
deps.nix
+32
-16
pkgs/servers/interlock/default.nix
···
1
1
-
{ sudo, coreutils, systemd, cryptsetup
2
2
-
, mount, umount
3
3
-
, buildGoPackage, fetchFromGitHub }:
1
1
+
{ lib
2
2
+
, buildGoModule
3
3
+
, fetchFromGitHub
4
4
+
, coreutils
5
5
+
, cryptsetup
6
6
+
, mount
7
7
+
, systemd
8
8
+
, umount
9
9
+
}:
4
10
5
5
-
buildGoPackage rec {
11
11
+
buildGoModule rec {
6
12
pname = "interlock";
7
7
-
version = "2016.04.13";
8
8
-
rev = "v${version}";
9
9
-
10
10
-
goPackagePath = "github.com/inversepath/interlock";
11
11
-
12
12
-
subPackages = [ "./cmd/interlock" ];
13
13
+
version = "2020.03.05";
13
14
14
15
src = fetchFromGitHub {
15
15
-
inherit rev;
16
16
-
owner = "inversepath";
16
16
+
owner = "usbarmory";
17
17
repo = "interlock";
18
18
-
sha256 = "06aqx3jy744yx29xyg8ips0dw16186hfqbxdv3hfrmwxmaxhl4lz";
18
18
+
rev = "v${version}";
19
19
+
sha256 = "sha256-YXa4vErt3YnomTKAXCv8yUVhcc0ST47n9waW5E8QZzY=";
19
20
};
20
21
21
21
-
goDeps = ./deps.nix;
22
22
+
vendorSha256 = "sha256-OL6I95IpyTIc8wCwD9nWxVUTrmZH6COhsd/YwNTyvN0=";
23
23
+
24
24
+
ldflags = [ "-s" "-w" ];
22
25
23
23
-
nativeBuildInputs = [ sudo ];
24
24
-
tags = [ "textsecure" ];
25
26
postPatch = ''
26
27
grep -lr '/s\?bin/' | xargs sed -i \
27
28
-e 's|/bin/mount|${mount}/bin/mount|' \
···
34
35
-e 's|/usr/bin/sudo|/run/wrappers/bin/sudo|' \
35
36
-e 's|/sbin/cryptsetup|${cryptsetup}/bin/cryptsetup|'
36
37
'';
38
38
+
39
39
+
postInstall = ''
40
40
+
mkdir -p $out/share
41
41
+
cp -R $src/static $out/share
42
42
+
'';
43
43
+
44
44
+
# Tests are broken due to an error during key generation.
45
45
+
doCheck = false;
46
46
+
47
47
+
meta = with lib; {
48
48
+
homepage = "https://github.com/usbarmory/interlock";
49
49
+
description = "File encryption tool and an HSM frontend";
50
50
+
license = licenses.gpl3Plus;
51
51
+
platforms = platforms.linux;
52
52
+
};
37
53
}
-65
pkgs/servers/interlock/deps.nix
···
1
1
-
[
2
2
-
{
3
3
-
goPackagePath = "gopkg.in/yaml.v2";
4
4
-
fetch = {
5
5
-
type = "git";
6
6
-
url = "https://gopkg.in/yaml.v2";
7
7
-
rev = "a83829b6f1293c91addabc89d0571c246397bbf4";
8
8
-
sha256 = "1m4dsmk90sbi17571h6pld44zxz7jc4lrnl4f27dpd1l8g5xvjhh";
9
9
-
};
10
10
-
}
11
11
-
{
12
12
-
goPackagePath = "golang.org/x/crypto";
13
13
-
fetch = {
14
14
-
type = "git";
15
15
-
url = "https://go.googlesource.com/crypto";
16
16
-
rev = "575fdbe86e5dd89229707ebec0575ce7d088a4a6";
17
17
-
sha256 = "1kgv1mkw9y404pk3lcwbs0vgl133mwyp294i18jg9hp10s5d56xa";
18
18
-
};
19
19
-
}
20
20
-
{
21
21
-
goPackagePath = "github.com/Sirupsen/logrus";
22
22
-
fetch = {
23
23
-
type = "git";
24
24
-
url = "https://github.com/Sirupsen/logrus";
25
25
-
rev = "be52937128b38f1d99787bb476c789e2af1147f1";
26
26
-
sha256 = "1m6vvd4pg4lwglhk54lv5mf6cc8h7bi0d9zb3gar4crz531r66y4";
27
27
-
};
28
28
-
}
29
29
-
{
30
30
-
goPackagePath = "github.com/agl/ed25519";
31
31
-
fetch = {
32
32
-
type = "git";
33
33
-
url = "https://github.com/agl/ed25519";
34
34
-
rev = "278e1ec8e8a6e017cd07577924d6766039146ced";
35
35
-
sha256 = "165d89cc6dl28j4hkn86pny0jz3sa6hamzdvpvwdj4iha3x6lzc9";
36
36
-
};
37
37
-
}
38
38
-
{
39
39
-
goPackagePath = "github.com/golang/protobuf";
40
40
-
fetch = {
41
41
-
type = "git";
42
42
-
url = "https://github.com/golang/protobuf";
43
43
-
rev = "59b73b37c1e45995477aae817e4a653c89a858db";
44
44
-
sha256 = "1dx22jvhvj34ivpr7gw01fncg9yyx35mbpal4mpgnqka7ajmgjsa";
45
45
-
};
46
46
-
}
47
47
-
{
48
48
-
goPackagePath = "github.com/janimo/textsecure";
49
49
-
fetch = {
50
50
-
type = "git";
51
51
-
url = "https://github.com/janimo/textsecure";
52
52
-
rev = "c38f429e48d6b2776d17b4171f216f132185b0f6";
53
53
-
sha256 = "191pwgfgphr0x04dwpvniax4wilpv52l25bw7d3igvnw302y7i94";
54
54
-
};
55
55
-
}
56
56
-
{
57
57
-
goPackagePath = "golang.org/x/net";
58
58
-
fetch = {
59
59
-
type = "git";
60
60
-
url = "https://go.googlesource.com/net";
61
61
-
rev = "62ac18b461605b4be188bbc7300e9aa2bc836cd4";
62
62
-
sha256 = "0lwwvbbwbf3yshxkfhn6z20gd45dkvnmw2ms36diiy34krgy402p";
63
63
-
};
64
64
-
}
65
65
-
]