mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-11-10 09:43:30 +01:00
We were relying on `composerNoScripts = false` to make sure post-install command `assets:install` is run. `assets:install` copies assets from `vendor/` directory into `public/` directory, placing it in appropriate places. However, with commit80bb9aec24("kimai: switch to buildComposerProject2 and tag"), we switched to `buildComposerProject2` which has moved `composer install` step to `composerVendor` derivation. By design, `composerVendor` ignores anything that happens outside `vendor/`, so the assets was not copied into final derivation. So stop relying on `composerNoScripts = false` and run `assets:install` ourselves in `postInstall` step. A side effect of this is that there is another post-install step being skipped (`cache:clear`). However we simply handle caches outside of the derivation (it's handled in the module), so that's not a problem. Fixes: https://github.com/NixOS/nixpkgs/issues/442208 (cherry picked from commit1422ed8801)
25 lines
651 B
Nix
25 lines
651 B
Nix
{ lib, ... }:
|
|
|
|
{
|
|
name = "kimai";
|
|
meta.maintainers = with lib.maintainers; [ peat-psuwit ];
|
|
|
|
nodes.machine =
|
|
{ ... }:
|
|
{
|
|
services.kimai.sites."localhost" = {
|
|
database.createLocally = true;
|
|
};
|
|
};
|
|
|
|
testScript = ''
|
|
machine.wait_for_unit("phpfpm-kimai-localhost.service")
|
|
machine.wait_for_unit("nginx.service")
|
|
machine.wait_for_open_port(80)
|
|
machine.succeed("curl -v --location --fail http://localhost/")
|
|
# Make sure bundled assets are served.
|
|
# https://github.com/NixOS/nixpkgs/issues/442208
|
|
machine.succeed("curl -v --location --fail http://localhost/bundles/tabler/tabler.css")
|
|
'';
|
|
}
|