2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, nixosTests }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
let
|
2020-12-25 13:55:36 +00:00
|
|
|
generic = {
|
|
|
|
version, sha256,
|
|
|
|
eol ? false, extraVulnerabilities ? []
|
|
|
|
}: stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "nextcloud";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://download.nextcloud.com/server/releases/${pname}-${version}.tar.bz2";
|
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
|
|
|
passthru.tests = nixosTests.nextcloud;
|
|
|
|
|
|
|
|
installPhase = ''
|
2021-05-28 09:39:13 +00:00
|
|
|
runHook preInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p $out/
|
|
|
|
cp -R . $out/
|
2021-05-28 09:39:13 +00:00
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Sharing solution for files, calendars, contacts and more";
|
|
|
|
homepage = "https://nextcloud.com";
|
|
|
|
maintainers = with maintainers; [ schneefux bachp globin fpletz ma27 ];
|
|
|
|
license = licenses.agpl3Plus;
|
|
|
|
platforms = with platforms; unix;
|
2020-12-25 13:55:36 +00:00
|
|
|
knownVulnerabilities = extraVulnerabilities
|
|
|
|
++ (optional eol "Nextcloud version ${version} is EOL");
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
in {
|
2021-07-14 22:03:04 +00:00
|
|
|
nextcloud19 = throw ''
|
|
|
|
Nextcloud v19 has been removed from `nixpkgs` as the support for it was dropped
|
|
|
|
by upstream in 2021-06. Please upgrade to at least Nextcloud v20 by
|
2020-10-07 09:15:18 +00:00
|
|
|
declaring
|
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
services.nextcloud.package = pkgs.nextcloud20;
|
2020-10-07 09:15:18 +00:00
|
|
|
|
|
|
|
in your NixOS config.
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
nextcloud20 = generic {
|
2021-10-04 12:37:57 +00:00
|
|
|
version = "20.0.13";
|
|
|
|
sha256 = "15mi51aayi3m8brxc0w51mbxp4h3hjv14gr5mm7ch2930x655gg9";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
nextcloud21 = generic {
|
2021-10-04 12:37:57 +00:00
|
|
|
version = "21.0.5";
|
|
|
|
sha256 = "1q46h480kn97k7h3xm7r5gsa8l3f0kfiicapi46sh0p39pbjbyhv";
|
2021-07-14 22:03:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nextcloud22 = generic {
|
2021-10-04 12:37:57 +00:00
|
|
|
version = "22.2.0";
|
|
|
|
sha256 = "07ryvynws65k42n6ca20nni1vqr90fsrd2dpx2bvh09mwhyblg97";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
2021-04-12 18:23:04 +00:00
|
|
|
# tip: get she sha with:
|
|
|
|
# curl 'https://download.nextcloud.com/server/releases/nextcloud-${version}.tar.bz2.sha256'
|
2020-04-24 23:36:52 +00:00
|
|
|
}
|