2021-01-30 11:19:29 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-11-07 18:41:44 +01:00
|
|
|
, autoPatchelfHook
|
|
|
|
, fetchurl
|
|
|
|
, file
|
|
|
|
, makeWrapper
|
|
|
|
, ncurses
|
|
|
|
, nixosTests
|
|
|
|
, openssl
|
|
|
|
, unzip
|
|
|
|
, zlib
|
|
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "pleroma-otp";
|
2021-03-04 12:40:01 +01:00
|
|
|
version = "2.3.0";
|
2020-11-07 18:41:44 +01:00
|
|
|
|
|
|
|
# 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
|
|
|
|
src = {
|
|
|
|
aarch64-linux = fetchurl {
|
2021-03-04 12:40:01 +01:00
|
|
|
url = "https://git.pleroma.social/pleroma/pleroma/-/jobs/182392/artifacts/download";
|
|
|
|
sha256 = "1drpd6xh7m2damxi5impb8jwvjl6m3qv5yxynl12i8g66vi3rbwf";
|
2020-11-07 18:41:44 +01:00
|
|
|
};
|
|
|
|
x86_64-linux = fetchurl {
|
2021-03-04 12:40:01 +01:00
|
|
|
url = "https://git.pleroma.social/pleroma/pleroma/-/jobs/182388/artifacts/download";
|
|
|
|
sha256 = "0glr0iiqmylwwsn5r946yqr9kx97j2zznrc0imyxm3j0vhz8xzl4";
|
2020-11-07 18:41:44 +01:00
|
|
|
};
|
|
|
|
}."${stdenv.hostPlatform.system}";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ unzip ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
autoPatchelfHook
|
|
|
|
file
|
|
|
|
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"'';
|
|
|
|
|
2020-11-08 15:10:14 +01:00
|
|
|
passthru.tests = {
|
|
|
|
pleroma = nixosTests.pleroma;
|
|
|
|
};
|
|
|
|
|
2021-01-30 11:19:29 +01:00
|
|
|
meta = with lib; {
|
2020-11-07 18:41:44 +01:00
|
|
|
description = "ActivityPub microblogging server";
|
|
|
|
homepage = https://git.pleroma.social/pleroma/pleroma;
|
2021-01-30 11:19:29 +01:00
|
|
|
license = licenses.agpl3;
|
|
|
|
maintainers = with maintainers; [ ninjatrappeur ];
|
2020-11-07 18:41:44 +01:00
|
|
|
platforms = [ "x86_64-linux" "aarch64-linux" ];
|
|
|
|
};
|
|
|
|
}
|