feat: firefly build from source
This commit is contained in:
parent
240ba11c28
commit
b27591a97d
|
@ -16,9 +16,9 @@
|
||||||
mkDefault
|
mkDefault
|
||||||
;
|
;
|
||||||
|
|
||||||
package = cfg.package.override {
|
package = "${cfg.package.override {
|
||||||
inherit (cfg) dataDir;
|
inherit (cfg) dataDir;
|
||||||
};
|
}}/share/php/firefly-iii";
|
||||||
in {
|
in {
|
||||||
options.services.firefly-iii = {
|
options.services.firefly-iii = {
|
||||||
enable = mkEnableOption "firefly-iii";
|
enable = mkEnableOption "firefly-iii";
|
||||||
|
|
|
@ -1,20 +1,25 @@
|
||||||
{
|
{
|
||||||
stdenv,
|
|
||||||
lib,
|
lib,
|
||||||
fetchurl,
|
|
||||||
dataDir ? "/var/lib/firefly-iii",
|
dataDir ? "/var/lib/firefly-iii",
|
||||||
|
php83,
|
||||||
|
fetchFromGitHub,
|
||||||
|
buildNpmPackage,
|
||||||
}: let
|
}: let
|
||||||
version = "6.1.13";
|
version = "6.1.13";
|
||||||
src = fetchurl {
|
src = fetchFromGitHub {
|
||||||
url = "https://github.com/firefly-iii/firefly-iii/releases/download/v${version}/FireflyIII-v${version}.tar.gz";
|
owner = "firefly-iii";
|
||||||
hash = "sha256-uQzk3pgdZ0baqmBouHfcuzrymwrsDy6b4IwSY3br6f0=";
|
repo = "firefly-iii";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-85zI8uCyyoCflzxDkvba6FWa9B3kh179DJfQ2Um6MGM=";
|
||||||
};
|
};
|
||||||
in
|
frontend = buildNpmPackage {
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
inherit src version;
|
inherit src version;
|
||||||
pname = "firefly-iii";
|
pname = "firefly-iii";
|
||||||
sourceRoot = ".";
|
npmDepsHash = "sha256-wuPUE6XuzzgKjpxZVgwh2wGut15M61WSBFG+YIZwOFM=";
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
mkdir -p $out
|
||||||
|
rm -rf ./node_modules
|
||||||
|
cp -r ./ $out
|
||||||
mkdir -p $out/storage
|
mkdir -p $out/storage
|
||||||
cp -r ./ $out
|
cp -r ./ $out
|
||||||
rm -Rf $out/storage
|
rm -Rf $out/storage
|
||||||
|
@ -22,6 +27,13 @@ in
|
||||||
rm -Rf $out/bootstrap/cache
|
rm -Rf $out/bootstrap/cache
|
||||||
ln -fs ${dataDir}/bootstrap/cache $out/bootstrap/cache
|
ln -fs ${dataDir}/bootstrap/cache $out/bootstrap/cache
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
|
php83.buildComposerProject rec {
|
||||||
|
inherit version;
|
||||||
|
src = frontend;
|
||||||
|
pname = "firefly-iii";
|
||||||
|
vendorHash = "sha256-CVGKyyLp5hjjpEulDNEYfljU4OgPBaFcYQQAUf6GeGs=";
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Firefly III: a personal finances manager";
|
description = "Firefly III: a personal finances manager";
|
||||||
|
|
Loading…
Reference in a new issue