blob: ba204f4df24ce8befc84809d6c7f54967e1e9d34 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# See: https://github.com/NixOS/nixpkgs/pull/350645
{
stdenvNoCC,
fetchFromGitHub,
bash,
pds,
makeWrapper,
jq,
curl,
openssl,
lib,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "pdsadmin";
inherit (pds) version src;
patches = [ ./pdsadmin-offline.patch ];
nativeBuildInputs = [
bash
makeWrapper
];
buildPhase = ''
runHook preBuild
patchShebangs . pdsadmin
substituteInPlace pdsadmin.sh \
--replace-fail NIXPKGS_PDSADMIN_ROOT $out
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/lib/pds
install -Dm755 pdsadmin.sh $out/lib/pds
install -Dm755 pdsadmin/*.sh $out/lib/pds
makeWrapper "$out/lib/pds/pdsadmin.sh" "$out/bin/pdsadmin" \
--prefix PATH : "${
lib.makeBinPath [
jq
curl
openssl
]
}"
runHook postInstall
'';
meta = {
description = "Admin scripts for Bluesky Personal Data Server (PDS)";
homepage = "https://github.com/bluesky-social/pds";
license = with lib.licenses; [
mit
asl20
];
platforms = lib.platforms.unix;
mainProgram = "pdsadmin";
};
})
|