From ad317c7fa09a62aac09137172b1ec665a6218d96 Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 13 Mar 2022 01:45:15 +0100 Subject: [PATCH] packages/dream2nix-overrides: use version-gated vips 8.12.2 --- .../dream2nix-overrides/nodejs/default.nix | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/packages/dream2nix-overrides/nodejs/default.nix b/packages/dream2nix-overrides/nodejs/default.nix index de191c1..89cdda3 100644 --- a/packages/dream2nix-overrides/nodejs/default.nix +++ b/packages/dream2nix-overrides/nodejs/default.nix @@ -7,13 +7,36 @@ ... }: +let + versionGate = pkg: target: + assert + lib.assertMsg (lib.versionAtLeast target.version pkg.version) + "${pkg.name} has reached the desired version upstream"; + target; + + vips_8_12_2' = pkgs.vips.overrideAttrs (_: { + version = "8.12.2"; + src = pkgs.fetchFromGitHub { + owner = "libvips"; + repo = "libvips"; + rev = "v8.12.2"; + sha256 = "sha256-ffDJJWe/SzG+lppXEiyfXXL5KLdZgnMjv1SYnuYnh4c="; + extraPostFetch = '' + rm -r $out/test/test-suite/images/ + ''; + }; + }); + + vips_8_12_2 = versionGate pkgs.vips vips_8_12_2'; +in + { sharp.build = with pkgs; { nativeBuildInputs = old: old ++ [ pkg-config ]; buildInputs = old: old ++ [ - vips + vips_8_12_2 ]; }; ghost.build = {