about summary refs log tree commit diff
path: root/pkgs/by-name/di/distribution
diff options
context:
space:
mode:
authorPaul Meyer <49727155+katexochen@users.noreply.github.com>2023-12-26 16:14:40 +0100
committerPaul Meyer <49727155+katexochen@users.noreply.github.com>2024-06-17 21:12:45 +0200
commit4b74b465e4abd403ab3c66e428050ff2ab404686 (patch)
tree31b55dfb6d471e829f47c6b933fea3299f23e836 /pkgs/by-name/di/distribution
parent228706acb600ab1bf5ddc1e739685f336b82ac5f (diff)
docker-distribution: rename to distribution
Diffstat (limited to 'pkgs/by-name/di/distribution')
-rw-r--r--pkgs/by-name/di/distribution/package.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/by-name/di/distribution/package.nix b/pkgs/by-name/di/distribution/package.nix
new file mode 100644
index 0000000000000..68e637cd1e456
--- /dev/null
+++ b/pkgs/by-name/di/distribution/package.nix
@@ -0,0 +1,47 @@
+{ lib
+, buildGoModule
+, fetchFromGitHub
+, fetchpatch
+}:
+
+buildGoModule rec {
+  pname = "distribution";
+  version = "3.0.0-alpha.1";
+
+  src = fetchFromGitHub {
+    owner = "docker";
+    repo = "distribution";
+    rev = "v${version}";
+    hash = "sha256-reguAtBkEC9OMUTdCtFY6l0fkk28VoA0IlPcQ0sz84I=";
+  };
+
+  patches = [
+    # fix: load gcs credentials and client inside DriverConstructor
+    # Needed to pass the tests. Remove with next update.
+    (fetchpatch {
+      url = "https://github.com/distribution/distribution/commit/14366a2dff6a8f595e39d258085381731b43cec6.diff";
+      hash = "sha256-0ns9JuIeLBzRLMVxY6uaWTIYcRRbuwQ+n9tmK+Pvf4U=";
+    })
+    # fix: add missing skip in s3 driver test
+    # Needed to pass the tests. Remove with next update.
+    (fetchpatch {
+      url = "https://github.com/distribution/distribution/commit/6908e0d5facd31ed32046df03a09040c964be0b3.patch";
+      hash = "sha256-ww+BwBGw+dkZ2FhVzynehR+sNYCgq8/KkPDP9ac6NWg=";
+    })
+  ];
+
+  vendorHash = null;
+
+  checkFlags = [
+    # TestHTTPChecker: requires internet access.
+    # TestInMemoryDriverSuite: timeout after 10 minutes, looks like a deadlock.
+    "-skip=^TestHTTPChecker$|^TestInMemoryDriverSuite$"
+  ];
+
+  meta = with lib; {
+    description = "Docker toolset to pack, ship, store, and deliver content";
+    license = licenses.asl20;
+    maintainers = [];
+    platforms = platforms.unix;
+  };
+}