10 , dataDir ? "/var/lib/firefly-iii"
14 pname = "firefly-iii";
17 npmDepsHash = "sha256-/oz0raI0/AV5NamvMWxlUdiQbVsSKHRplsw2/KrMOwg=";
19 src = fetchFromGitHub {
20 owner = "firefly-iii";
23 hash = "sha256-SIvYRmCCzQI+qUr5aA78NQLLmO+EPO1ZEL7vcqJ5puw=";
27 stdenvNoCC.mkDerivation (finalAttrs: {
28 inherit pname src version;
30 buildInputs = [ phpPackage ];
35 buildPackages.npmHooks.npmConfigHook
36 phpPackage.composerHooks.composerInstallHook
37 phpPackage.packages.composer-local-repo-plugin
41 composerNoPlugins = true;
42 composerNoScripts = true;
43 composerStrictValidation = true;
46 vendorHash = "sha256-qps/dWubCVqqvzgSizJJvx2MUzRZKiMeQCnWz08Ft+E=";
48 npmDeps = fetchNpmDeps {
50 name = "${pname}-npm-deps";
54 composerRepository = phpPackage.mkComposerRepository {
62 composerNoPlugins = true;
63 composerNoScripts = true;
64 composerStrictValidation = true;
68 npm run prod --workspace=v1
69 npm run build --workspace=v2
74 tests = nixosTests.firefly-iii;
75 updateScript = nix-update-script { };
79 mv $out/share/php/${pname}/* $out/
80 rm -R $out/share $out/storage $out/bootstrap/cache $out/node_modules
81 ln -s ${dataDir}/storage $out/storage
82 ln -s ${dataDir}/cache $out/bootstrap/cache
86 changelog = "https://github.com/firefly-iii/firefly-iii/releases/tag/v${version}";
87 description = "Firefly III: a personal finances manager";
88 homepage = "https://github.com/firefly-iii/firefly-iii";
89 license = lib.licenses.agpl3Only;
90 maintainers = [ lib.maintainers.savyajha lib.maintainers.patrickdag ];