depot/third_party/nixpkgs/pkgs/by-name/da/davis/package.nix
Luke Granger-Brown f92e137cfb
Some checks failed
/ combine-systems (push) Blocked by required conditions
/ build (x86_64-linux) (push) Failing after 11m44s
/ build (aarch64-linux) (push) Failing after 11m50s
/ build (push) Failing after 16m42s
Merge commit '1e2ed035f4bebc9adad02b365508ad96f7df87c1' into HEAD
2025-03-02 02:23:32 +00:00

41 lines
1.2 KiB
Nix

{
lib,
fetchFromGitHub,
php,
nixosTests,
}:
php.buildComposerProject2 (finalAttrs: {
pname = "davis";
version = "5.0.2";
src = fetchFromGitHub {
owner = "tchapi";
repo = "davis";
tag = "v${finalAttrs.version}";
hash = "sha256-Zl+6nrgspyg6P9gqYwah81Z6Mtni6nUlCp4gTjJWn9M=";
};
vendorHash = "sha256-pCWM1kgk30Au9i8TflrmZXw/PJmo3tdW565BXwncsZU=";
postInstall = ''
chmod -R u+w $out/share
# Only include the files needed for runtime in the derivation
mv $out/share/php/${finalAttrs.pname}/{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/${finalAttrs.pname}/.env $out/env-upstream
rm -rf "$out/share"
'';
passthru.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 ];
};
})