Unverified Commit 25fe330b authored by Maximilian Bosch's avatar Maximilian Bosch Committed by GitHub
Browse files

Merge: nextcloud30: init at 30.0.0; nextcloud30Packages: init (#342521)

parents 1c9c0eab 55a45406
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -551,6 +551,12 @@
    Note that first solution of the [official FAQ answer](https://cloud.seatable.io/dtable/external-links/7b976c85f504491cbe8e/?tid=0000&vid=0000&row-id=BQhH-2HSQs68Nq2EW91DBA)
    is not allowed by the `services.nginx` module's config-checker.

- The latest available version of Nextcloud is v30 (available as `pkgs.nextcloud30`). The installation logic is as follows:
  - If [`services.nextcloud.package`](#opt-services.nextcloud.package) is specified explicitly, this package will be installed (**recommended**)
  - If [`system.stateVersion`](#opt-system.stateVersion) is >=24.05, `pkgs.nextcloud29` will be installed by default.
  - If [`system.stateVersion`](#opt-system.stateVersion) is >=24.11, `pkgs.nextcloud30` will be installed by default.
  - Please note that an upgrade from v28 (or older) to v30 directly is not possible. Please upgrade to `nextcloud29` (or earlier) first. Nextcloud prohibits skipping major versions while upgrading. You can upgrade by declaring [`services.nextcloud.package = pkgs.nextcloud29;`](options.html#opt-services.nextcloud.package).

- To facilitate dependency injection, the `imgui` package now builds a static archive using vcpkg' CMake rules.
  The derivation now installs "impl" headers selectively instead of by a wildcard.
  Use `imgui.src` if you just want to access the unpacked sources.
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ self-hostable cloud platform. The server setup can be automated using
[services.nextcloud](#opt-services.nextcloud.enable). A
desktop client is packaged at `pkgs.nextcloud-client`.

The current default by NixOS is `nextcloud29` which is also the latest
The current default by NixOS is `nextcloud30` which is also the latest
major version available.

## Basic usage {#module-services-nextcloud-basic-usage}
+6 −5
Original line number Diff line number Diff line
@@ -300,7 +300,7 @@ in {
    package = mkOption {
      type = types.package;
      description = "Which package to use for the Nextcloud instance.";
      relatedPackages = [ "nextcloud28" "nextcloud29" ];
      relatedPackages = [ "nextcloud28" "nextcloud29" "nextcloud30" ];
    };
    phpPackage = mkPackageOption pkgs "php" {
      example = "php82";
@@ -821,7 +821,7 @@ in {

  config = mkIf cfg.enable (mkMerge [
    { warnings = let
        latest = 29;
        latest = 30;
        upgradeWarning = major: nixos:
          ''
            A legacy Nextcloud install (from before NixOS ${nixos}) may be installed.
@@ -847,11 +847,11 @@ in {
          If you have an existing installation with a custom table prefix, make sure it is
          set correctly in `config.php` and remove the option from your NixOS config.
        '')
        ++ (optional (versionOlder cfg.package.version "25") (upgradeWarning 24 "22.11"))
        ++ (optional (versionOlder cfg.package.version "26") (upgradeWarning 25 "23.05"))
        ++ (optional (versionOlder cfg.package.version "27") (upgradeWarning 26 "23.11"))
        ++ (optional (versionOlder cfg.package.version "28") (upgradeWarning 27 "24.05"))
        ++ (optional (versionOlder cfg.package.version "29") (upgradeWarning 28 "24.11"));
        ++ (optional (versionOlder cfg.package.version "29") (upgradeWarning 28 "24.11"))
        ++ (optional (versionOlder cfg.package.version "30") (upgradeWarning 29 "24.11"));

      services.nextcloud.package = with pkgs;
        mkDefault (
@@ -862,7 +862,8 @@ in {
              `pkgs.nextcloud`.
            ''
          else if versionOlder stateVersion "24.05" then nextcloud27
          else nextcloud29
          else if versionOlder stateVersion "24.11" then nextcloud29
          else nextcloud30
        );

      services.nextcloud.phpPackage =
+1 −1
Original line number Diff line number Diff line
@@ -110,4 +110,4 @@ let
      ./with-objectstore.nix
    ];
in
listToAttrs (concatMap genTests [ 28 29 ])
listToAttrs (concatMap genTests [ 28 29 30 ])
+60 −39
Original line number Diff line number Diff line
{ lib, stdenvNoCC, fetchurl, nixosTests
, nextcloud28Packages
, nextcloud29Packages
{
  lib,
  stdenvNoCC,
  fetchurl,
  nixosTests,
  nextcloud28Packages,
  nextcloud29Packages,
  nextcloud30Packages,
}:

let
  generic = {
    version, hash
  , eol ? false, extraVulnerabilities ? []
  , packages
  }: stdenvNoCC.mkDerivation rec {
  generic =
    {
      version,
      hash,
      eol ? false,
      extraVulnerabilities ? [ ],
      packages,
    }:
    stdenvNoCC.mkDerivation rec {
      pname = "nextcloud";
      inherit version;

      src = fetchurl {
      url = "https://download.nextcloud.com/server/releases/${pname}-${version}.tar.bz2";
        url = "https://download.nextcloud.com/server/releases/nextcloud-${version}.tar.bz2";
        inherit hash;
      };

@@ -31,18 +40,24 @@ let
        runHook postInstall
      '';

    meta = with lib; {
      meta = {
        changelog = "https://nextcloud.com/changelog/#${lib.replaceStrings [ "." ] [ "-" ] version}";
        description = "Sharing solution for files, calendars, contacts and more";
        homepage = "https://nextcloud.com";
      maintainers = with maintainers; [ schneefux bachp globin ma27 ];
      license = licenses.agpl3Plus;
      platforms = platforms.linux;
      knownVulnerabilities = extraVulnerabilities
        ++ (optional eol "Nextcloud version ${version} is EOL");
        maintainers = with lib.maintainers; [
          schneefux
          bachp
          globin
          ma27
        ];
        license = lib.licenses.agpl3Plus;
        platforms = lib.platforms.linux;
        knownVulnerabilities =
          extraVulnerabilities ++ (lib.optional eol "Nextcloud version ${version} is EOL");
      };
    };
in {
in
{
  nextcloud28 = generic {
    version = "28.0.10";
    hash = "sha256-LoAVJtKJHBhf6sWYXL084pLOcKQl9Tb5GfkBuftMwhA=";
@@ -55,6 +70,12 @@ in {
    packages = nextcloud29Packages;
  };

  nextcloud30 = generic {
    version = "30.0.0";
    hash = "sha256-GNeoCVe7U+lPsESS9rUhNDTdo+naEtn3iZl2h8hWTmA=";
    packages = nextcloud30Packages;
  };

  # tip: get the sha with:
  # curl 'https://download.nextcloud.com/server/releases/nextcloud-${version}.tar.bz2.sha256'
}
Loading