nixpkgs-suyu/pkgs/servers/web-apps/pixelfed/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
1.3 KiB
Nix
Raw Normal View History

2022-09-13 18:42:12 +02:00
{ lib
, stdenv
, fetchFromGitHub
, php
, pkgs
2023-03-25 17:02:52 +01:00
, nixosTests
2022-09-13 18:42:12 +02:00
, dataDir ? "/var/lib/pixelfed"
, runtimeDir ? "/run/pixelfed"
}:
let
package = (import ./composition.nix {
inherit pkgs;
inherit (stdenv.hostPlatform) system;
noDev = true; # Disable development dependencies
}).overrideAttrs (attrs : {
installPhase = attrs.installPhase + ''
rm -R $out/bootstrap/cache
# Move static contents for the NixOS module to pick it up, if needed.
mv $out/bootstrap $out/bootstrap-static
mv $out/storage $out/storage-static
ln -s ${dataDir}/.env $out/.env
ln -s ${dataDir}/storage $out/
ln -s ${dataDir}/storage/app/public $out/public/storage
ln -s ${runtimeDir} $out/bootstrap
chmod +x $out/artisan
'';
});
in package.override rec {
pname = "pixelfed";
2023-06-17 19:22:57 +02:00
version = "0.11.8";
2022-09-13 18:42:12 +02:00
src = fetchFromGitHub {
owner = "pixelfed";
repo = pname;
rev = "v${version}";
2023-06-17 19:22:57 +02:00
hash = "sha256-du+xwSrMqt4KIzQRUos6EmVBRp+39gHuoLSRsgLe1CQ=";
2022-09-13 18:42:12 +02:00
};
2023-06-16 00:52:15 +02:00
passthru = {
tests = { inherit (nixosTests) pixelfed; };
updateScript = ./update.sh;
};
2023-03-25 17:02:52 +01:00
2022-09-13 18:42:12 +02:00
meta = with lib; {
description = "A federated image sharing platform";
license = licenses.agpl3Only;
homepage = "https://pixelfed.org/";
maintainers = with maintainers; [ raitobezarius ];
platforms = php.meta.platforms;
};
}