2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, nixosTests }:
|
2016-09-21 15:55:38 +00:00
|
|
|
|
2020-03-14 03:07:30 +00:00
|
|
|
let
|
2020-12-10 19:57:42 +00:00
|
|
|
generic = {
|
|
|
|
version, sha256,
|
|
|
|
eol ? false, extraVulnerabilities ? []
|
|
|
|
}: stdenv.mkDerivation rec {
|
2020-03-14 03:07:30 +00:00
|
|
|
pname = "nextcloud";
|
|
|
|
inherit version;
|
2016-09-21 15:55:38 +00:00
|
|
|
|
2020-03-14 03:07:30 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://download.nextcloud.com/server/releases/${pname}-${version}.tar.bz2";
|
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
2020-04-15 20:14:04 +00:00
|
|
|
passthru.tests = nixosTests.nextcloud;
|
|
|
|
|
2020-03-14 03:07:30 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/
|
|
|
|
cp -R . $out/
|
|
|
|
'';
|
2016-09-21 15:55:38 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-03-14 03:07:30 +00:00
|
|
|
description = "Sharing solution for files, calendars, contacts and more";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://nextcloud.com";
|
2020-03-14 03:07:30 +00:00
|
|
|
maintainers = with maintainers; [ schneefux bachp globin fpletz ma27 ];
|
|
|
|
license = licenses.agpl3Plus;
|
|
|
|
platforms = with platforms; unix;
|
2020-12-10 19:57:42 +00:00
|
|
|
knownVulnerabilities = extraVulnerabilities
|
|
|
|
++ (optional eol "Nextcloud version ${version} is EOL");
|
2020-03-14 03:07:30 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
in {
|
2020-09-20 17:06:37 +00:00
|
|
|
nextcloud17 = throw ''
|
|
|
|
Nextcloud v17 has been removed from `nixpkgs` as the support for it will be dropped
|
|
|
|
by upstream within the lifetime of NixOS 20.09[1]. Please upgrade to Nextcloud v18 by
|
|
|
|
declaring
|
|
|
|
|
|
|
|
services.nextcloud.package = pkgs.nextcloud18;
|
|
|
|
|
|
|
|
in your NixOS config.
|
|
|
|
|
|
|
|
[1] https://docs.nextcloud.com/server/18/admin_manual/release_schedule.html
|
|
|
|
'';
|
2016-09-21 15:55:38 +00:00
|
|
|
|
2020-03-14 03:07:30 +00:00
|
|
|
nextcloud18 = generic {
|
2020-10-28 12:09:36 +00:00
|
|
|
version = "18.0.10";
|
|
|
|
sha256 = "0kv9mdn36shr98kh27969b8xs7pgczbyjklrfskxy9mph7bbzir6";
|
2020-12-10 19:57:42 +00:00
|
|
|
eol = true;
|
2016-09-21 15:55:38 +00:00
|
|
|
};
|
2020-06-03 15:17:04 +00:00
|
|
|
|
|
|
|
nextcloud19 = generic {
|
2020-12-10 19:57:42 +00:00
|
|
|
version = "19.0.6";
|
|
|
|
sha256 = "sha256-pqqIayE0OyTailtd2zeYi+G1APjv/YHqyO8jCpq7KJg=";
|
|
|
|
extraVulnerabilities = [
|
2021-01-05 21:31:06 +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-10 19:57:42 +00:00
|
|
|
];
|
2020-06-03 15:17:04 +00:00
|
|
|
};
|
2020-10-04 19:55:58 +00:00
|
|
|
|
|
|
|
nextcloud20 = generic {
|
2021-02-06 21:14:10 +00:00
|
|
|
version = "20.0.7";
|
|
|
|
sha256 = "sha256-jO2Ct3K/CvZ9W+EyPkD5d0KbwKK8yGQJXvx4dnUAtys=";
|
2020-10-04 19:55:58 +00:00
|
|
|
};
|
2016-09-21 15:55:38 +00:00
|
|
|
}
|