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;
|
|
|
|
};
|
|
|
|
|
2022-09-10 14:23:39 +01:00
|
|
|
patches = [ ./0001-Setup-remove-custom-dbuser-creation-behavior.patch ];
|
|
|
|
|
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";
|
2022-08-03 13:13:56 +01:00
|
|
|
maintainers = with maintainers; [ schneefux bachp globin ma27 ];
|
2020-03-14 03:07:30 +00:00
|
|
|
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-05-21 17:34:28 +01:00
|
|
|
nextcloud22 = throw ''
|
|
|
|
Nextcloud v22 has been removed from `nixpkgs` as the support for is dropped
|
|
|
|
by upstream in 2022-07. Please upgrade to at least Nextcloud v23 by declaring
|
2020-09-20 18:06:37 +01:00
|
|
|
|
2022-05-21 17:34:28 +01:00
|
|
|
services.nextcloud.package = pkgs.nextcloud23;
|
2020-09-20 18:06:37 +01:00
|
|
|
|
|
|
|
in your NixOS config.
|
2016-09-21 16:55:38 +01:00
|
|
|
|
2022-05-21 17:34:28 +01:00
|
|
|
WARNING: if you were on Nextcloud 21 on NixOS 21.11 you have to upgrade to Nextcloud 22
|
2022-03-15 20:25:44 +00:00
|
|
|
first on 21.11 because Nextcloud doesn't support upgrades accross multiple major versions!
|
2021-10-25 00:26:08 +01:00
|
|
|
'';
|
2021-02-21 23:04:23 +00:00
|
|
|
|
2021-12-02 17:24:50 +00:00
|
|
|
nextcloud23 = generic {
|
2022-10-06 15:51:46 +01:00
|
|
|
version = "23.0.10";
|
|
|
|
sha256 = "c68cff7f40b1e73e8d173f068e7d9c02d37e3f94a6a36a556a49c3ff5def4267";
|
2021-12-02 17:24:50 +00:00
|
|
|
};
|
2022-05-05 23:26:54 +01:00
|
|
|
|
|
|
|
nextcloud24 = generic {
|
2022-10-06 15:51:46 +01:00
|
|
|
version = "24.0.6";
|
|
|
|
sha256 = "b26dff9980a47e7e722805fdbbf87e07f59a3817b03ecc32698e028e9baf0301";
|
2022-05-05 23:26:54 +01:00
|
|
|
};
|
|
|
|
|
2022-07-19 02:07:35 +01:00
|
|
|
# tip: get the sha with:
|
2021-04-09 07:56:34 +01:00
|
|
|
# curl 'https://download.nextcloud.com/server/releases/nextcloud-${version}.tar.bz2.sha256'
|
2016-09-21 16:55:38 +01:00
|
|
|
}
|