You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.4 KiB

{ 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 ];
};
}