tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
pam_ussh: init at unstable-20210615
Luke Granger-Brown
3 years ago
f63d93bc
12769bc7
+81
3 changed files
expand all
collapse all
unified
split
pkgs
os-specific
linux
pam_ussh
default.nix
go.mod
top-level
all-packages.nix
+64
pkgs/os-specific/linux/pam_ussh/default.nix
···
1
1
+
{ buildGoModule
2
2
+
, fetchFromGitHub
3
3
+
, pam
4
4
+
, lib
5
5
+
}:
6
6
+
7
7
+
buildGoModule rec {
8
8
+
pname = "pam_ussh";
9
9
+
version = "unstable-20210615";
10
10
+
11
11
+
src = fetchFromGitHub {
12
12
+
owner = "uber";
13
13
+
repo = "pam-ussh";
14
14
+
rev = "e9524bda90ba19d3b9eb24f49cb63a6a56a19193"; # HEAD as of 2022-03-13
15
15
+
sha256 = "0nb9hpqbghgi3zvq41kabydzyc6ffaaw9b4jkc5jrwn1klpw1xk8";
16
16
+
};
17
17
+
18
18
+
prePatch = ''
19
19
+
cp ${./go.mod} go.mod
20
20
+
'';
21
21
+
overrideModAttrs = (_: {
22
22
+
inherit prePatch;
23
23
+
});
24
24
+
25
25
+
vendorSha256 = "0hjifc3kbwmx7kjn858vi05cwwra6q19cqjfd94k726pwhk37qkw";
26
26
+
27
27
+
buildInputs = [
28
28
+
pam
29
29
+
];
30
30
+
31
31
+
buildPhase = ''
32
32
+
runHook preBuild
33
33
+
34
34
+
if [ -z "$enableParallelBuilding" ]; then
35
35
+
export NIX_BUILD_CORES=1
36
36
+
fi
37
37
+
go build -buildmode=c-shared -o pam_ussh.so -v -p $NIX_BUILD_CORES .
38
38
+
39
39
+
runHook postBuild
40
40
+
'';
41
41
+
checkPhase = ''
42
42
+
runHook preCheck
43
43
+
44
44
+
go test -v -p $NIX_BUILD_CORES .
45
45
+
46
46
+
runHook postCheck
47
47
+
'';
48
48
+
installPhase = ''
49
49
+
runHook preInstall
50
50
+
51
51
+
mkdir -p $out/lib/security
52
52
+
cp pam_ussh.so $out/lib/security
53
53
+
54
54
+
runHook postInstall
55
55
+
'';
56
56
+
57
57
+
meta = with lib; {
58
58
+
homepage = "https://github.com/uber/pam-ussh";
59
59
+
description = "PAM module to authenticate using SSH certificates";
60
60
+
license = licenses.mit;
61
61
+
platforms = platforms.linux;
62
62
+
maintainers = with maintainers; [ lukegb ];
63
63
+
};
64
64
+
}
+15
pkgs/os-specific/linux/pam_ussh/go.mod
···
1
1
+
module github.com/uber/pam-ussh
2
2
+
3
3
+
go 1.17
4
4
+
5
5
+
require (
6
6
+
github.com/stretchr/testify v1.7.0
7
7
+
golang.org/x/crypto v0.0.0-20220313003712-b769efc7c000
8
8
+
)
9
9
+
10
10
+
require (
11
11
+
github.com/davecgh/go-spew v1.1.0 // indirect
12
12
+
github.com/pmezard/go-difflib v1.0.0 // indirect
13
13
+
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 // indirect
14
14
+
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
15
15
+
)
+2
pkgs/top-level/all-packages.nix
···
23052
23052
23053
23053
pam_usb = callPackage ../os-specific/linux/pam_usb { };
23054
23054
23055
23055
+
pam_ussh = callPackage ../os-specific/linux/pam_ussh { };
23056
23056
+
23055
23057
paxctl = callPackage ../os-specific/linux/paxctl { };
23056
23058
23057
23059
paxtest = callPackage ../os-specific/linux/paxtest { };