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
86 lines
2.1 KiB
Nix
86 lines
2.1 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
stdenvNoCC,
|
|
nodejs,
|
|
fetchNpmDeps,
|
|
buildPackages,
|
|
php84,
|
|
nixosTests,
|
|
nix-update-script,
|
|
dataDir ? "/var/lib/firefly-iii",
|
|
}:
|
|
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
|
pname = "firefly-iii";
|
|
version = "6.4.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "firefly-iii";
|
|
repo = "firefly-iii";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-nGXFFGVw0TCXSBwMExk6wn0Es0HwCnY4P+nbJki+R6A=";
|
|
};
|
|
|
|
buildInputs = [ php84 ];
|
|
|
|
nativeBuildInputs = [
|
|
nodejs
|
|
nodejs.python
|
|
buildPackages.npmHooks.npmConfigHook
|
|
php84.composerHooks2.composerInstallHook
|
|
];
|
|
|
|
composerVendor = php84.mkComposerVendor {
|
|
inherit (finalAttrs) pname src version;
|
|
composerNoDev = true;
|
|
composerNoPlugins = true;
|
|
composerNoScripts = true;
|
|
composerStrictValidation = true;
|
|
strictDeps = true;
|
|
vendorHash = "sha256-siLLtF/B2eNsRaazq5zOXnFeFPlEeoSAIXYKEsrHv28=";
|
|
};
|
|
|
|
npmDeps = fetchNpmDeps {
|
|
inherit (finalAttrs) src;
|
|
name = "${finalAttrs.pname}-npm-deps";
|
|
hash = "sha256-WV1MsCbYxEHUEw0yYqD8b9jracyLVbpndWuHY0ZbaEM=";
|
|
};
|
|
|
|
preInstall = ''
|
|
npm run prod --workspace=v1
|
|
npm run build --workspace=v2
|
|
'';
|
|
|
|
passthru = {
|
|
phpPackage = php84;
|
|
tests = nixosTests.firefly-iii;
|
|
updateScript = nix-update-script {
|
|
extraArgs = [
|
|
"--version-regex"
|
|
"v(\\d+\\.\\d+\\.\\d+)"
|
|
];
|
|
};
|
|
};
|
|
|
|
postInstall = ''
|
|
chmod -R u+w $out/share
|
|
mv $out/share/php/firefly-iii/* $out/
|
|
rm -R $out/share $out/storage $out/bootstrap/cache $out/node_modules
|
|
ln -s ${dataDir}/storage $out/storage
|
|
ln -s ${dataDir}/cache $out/bootstrap/cache
|
|
'';
|
|
|
|
meta = {
|
|
changelog = "https://github.com/firefly-iii/firefly-iii/releases/tag/v${finalAttrs.version}";
|
|
description = "Firefly III: a personal finances manager";
|
|
homepage = "https://github.com/firefly-iii/firefly-iii";
|
|
license = lib.licenses.agpl3Only;
|
|
maintainers = [
|
|
lib.maintainers.savyajha
|
|
lib.maintainers.patrickdag
|
|
];
|
|
hydraPlatforms = lib.platforms.linux; # build hangs on both Darwin platforms, needs investigation
|
|
};
|
|
})
|