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";
|
2022-08-03 14:13:56 +02:00
|
|
|
maintainers = with maintainers; [ schneefux bachp globin ma27 ];
|
2020-03-14 04:07:30 +01:00
|
|
|
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 {
|
2022-05-21 18:34:28 +02: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 19:06:37 +02:00
|
|
|
|
2022-05-21 18:34:28 +02:00
|
|
|
services.nextcloud.package = pkgs.nextcloud23;
|
2020-09-20 19:06:37 +02:00
|
|
|
|
|
|
|
in your NixOS config.
|
2016-09-21 17:55:38 +02:00
|
|
|
|
2022-05-21 18:34:28 +02:00
|
|
|
WARNING: if you were on Nextcloud 21 on NixOS 21.11 you have to upgrade to Nextcloud 22
|
2022-03-15 21:25:44 +01:00
|
|
|
first on 21.11 because Nextcloud doesn't support upgrades accross multiple major versions!
|
2021-10-25 01:26:08 +02:00
|
|
|
'';
|
2021-02-22 00:04:23 +01:00
|
|
|
|
2021-12-02 18:24:50 +01:00
|
|
|
nextcloud23 = generic {
|
2022-08-11 11:11:50 +02:00
|
|
|
version = "23.0.8";
|
|
|
|
sha256 = "ac3d042253399be25a2aa01c799dec75a1459b6ae453874414f6528cc2ee5061";
|
2021-12-02 18:24:50 +01:00
|
|
|
};
|
2022-05-06 00:26:54 +02:00
|
|
|
|
|
|
|
nextcloud24 = generic {
|
2022-08-11 11:11:50 +02:00
|
|
|
version = "24.0.4";
|
|
|
|
sha256 = "d107426f8e1c193db882a04c844f9bc7e7eeb7c21e46c46197e5154d6d6ac28e";
|
2022-05-06 00:26:54 +02:00
|
|
|
};
|
|
|
|
|
2022-07-19 03:07:35 +02:00
|
|
|
# tip: get the sha with:
|
2021-04-09 08:56:34 +02:00
|
|
|
# curl 'https://download.nextcloud.com/server/releases/nextcloud-${version}.tar.bz2.sha256'
|
2016-09-21 17:55:38 +02:00
|
|
|
}
|