temp vendor davis
This commit is contained in:
parent
8dcede922b
commit
1725c478c2
2 changed files with 51 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
services =
|
services =
|
||||||
let
|
let
|
||||||
|
|
@ -10,12 +10,15 @@
|
||||||
hostname = domain;
|
hostname = domain;
|
||||||
appSecretFile = config.age.secrets."davSecret.age".path;
|
appSecretFile = config.age.secrets."davSecret.age".path;
|
||||||
adminPasswordFile = config.age.secrets."davPassword.age".path;
|
adminPasswordFile = config.age.secrets."davPassword.age".path;
|
||||||
|
nginx = null;
|
||||||
|
|
||||||
|
# https://github.com/NixOS/nixpkgs/pull/457476#issuecomment-3678028689
|
||||||
|
package = pkgs.callPackage ../../lib/tempVendoredDavis.nix { };
|
||||||
|
|
||||||
poolConfig = with config.services.caddy; {
|
poolConfig = with config.services.caddy; {
|
||||||
"listen.owner" = user;
|
"listen.owner" = user;
|
||||||
"listen.group" = group;
|
"listen.group" = group;
|
||||||
};
|
};
|
||||||
nginx = null;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
caddy.virtualHosts."${domain}".extraConfig = ''
|
caddy.virtualHosts."${domain}".extraConfig = ''
|
||||||
|
|
|
||||||
46
lib/tempVendoredDavis.nix
Normal file
46
lib/tempVendoredDavis.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
fetchFromGitHub,
|
||||||
|
php,
|
||||||
|
nixosTests,
|
||||||
|
}:
|
||||||
|
|
||||||
|
php.buildComposerProject2 (finalAttrs: {
|
||||||
|
pname = "davis";
|
||||||
|
version = "5.3.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "tchapi";
|
||||||
|
repo = "davis";
|
||||||
|
tag = "v${finalAttrs.version}";
|
||||||
|
hash = "sha256-YLVfcoC8cIcCfi7R2zWXNxD4P+KIXOCL+MqFEt2Z7Tc=";
|
||||||
|
};
|
||||||
|
|
||||||
|
vendorHash = "sha256-ub2iv4455AAP9ohN2Zh+8DCbYT1uJOasMeZ/P7tDdw0=";
|
||||||
|
|
||||||
|
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 ];
|
||||||
|
};
|
||||||
|
})
|
||||||
Loading…
Add table
Add a link
Reference in a new issue