diff --git a/nixos/doc/manual/from_md/release-notes/rl-2305.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2305.section.xml
index b73aa325bbf70..b88971cc61a98 100644
--- a/nixos/doc/manual/from_md/release-notes/rl-2305.section.xml
+++ b/nixos/doc/manual/from_md/release-notes/rl-2305.section.xml
@@ -75,6 +75,26 @@
fetch-ec2-metadata.service
+
+
+ minio removed support for it’s legacy
+ filesystem backend in
+ RELEASE.2022-10-29T06-21-33Z.
+ This means if your storage was created with the old format,
+ minio will no longer start. Unfortunately minio doesn’t
+ provide a an automatic migration, they only provide
+ instructions
+ how to manually convert the node. To facilitate this
+ migration we keep around the last version that still supports
+ the old filesystem backend as
+ minio_legacy_fs. Use it via
+ services.minio.package = minio_legacy_fs;
+ to export your data before switching to the new version. See
+ the corresponding issue
+ https://github.com/NixOS/nixpkgs/issues/199318) for more
+ details.
+
+ services.sourcehut.dispatch and the
diff --git a/nixos/doc/manual/release-notes/rl-2305.section.md b/nixos/doc/manual/release-notes/rl-2305.section.md
index 84216758bad5e..80d62fccb0ced 100644
--- a/nixos/doc/manual/release-notes/rl-2305.section.md
+++ b/nixos/doc/manual/release-notes/rl-2305.section.md
@@ -29,6 +29,8 @@ In addition to numerous new and upgraded packages, this release has the followin
- The EC2 image module no longer fetches instance metadata in stage-1. This results in a significantly smaller initramfs, since network drivers no longer need to be included, and faster boots, since metadata fetching can happen in parallel with startup of other services.
This breaks services which rely on metadata being present by the time stage-2 is entered. Anything which reads EC2 metadata from `/etc/ec2-metadata` should now have an `after` dependency on `fetch-ec2-metadata.service`
+- `minio` removed support for its legacy filesystem backend in [RELEASE.2022-10-29T06-21-33Z](https://github.com/minio/minio/releases/tag/RELEASE.2022-10-29T06-21-33Z). This means if your storage was created with the old format, minio will no longer start. Unfortunately minio doesn't provide a an automatic migration, they only provide [instructions how to manually convert the node](https://min.io/docs/minio/windows/operations/install-deploy-manage/migrate-fs-gateway.html). To facilitate this migration we keep around the last version that still supports the old filesystem backend as `minio_legacy_fs`. Use it via `services.minio.package = minio_legacy_fs;` to export your data before switching to the new version. See the corresponding [issue](https://github.com/NixOS/nixpkgs/issues/199318) for more details.
+
- `services.sourcehut.dispatch` and the corresponding package (`sourcehut.dispatchsrht`) have been removed due to [upstream deprecation](https://sourcehut.org/blog/2022-08-01-dispatch-deprecation-plans/).
- The [services.snapserver.openFirewall](#opt-services.snapserver.openFirewall) module option default value has been changed from `true` to `false`. You will need to explicitely set this option to `true`, or configure your firewall.
diff --git a/pkgs/servers/minio/legacy_fs.nix b/pkgs/servers/minio/legacy_fs.nix
new file mode 100644
index 0000000000000..13c29ac6e3999
--- /dev/null
+++ b/pkgs/servers/minio/legacy_fs.nix
@@ -0,0 +1,51 @@
+{ lib, buildGoModule, fetchFromGitHub, nixosTests }:
+
+let
+ # The web client verifies, that the server version is a valid datetime string:
+ # https://github.com/minio/minio/blob/3a0e7347cad25c60b2e51ff3194588b34d9e424c/browser/app/js/web.js#L51-L53
+ #
+ # Example:
+ # versionToTimestamp "2021-04-22T15-44-28Z"
+ # => "2021-04-22T15:44:28Z"
+ versionToTimestamp = version:
+ let
+ splitTS = builtins.elemAt (builtins.split "(.*)(T.*)" version) 1;
+ in
+ builtins.concatStringsSep "" [ (builtins.elemAt splitTS 0) (builtins.replaceStrings [ "-" ] [ ":" ] (builtins.elemAt splitTS 1)) ];
+in
+buildGoModule rec {
+ pname = "minio";
+ version = "2022-10-24T18-35-07Z";
+
+ src = fetchFromGitHub {
+ owner = "minio";
+ repo = "minio";
+ rev = "RELEASE.${version}";
+ sha256 = "sha256-sABNzhyfBNU5pWyE/VWHUzuSyKsx0glj01ectJPakV8=";
+ };
+
+ vendorSha256 = "sha256-wB3UiuptT6D0CIUlHC1d5k0rjIxNeh5yAWOmYpyLGmA=";
+
+ doCheck = false;
+
+ subPackages = [ "." ];
+
+ CGO_ENABLED = 0;
+
+ tags = [ "kqueue" ];
+
+ ldflags = let t = "github.com/minio/minio/cmd"; in [
+ "-s" "-w" "-X ${t}.Version=${versionToTimestamp version}" "-X ${t}.ReleaseTag=RELEASE.${version}" "-X ${t}.CommitID=${src.rev}"
+ ];
+
+ passthru.tests.minio = nixosTests.minio;
+
+ meta = with lib; {
+ homepage = "https://www.minio.io/";
+ description = "An S3-compatible object storage server";
+ changelog = "https://github.com/minio/minio/releases/tag/RELEASE.${version}";
+ maintainers = with maintainers; [ eelco bachp ];
+ platforms = platforms.unix;
+ license = licenses.agpl3Plus;
+ };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index d51c3eb0723e9..1e584a0004e4c 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -24033,6 +24033,9 @@ with pkgs;
micronaut = callPackage ../development/tools/micronaut {};
minio = callPackage ../servers/minio { };
+ # Keep around to allow people to migrate their data from the old legacy fs format
+ # https://github.com/minio/minio/releases/tag/RELEASE.2022-10-29T06-21-33Z
+ minio_legacy_fs = callPackage ../servers/minio/legacy_fs.nix { };
mkchromecast = libsForQt5.callPackage ../applications/networking/mkchromecast { };