Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
51 lines
1.3 KiB
Nix
51 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
php,
|
|
nixosTests,
|
|
nix-update-script,
|
|
dataDir ? "/var/lib/pixelfed",
|
|
runtimeDir ? "/run/pixelfed",
|
|
}:
|
|
|
|
php.buildComposerProject2 (finalAttrs: {
|
|
pname = "pixelfed";
|
|
version = "0.12.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "pixelfed";
|
|
repo = "pixelfed";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-FxJWoFNyIGQ6o9g2Q0/jaBMyeH8UnbTgha2goHAurvY=";
|
|
};
|
|
|
|
vendorHash = "sha256-ciHP6dE42pXupZl4V37RWcHkIZ+xf6cnpwqd3C1dNmQ=";
|
|
|
|
postInstall = ''
|
|
chmod -R u+w $out/share
|
|
mv "$out/share/php/pixelfed"/* $out
|
|
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
|
|
'';
|
|
|
|
passthru = {
|
|
tests = { inherit (nixosTests.pixelfed) standard; };
|
|
updateScript = nix-update-script { };
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Federated image sharing platform";
|
|
license = licenses.agpl3Only;
|
|
homepage = "https://pixelfed.org/";
|
|
maintainers = [ ];
|
|
platforms = php.meta.platforms;
|
|
};
|
|
})
|