Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

69 lines
1.7 KiB
Nix
Raw Permalink Normal View History

2025-10-09 14:15:47 +02:00
{
lib,
stdenvNoCC,
fetchurl,
nixosTests,
cacert,
caBundle ? "${cacert}/etc/ssl/certs/ca-bundle.crt",
nextcloud31Packages,
}:
let
generic =
{
version,
hash,
eol ? false,
extraVulnerabilities ? [ ],
packages,
}:
stdenvNoCC.mkDerivation rec {
pname = "nextcloud";
inherit version;
src = fetchurl {
url = "https://download.nextcloud.com/server/releases/nextcloud-${version}.tar.bz2";
inherit hash;
};
passthru = {
tests = lib.filterAttrs (
key: _: (lib.hasSuffix (lib.versions.major version) key)
) nixosTests.nextcloud;
inherit packages;
};
postPatch = ''
cp ${caBundle} resources/config/ca-bundle.crt
'';
installPhase = ''
runHook preInstall
mkdir -p $out/
cp -R . $out/
runHook postInstall
'';
meta = {
changelog = "https://nextcloud.com/changelog/#${lib.replaceStrings [ "." ] [ "-" ] version}";
description = "Sharing solution for files, calendars, contacts and more";
homepage = "https://nextcloud.com";
teams = [ lib.teams.nextcloud ];
license = lib.licenses.agpl3Plus;
platforms = lib.platforms.linux;
knownVulnerabilities =
extraVulnerabilities ++ (lib.optional eol "Nextcloud version ${version} is EOL");
};
};
in
{
nextcloud31 = generic {
version = "31.0.9";
hash = "sha256-qrhBTMY1gco6jfRy9F60ErK4Q6lms4cCdUIbrQ1nD2g=";
packages = nextcloud31Packages;
};
# tip: get the sha with:
# curl 'https://download.nextcloud.com/server/releases/nextcloud-${version}.tar.bz2.sha256'
}