commit e390c93e88221452d65b5b1244195e228959f5d2 Author: Félix Baylac-Jacqué Date: Fri Sep 25 08:33:44 2020 +0200 pleroma-otp: init at 2.1.2 diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..bb3e634 --- /dev/null +++ b/default.nix @@ -0,0 +1,40 @@ +{ pkgs ? import {} }: + +pkgs.stdenv.mkDerivation { + pname = "pleroma"; + 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"; + }; + + buildInputs = [ + pkgs.autoPatchelfHook + pkgs.makeWrapper + pkgs.ncurses + pkgs.openssl + pkgs.unzip + pkgs.zlib + ]; + + # mkDerivation fails to detect the zip nature of $src :/ + # Let's unpack the archive explicitely. + unpackPhase = "unzip $src"; + installPhase = '' + mkdir $out + # Let's copy everything but the bin folder + cp -r release/* $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 + wrapProgram $out/bin/pleroma \ + --set-default RELEASE_TMP "/tmp" + wrapProgram $out/bin/pleroma \ + --set-default RELEASE_TMP "/tmp"''; + +} diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..a9f5ca5 --- /dev/null +++ b/readme.md @@ -0,0 +1,13 @@ +# Pleroma on NixOS: OTP Release + +## TODO + +- Add NixOS module. + +## Minor Annoyances + +We're retrieving the binary distribution directly from the GitLab CI pipeline. + +To find the latest and greatest bindist stable URL, you have to visit +https://git.pleroma.social/pleroma/pleroma/-/tree/stable, clicky click +on the CI status and find the amd64 release link.