nixpkgs/pkgs/by-name/da/davis/package.nix
Casey Link 7f17a67c5c
davis: 4.4.1 -> 4.4.2
Release notes: https://github.com/tchapi/davis/releases/tag/v4.4.2

Removed composer.lock from nixpkgs tree because upstream contains it.
2024-04-03 08:03:32 +02:00

35 lines
1.1 KiB
Nix

{
lib,
fetchFromGitHub,
php,
}:
php.buildComposerProject (finalAttrs: {
pname = "davis";
version = "4.4.2";
src = fetchFromGitHub {
owner = "tchapi";
repo = "davis";
rev = "v${finalAttrs.version}";
hash = "sha256-oPzMBCOcAJoHni9SO74RuJDEOcVYc4MtO5rGq1E9g3Q=";
};
vendorHash = "sha256-NOb6rc9jVsf+/RVOW7SLBAJk9SihcRxoepUEGBGLi2w=";
postInstall = ''
# 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"
'';
meta = {
changelog = "https://github.com/tchapi/davis/releases/tag/v${finalAttrs.version}";
homepage = "https://github.com/tchapi/davis";
description = "A simple CardDav and CalDav server inspired by Baïkal";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ramblurr ];
};
})