Browse Source

pleroma-otp: init at 2.1.2

master
Félix Baylac-Jacqué 2 years ago
commit
5eecc65335
Signed by: NinjaTrappeur
GPG Key ID: EFD315F31848DBA4
  1. 49
      default.nix

49
default.nix

@ -0,0 +1,49 @@
{ pkgs ? import <nixpkgs> {}, stdenv ? (import <nixpkgs> {}).stdenv }:
stdenv.mkDerivation {
pname = "pleroma-otp";
version = "2.1.2";
src = pkgs.fetchurl {
# To find the latest binary release stable link, have a look at
# the CI pipeline for the latest commit of the stable branch
# https://git.pleroma.social/pleroma/pleroma/-/tree/stable
url = "https://git.pleroma.social/pleroma/pleroma/-/jobs/154862/artifacts/download";
sha256 = "16352ail4w1v0im5w1aq0z4lb1k85qa2qrr44pq12h0l6m05bc0z";
};
nativeBuildInputs = [ pkgs.unzip ];
buildInputs = with pkgs; [
autoPatchelfHook
makeWrapper
ncurses
openssl
zlib
];
# mkDerivation fails to detect the zip nature of $src due to the
# missing .zip extension.
# Let's unpack the archive explicitely.
unpackCmd = "unzip $curSrc";
installPhase = ''
mkdir $out
cp -r * $out'';
# Pleroma is using the project's root path (here the store path)
# as its TMPDIR.
# Patching it to move the tmp dir to the actual tmpdir
postFixup = ''
wrapProgram $out/bin/pleroma \
--set-default RELEASE_TMP "/tmp"
wrapProgram $out/bin/pleroma_ctl \
--set-default RELEASE_TMP "/tmp"'';
meta = {
description = "ActivityPub microblogging server";
homepage = https://git.pleroma.social/pleroma/pleroma;
license = stdenv.lib.licenses.agpl3;
maintainers = with stdenv.lib.maintainers; [ ninjatrappeur ];
};
}
Loading…
Cancel
Save