mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 13:30:36 +00:00
[Backport release-26.05] firefly-iii: 6.6.6 -> 6.7.6 (#569136)
This commit is contained in:
@@ -12,7 +12,7 @@ in
|
||||
};
|
||||
|
||||
nodes.fireflySqlite =
|
||||
{ config, ... }:
|
||||
{ ... }:
|
||||
{
|
||||
environment.etc = {
|
||||
"firefly-iii-appkey".text = app-key;
|
||||
@@ -29,7 +29,7 @@ in
|
||||
};
|
||||
|
||||
nodes.fireflyPostgresql =
|
||||
{ config, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.etc = {
|
||||
"firefly-iii-appkey".text = app-key;
|
||||
@@ -67,7 +67,7 @@ in
|
||||
};
|
||||
|
||||
nodes.fireflyMysql =
|
||||
{ config, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.etc = {
|
||||
"firefly-iii-appkey".text = app-key;
|
||||
@@ -100,21 +100,40 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
fireflySqlite.wait_for_unit("phpfpm-firefly-iii.service")
|
||||
fireflySqlite.wait_for_unit("nginx.service")
|
||||
fireflySqlite.succeed("curl -fvvv -Ls http://localhost/ | grep 'Firefly III'")
|
||||
fireflySqlite.succeed("curl -fvvv -Ls http://localhost/v1/js/app.js")
|
||||
fireflySqlite.succeed("systemctl start firefly-iii-cron.service")
|
||||
fireflyPostgresql.wait_for_unit("phpfpm-firefly-iii.service")
|
||||
fireflyPostgresql.wait_for_unit("nginx.service")
|
||||
fireflyPostgresql.wait_for_unit("postgresql.target")
|
||||
fireflyPostgresql.succeed("curl -fvvv -Ls http://localhost/ | grep 'Firefly III'")
|
||||
fireflyPostgresql.succeed("systemctl start firefly-iii-cron.service")
|
||||
fireflyMysql.wait_for_unit("phpfpm-firefly-iii.service")
|
||||
fireflyMysql.wait_for_unit("nginx.service")
|
||||
fireflyMysql.wait_for_unit("mysql.service")
|
||||
fireflyMysql.succeed("curl -fvvv -Ls http://localhost/ | grep 'Firefly III'")
|
||||
fireflyMysql.succeed("systemctl start firefly-iii-cron.service")
|
||||
'';
|
||||
testScript =
|
||||
let
|
||||
checkCron = node: ''
|
||||
${node}.succeed(
|
||||
"curl -fsS -c /tmp/jar -b /tmp/jar -o /tmp/register.html http://localhost/register",
|
||||
"grep -oP 'name=\"_token\" value=\"\\K[^\"]+' /tmp/register.html | tr -d '\\n' > /tmp/token",
|
||||
)
|
||||
redirect = ${node}.succeed(
|
||||
"curl -fsS -c /tmp/jar -b /tmp/jar -o /dev/null -w '%{redirect_url}' http://localhost/register"
|
||||
+ " --data-urlencode _token@/tmp/token"
|
||||
+ " --data-urlencode email=test@example.com"
|
||||
+ " --data-urlencode password=TestTestTestTest1"
|
||||
+ " --data-urlencode password_confirmation=TestTestTestTest1"
|
||||
)
|
||||
# A failed registration redirects back to the form.
|
||||
assert "register" not in redirect, f"registration failed, redirected to {redirect}"
|
||||
${node}.succeed("systemctl start firefly-iii-cron.service")
|
||||
'';
|
||||
in
|
||||
''
|
||||
fireflySqlite.wait_for_unit("phpfpm-firefly-iii.service")
|
||||
fireflySqlite.wait_for_unit("nginx.service")
|
||||
fireflySqlite.succeed("curl -fvvv -Ls http://localhost/ | grep 'Firefly III'")
|
||||
fireflySqlite.succeed("curl -fvvv -Ls http://localhost/build/manifest.json")
|
||||
${checkCron "fireflySqlite"}
|
||||
fireflyPostgresql.wait_for_unit("phpfpm-firefly-iii.service")
|
||||
fireflyPostgresql.wait_for_unit("nginx.service")
|
||||
fireflyPostgresql.wait_for_unit("postgresql.target")
|
||||
fireflyPostgresql.succeed("curl -fvvv -Ls http://localhost/ | grep 'Firefly III'")
|
||||
${checkCron "fireflyPostgresql"}
|
||||
fireflyMysql.wait_for_unit("phpfpm-firefly-iii.service")
|
||||
fireflyMysql.wait_for_unit("nginx.service")
|
||||
fireflyMysql.wait_for_unit("mysql.service")
|
||||
fireflyMysql.succeed("curl -fvvv -Ls http://localhost/ | grep 'Firefly III'")
|
||||
${checkCron "fireflyMysql"}
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
}:
|
||||
let
|
||||
php = php85;
|
||||
version = "6.6.6";
|
||||
version = "6.7.6";
|
||||
|
||||
# Release tarball contains translations downloaded from crowdin
|
||||
releaseTarball = fetchzip {
|
||||
@@ -25,12 +25,13 @@ in
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "firefly-iii";
|
||||
inherit version;
|
||||
__structuredAttrs = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "firefly-iii";
|
||||
repo = "firefly-iii";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-OfdMx0qiEszFRsgZlF7KILLNA+XBzcD4c2oWIzdIGfk=";
|
||||
hash = "sha256-v9Bfd8bQemO4jkLg+KHLkjJupqOKoa+7wh19hzdxKeQ=";
|
||||
};
|
||||
|
||||
buildInputs = [ php ];
|
||||
@@ -48,18 +49,17 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
inherit (finalAttrs) pname src version;
|
||||
composerStrictValidation = true;
|
||||
strictDeps = true;
|
||||
vendorHash = "sha256-pdgXnNTE3iQ/v6t23nc7FojvVbB74W1AhiP7Z1XACUA=";
|
||||
vendorHash = "sha256-Ne0twRNAuTx9wJOEa2bvEIuBNkChveg/9YAMR33PNhQ=";
|
||||
};
|
||||
|
||||
npmDeps = fetchNpmDeps {
|
||||
inherit (finalAttrs) src;
|
||||
name = "${finalAttrs.pname}-${finalAttrs.version}-npm-deps";
|
||||
hash = "sha256-7RvuwFI7NrPwjkS0Lz56ItcHAPt2Sp3iarod+FrNon0=";
|
||||
hash = "sha256-JEpMwD18zCccRKLw7S3tfBrwLd/RcSbf7SOM0Y9sN8k=";
|
||||
};
|
||||
|
||||
preInstall = ''
|
||||
npm run prod --workspace=v1
|
||||
npm run build --workspace=v2
|
||||
npm run build --workspace=v3
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
|
||||
Reference in New Issue
Block a user