Files
nixpkgs/pkgs/by-name/da/davis/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

47 lines
1.2 KiB
Nix

{
lib,
fetchFromGitHub,
php,
nixosTests,
}:
php.buildComposerProject2 (finalAttrs: {
pname = "davis";
version = "5.2.0";
src = fetchFromGitHub {
owner = "tchapi";
repo = "davis";
tag = "v${finalAttrs.version}";
hash = "sha256-Ih06CKwgR2ljw3w9YfgVUdBCjt5Nbs34fMsErRUkfcc=";
};
vendorHash = "sha256-e0qSI5naqM/mUSMduiku0yQkYMGw1y9Uwa5oYlxaDzs=";
composerNoPlugins = false;
postInstall = ''
chmod -R u+w $out/share
# Only include the files needed for runtime in the derivation
mv $out/share/php/davis/{migrations,public,src,config,bin,templates,tests,translations,vendor,symfony.lock,composer.json,composer.lock} $out
# Save the upstream .env file for reference, but rename it so it is not loaded
mv $out/share/php/davis/.env $out/env-upstream
rm -rf "$out/share"
'';
passthru = {
php = php;
tests = {
inherit (nixosTests) davis;
};
};
meta = {
changelog = "https://github.com/tchapi/davis/releases/tag/v${finalAttrs.version}";
homepage = "https://github.com/tchapi/davis";
description = "Simple CardDav and CalDav server inspired by Baïkal";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ramblurr ];
};
})