2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, nixosTests }:
|
2016-09-21 16:55:38 +01: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 16:55:38 +01: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 21:14:04 +01:00
|
|
|
passthru.tests = nixosTests.nextcloud;
|
|
|
|
|
2020-03-14 03:07:30 +00:00
|
|
|
installPhase = ''
|
2021-05-21 09:31:38 +01:00
|
|
|
runHook preInstall
|
2020-03-14 03:07:30 +00:00
|
|
|
mkdir -p $out/
|
|
|
|
cp -R . $out/
|
2021-05-21 09:31:38 +01:00
|
|
|
runHook postInstall
|
2020-03-14 03:07:30 +00:00
|
|
|
'';
|
2016-09-21 16:55:38 +01: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 02:11:51 +01: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 {
|
2021-10-25 00:26:08 +01:00
|
|
|
nextcloud20 = throw ''
|
|
|
|
Nextcloud v20 has been removed from `nixpkgs` as the support for it was dropped
|
|
|
|
by upstream in 2021-10. Please upgrade to at least Nextcloud v21 by declaring
|
2020-09-20 18:06:37 +01:00
|
|
|
|
2021-10-25 00:26:08 +01:00
|
|
|
services.nextcloud.package = pkgs.nextcloud21;
|
2020-09-20 18:06:37 +01:00
|
|
|
|
|
|
|
in your NixOS config.
|
2016-09-21 16:55:38 +01:00
|
|
|
|
2021-10-25 00:26:08 +01:00
|
|
|
WARNING: if you were on Nextcloud 19 on NixOS 21.05 you have to upgrade to Nextcloud 20
|
|
|
|
first on 21.05 because Nextcloud doesn't support upgrades accross multiple major versions!
|
|
|
|
'';
|
2021-02-21 23:04:23 +00:00
|
|
|
|
|
|
|
nextcloud21 = generic {
|
2022-01-29 11:09:13 +00:00
|
|
|
version = "21.0.8";
|
|
|
|
sha256 = "00c37wp6fsnpm40bbhk6r6xycacfa5zk7arzc3i4xmhm89cyvm6z";
|
2021-02-21 23:04:23 +00:00
|
|
|
};
|
2021-07-08 15:43:27 +01:00
|
|
|
|
|
|
|
nextcloud22 = generic {
|
2022-01-29 11:10:03 +00:00
|
|
|
version = "22.2.4";
|
|
|
|
sha256 = "0vnf2j1hz0d7lxby73r2mq2rjm72nq55xajzm8sipj6wlbys15zl";
|
2021-07-08 15:43:27 +01:00
|
|
|
};
|
2021-12-02 17:24:50 +00:00
|
|
|
|
|
|
|
nextcloud23 = generic {
|
2022-01-29 11:11:01 +00:00
|
|
|
version = "23.0.1";
|
|
|
|
sha256 = "047pnkp49rf0a9gl03dwkkdgzmdsf88m79mzq04bwmgkb3a3qxay";
|
2021-12-02 17:24:50 +00:00
|
|
|
};
|
2021-04-09 07:56:34 +01:00
|
|
|
# tip: get she sha with:
|
|
|
|
# curl 'https://download.nextcloud.com/server/releases/nextcloud-${version}.tar.bz2.sha256'
|
2016-09-21 16:55:38 +01:00
|
|
|
}
|