2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, nixosTests }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
2020-12-25 13:55:36 +00:00
|
|
|
generic = {
|
|
|
|
version, sha256,
|
|
|
|
eol ? false, extraVulnerabilities ? []
|
|
|
|
}: stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "nextcloud";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://download.nextcloud.com/server/releases/${pname}-${version}.tar.bz2";
|
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
|
|
|
passthru.tests = nixosTests.nextcloud;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/
|
|
|
|
cp -R . $out/
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Sharing solution for files, calendars, contacts and more";
|
|
|
|
homepage = "https://nextcloud.com";
|
|
|
|
maintainers = with maintainers; [ schneefux bachp globin fpletz ma27 ];
|
|
|
|
license = licenses.agpl3Plus;
|
|
|
|
platforms = with platforms; unix;
|
2020-12-25 13:55:36 +00:00
|
|
|
knownVulnerabilities = extraVulnerabilities
|
|
|
|
++ (optional eol "Nextcloud version ${version} is EOL");
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
in {
|
2021-03-09 03:18:52 +00:00
|
|
|
nextcloud18 = throw ''
|
|
|
|
Nextcloud v18 has been removed from `nixpkgs` as the support for it was dropped
|
|
|
|
by upstream in 2021-01. Please upgrade to at least Nextcloud v19 by
|
2020-10-07 09:15:18 +00:00
|
|
|
declaring
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
services.nextcloud.package = pkgs.nextcloud19;
|
2020-10-07 09:15:18 +00:00
|
|
|
|
|
|
|
in your NixOS config.
|
|
|
|
|
|
|
|
[1] https://docs.nextcloud.com/server/18/admin_manual/release_schedule.html
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
# FIXME(@Ma27) remove on 21.05
|
2020-06-15 15:56:04 +00:00
|
|
|
nextcloud19 = generic {
|
2020-12-25 13:55:36 +00:00
|
|
|
version = "19.0.6";
|
|
|
|
sha256 = "sha256-pqqIayE0OyTailtd2zeYi+G1APjv/YHqyO8jCpq7KJg=";
|
|
|
|
extraVulnerabilities = [
|
2021-01-09 10:05:03 +00:00
|
|
|
"Nextcloud 19 is still supported, but CVE-2020-8259 & CVE-2020-8152 are unfixed! Please note that both CVEs only affect the file encryption module which is turned off by default. Alternatively, `pkgs.nextcloud20` can be used."
|
2020-12-25 13:55:36 +00:00
|
|
|
];
|
2020-10-07 09:15:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nextcloud20 = generic {
|
2021-02-13 14:23:35 +00:00
|
|
|
version = "20.0.7";
|
|
|
|
sha256 = "sha256-jO2Ct3K/CvZ9W+EyPkD5d0KbwKK8yGQJXvx4dnUAtys=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
nextcloud21 = generic {
|
|
|
|
version = "21.0.0";
|
|
|
|
sha256 = "sha256-zq2u72doWhGvxbI7Coa6PHvQp7E41dHswFJiODZV8fA=";
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|