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 = ''
|
2021-05-21 08:31:38 +00:00
|
|
|
runHook preInstall
|
2020-03-14 03:07:30 +00:00
|
|
|
mkdir -p $out/
|
|
|
|
cp -R . $out/
|
2021-05-21 08:31:38 +00:00
|
|
|
runHook postInstall
|
2020-03-14 03:07:30 +00:00
|
|
|
'';
|
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 {
|
2022-03-15 20:25:44 +00:00
|
|
|
nextcloud21 = throw ''
|
|
|
|
Nextcloud v21 has been removed from `nixpkgs` as the support for it was dropped
|
|
|
|
by upstream in 2022-02. Please upgrade to at least Nextcloud v22 by declaring
|
2020-09-20 17:06:37 +00:00
|
|
|
|
2022-03-15 20:25:44 +00:00
|
|
|
services.nextcloud.package = pkgs.nextcloud22;
|
2020-09-20 17:06:37 +00:00
|
|
|
|
|
|
|
in your NixOS config.
|
2016-09-21 15:55:38 +00:00
|
|
|
|
2022-03-15 20:25:44 +00:00
|
|
|
WARNING: if you were on Nextcloud 20 on NixOS 21.11 you have to upgrade to Nextcloud 21
|
|
|
|
first on 21.11 because Nextcloud doesn't support upgrades accross multiple major versions!
|
2021-10-24 23:26:08 +00:00
|
|
|
'';
|
2021-02-21 23:04:23 +00:00
|
|
|
|
2021-07-08 14:43:27 +00:00
|
|
|
nextcloud22 = generic {
|
2022-03-23 09:32:58 +00:00
|
|
|
version = "22.2.6";
|
|
|
|
sha256 = "0f1d0f0cb000c51b11886be25a8adce478846c3233572fcf28b44c5d4036e235";
|
2021-07-08 14:43:27 +00:00
|
|
|
};
|
2021-12-02 17:24:50 +00:00
|
|
|
|
|
|
|
nextcloud23 = generic {
|
2022-03-23 09:32:58 +00:00
|
|
|
version = "23.0.3";
|
|
|
|
sha256 = "39401d400fab02a84a175ea6e995b8ed4110fbaea48c876230b4f09755a62986";
|
2021-12-02 17:24:50 +00:00
|
|
|
};
|
2021-04-09 06:56:34 +00:00
|
|
|
# tip: get she sha with:
|
|
|
|
# curl 'https://download.nextcloud.com/server/releases/nextcloud-${version}.tar.bz2.sha256'
|
2016-09-21 15:55:38 +00:00
|
|
|
}
|