diff options
| author | Mel <einebeere@gmail.com> | 2024-12-04 04:31:55 +0100 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2024-12-04 04:31:55 +0100 |
| commit | c5364de431203671106fd7e66a27a4c1e932c1f3 (patch) | |
| tree | e425cb12a307582a440611513c63635a2541a5b8 /pkgs/bluesky/pdsadmin/package.nix | |
| parent | fa964a8d1ab2dc83386f457b51b2de87b68cbe70 (diff) | |
| download | network-c5364de431203671106fd7e66a27a4c1e932c1f3.tar.zst network-c5364de431203671106fd7e66a27a4c1e932c1f3.zip | |
Host bare-bones Bluesky PDS service
Signed-off-by: Mel <einebeere@gmail.com>
Diffstat (limited to 'pkgs/bluesky/pdsadmin/package.nix')
| -rw-r--r-- | pkgs/bluesky/pdsadmin/package.nix | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/pkgs/bluesky/pdsadmin/package.nix b/pkgs/bluesky/pdsadmin/package.nix new file mode 100644 index 0000000..ba204f4 --- /dev/null +++ b/pkgs/bluesky/pdsadmin/package.nix @@ -0,0 +1,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"; + }; +}) |
