Files
nixpkgs/pkgs/by-name/ki/kimai/package.nix
2026-08-12 01:51:51 +00:00

72 lines
1.7 KiB
Nix

{
php,
fetchFromGitHub,
lib,
nixosTests,
}:
php.buildComposerProject2 (finalAttrs: {
pname = "kimai";
version = "2.65.0";
src = fetchFromGitHub {
owner = "kimai";
repo = "kimai";
tag = finalAttrs.version;
hash = "sha256-lqKHXf5pksyZpKEf3ZIey2ub/3Q9b/Gik7NH+B2ZgAE=";
};
php = php.buildEnv {
extensions = (
{ enabled, all }:
enabled
++ (with all; [
gd
intl
mbstring
pdo
tokenizer
xsl
zip
])
);
# Asset building and (later) cache building process requires a little bit
# more memory.
extraConfig = ''
memory_limit=384M
'';
};
vendorHash = "sha256-0nOmdnpGzUszBiAYH0sdkT4UCJc8Sd8eihBQE5Vo4Lo=";
composerNoPlugins = false;
postInstall = ''
# Make available the console utility, as Kimai doesn't list this in
# composer.json.
mkdir -p "$out"/share/php/kimai "$out"/bin
ln -s "$out"/share/php/kimai/bin/console "$out"/bin/console
# Install bundled assets. This is normally done in the `composer install`
# post-install script, but it's being skipped.
(cd "$out"/share/php/kimai && php ./bin/console assets:install)
'';
passthru.tests = {
kimai = nixosTests.kimai;
};
meta = {
description = "Web-based multi-user time-tracking application";
homepage = "https://www.kimai.org/";
license = lib.licenses.agpl3Plus;
longDescription = "
Kimai is a web-based multi-user time-tracking application. Works great for
everyone: freelancers, companies, organizations - everyone can track their
times, generate reports, create invoices and do so much more.
";
maintainers = with lib.maintainers; [ peat-psuwit ];
platforms = lib.platforms.all;
};
})