2023-06-16 17:46:29 +03:00
|
|
|
{ lib, stdenv, fetchurl, nixosTests
|
|
|
|
, nextcloud27Packages
|
|
|
|
, nextcloud26Packages
|
|
|
|
}:
|
2016-09-21 18:55:38 +03:00
|
|
|
|
2020-03-14 06:07:30 +03:00
|
|
|
let
|
2020-12-10 22:57:42 +03:00
|
|
|
generic = {
|
2023-09-18 19:11:36 +03:00
|
|
|
version, hash
|
2023-06-16 17:46:29 +03:00
|
|
|
, eol ? false, extraVulnerabilities ? []
|
|
|
|
, packages
|
2023-10-07 17:16:42 +03:00
|
|
|
}: stdenv.mkDerivation rec {
|
2020-03-14 06:07:30 +03:00
|
|
|
pname = "nextcloud";
|
|
|
|
inherit version;
|
2016-09-21 18:55:38 +03:00
|
|
|
|
2020-03-14 06:07:30 +03:00
|
|
|
src = fetchurl {
|
2023-01-29 00:01:42 +03:00
|
|
|
url = "https://download.nextcloud.com/server/releases/${pname}-${version}.tar.bz2";
|
2023-09-18 19:11:36 +03:00
|
|
|
inherit hash;
|
2020-03-14 06:07:30 +03:00
|
|
|
};
|
|
|
|
|
2023-06-16 17:46:29 +03:00
|
|
|
passthru = {
|
|
|
|
tests = nixosTests.nextcloud;
|
|
|
|
inherit packages;
|
|
|
|
};
|
2020-04-15 23:14:04 +03:00
|
|
|
|
2020-03-14 06:07:30 +03:00
|
|
|
installPhase = ''
|
2021-05-21 11:31:38 +03:00
|
|
|
runHook preInstall
|
2020-03-14 06:07:30 +03:00
|
|
|
mkdir -p $out/
|
|
|
|
cp -R . $out/
|
2021-05-21 11:31:38 +03:00
|
|
|
runHook postInstall
|
2020-03-14 06:07:30 +03:00
|
|
|
'';
|
2016-09-21 18:55:38 +03:00
|
|
|
|
2021-01-11 10:54:33 +03:00
|
|
|
meta = with lib; {
|
2023-02-23 19:57:40 +03:00
|
|
|
changelog = "https://nextcloud.com/changelog/#${lib.replaceStrings [ "." ] [ "-" ] version}";
|
2020-03-14 06:07:30 +03:00
|
|
|
description = "Sharing solution for files, calendars, contacts and more";
|
2020-04-01 04:11:51 +03:00
|
|
|
homepage = "https://nextcloud.com";
|
2022-08-03 15:13:56 +03:00
|
|
|
maintainers = with maintainers; [ schneefux bachp globin ma27 ];
|
2020-03-14 06:07:30 +03:00
|
|
|
license = licenses.agpl3Plus;
|
|
|
|
platforms = with platforms; unix;
|
2020-12-10 22:57:42 +03:00
|
|
|
knownVulnerabilities = extraVulnerabilities
|
|
|
|
++ (optional eol "Nextcloud version ${version} is EOL");
|
2020-03-14 06:07:30 +03:00
|
|
|
};
|
|
|
|
};
|
|
|
|
in {
|
2023-10-07 17:16:42 +03:00
|
|
|
nextcloud25 = throw ''
|
|
|
|
Nextcloud v25 has been removed from `nixpkgs` as the support for is dropped
|
|
|
|
by upstream in 2023-10. Please upgrade to at least Nextcloud v26 by declaring
|
2023-04-20 12:34:54 +03:00
|
|
|
|
2023-10-07 17:16:42 +03:00
|
|
|
services.nextcloud.package = pkgs.nextcloud26;
|
2023-04-20 12:34:54 +03:00
|
|
|
|
|
|
|
in your NixOS config.
|
|
|
|
|
2023-10-07 17:16:42 +03:00
|
|
|
WARNING: if you were on Nextcloud 24 you have to upgrade to Nextcloud 25
|
|
|
|
first on 23.05 because Nextcloud doesn't support upgrades across multiple major versions!
|
2023-04-20 12:34:54 +03:00
|
|
|
'';
|
2022-05-06 01:26:54 +03:00
|
|
|
|
2023-03-21 18:41:47 +03:00
|
|
|
nextcloud26 = generic {
|
2023-09-21 18:11:40 +03:00
|
|
|
version = "26.0.7";
|
|
|
|
hash = "sha256-vtJEqLlNE7YWqSdAUhZwwdZ9Q8SAR3I/sTGAv/bUjpI=";
|
2023-06-16 17:46:29 +03:00
|
|
|
packages = nextcloud26Packages;
|
2023-03-21 18:41:47 +03:00
|
|
|
};
|
|
|
|
|
2023-06-14 14:59:43 +03:00
|
|
|
nextcloud27 = generic {
|
2023-10-06 11:24:20 +03:00
|
|
|
version = "27.1.2";
|
|
|
|
hash = "sha256-B0KyR6ruC3BE2wBi8KkUqnczjHp9j+faCRcUfXZolyE=";
|
2023-06-16 17:46:29 +03:00
|
|
|
packages = nextcloud27Packages;
|
2023-06-14 14:59:43 +03:00
|
|
|
};
|
|
|
|
|
2023-01-29 00:01:42 +03:00
|
|
|
# tip: get the sha with:
|
|
|
|
# curl 'https://download.nextcloud.com/server/releases/nextcloud-${version}.tar.bz2.sha256'
|
2016-09-21 18:55:38 +03:00
|
|
|
}
|