2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchurl, nixosTests }:
|
2016-09-21 17:55:38 +02:00
|
|
|
|
2020-03-14 04:07:30 +01:00
|
|
|
let
|
2020-12-10 20:57:42 +01:00
|
|
|
generic = {
|
|
|
|
version, sha256,
|
|
|
|
eol ? false, extraVulnerabilities ? []
|
|
|
|
}: stdenv.mkDerivation rec {
|
2020-03-14 04:07:30 +01:00
|
|
|
pname = "nextcloud";
|
|
|
|
inherit version;
|
2016-09-21 17:55:38 +02:00
|
|
|
|
2020-03-14 04:07:30 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://download.nextcloud.com/server/releases/${pname}-${version}.tar.bz2";
|
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
2020-04-15 22:14:04 +02:00
|
|
|
passthru.tests = nixosTests.nextcloud;
|
|
|
|
|
2020-03-14 04:07:30 +01:00
|
|
|
installPhase = ''
|
2021-05-21 10:31:38 +02:00
|
|
|
runHook preInstall
|
2020-03-14 04:07:30 +01:00
|
|
|
mkdir -p $out/
|
|
|
|
cp -R . $out/
|
2021-05-21 10:31:38 +02:00
|
|
|
runHook postInstall
|
2020-03-14 04:07:30 +01:00
|
|
|
'';
|
2016-09-21 17:55:38 +02:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-03-14 04:07:30 +01:00
|
|
|
description = "Sharing solution for files, calendars, contacts and more";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://nextcloud.com";
|
2020-03-14 04:07:30 +01:00
|
|
|
maintainers = with maintainers; [ schneefux bachp globin fpletz ma27 ];
|
|
|
|
license = licenses.agpl3Plus;
|
|
|
|
platforms = with platforms; unix;
|
2020-12-10 20:57:42 +01:00
|
|
|
knownVulnerabilities = extraVulnerabilities
|
|
|
|
++ (optional eol "Nextcloud version ${version} is EOL");
|
2020-03-14 04:07:30 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
in {
|
2021-07-08 16:29:45 +02:00
|
|
|
nextcloud19 = throw ''
|
|
|
|
Nextcloud v19 has been removed from `nixpkgs` as the support for it was dropped
|
|
|
|
by upstream in 2021-06. Please upgrade to at least Nextcloud v20 by
|
2020-09-20 19:06:37 +02:00
|
|
|
declaring
|
|
|
|
|
2021-07-08 16:29:45 +02:00
|
|
|
services.nextcloud.package = pkgs.nextcloud20;
|
2020-09-20 19:06:37 +02:00
|
|
|
|
|
|
|
in your NixOS config.
|
|
|
|
'';
|
2016-09-21 17:55:38 +02:00
|
|
|
|
2020-10-04 21:55:58 +02:00
|
|
|
nextcloud20 = generic {
|
2021-07-08 12:13:38 +02:00
|
|
|
version = "20.0.11";
|
|
|
|
sha256 = "sha256-CLrJH5eNTiJJrDzfCg+re3J2qmwxFOe12nUU/QgtD6A=";
|
2020-10-04 21:55:58 +02:00
|
|
|
};
|
2021-02-22 00:04:23 +01:00
|
|
|
|
|
|
|
nextcloud21 = generic {
|
2021-07-08 09:56:39 +02:00
|
|
|
version = "21.0.3";
|
|
|
|
sha256 = "8adcd175c7a70c33332586fa9ce36d03ba02d1df5d4c334d1210201d3fb953ee";
|
2021-02-22 00:04:23 +01:00
|
|
|
};
|
2021-07-08 16:43:27 +02:00
|
|
|
|
|
|
|
nextcloud22 = generic {
|
|
|
|
version = "22.0.0";
|
|
|
|
sha256 = "sha256-ORHTdUw3rKfJtfOys3UTwPK1u5ea8AgWwRF7Hu28XXo=";
|
|
|
|
};
|
2021-04-09 08:56:34 +02:00
|
|
|
# tip: get she sha with:
|
|
|
|
# curl 'https://download.nextcloud.com/server/releases/nextcloud-${version}.tar.bz2.sha256'
|
2016-09-21 17:55:38 +02:00
|
|
|
}
|