From b1be734009b3b9aa217d8561846fce9c9beafb37 Mon Sep 17 00:00:00 2001 From: Evangelos Paterakis Date: Mon, 21 Nov 2022 22:30:19 +0200 Subject: [PATCH] fix: disable ffi on < 1.6.1 instead of patching the spec --- pkgs/development/compilers/crystal/default.nix | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/pkgs/development/compilers/crystal/default.nix b/pkgs/development/compilers/crystal/default.nix index 9423e9c7e4fc..4fac18debfc9 100644 --- a/pkgs/development/compilers/crystal/default.nix +++ b/pkgs/development/compilers/crystal/default.nix @@ -109,20 +109,6 @@ let url = "https://github.com/crystal-lang/crystal/pull/11399.patch"; sha256 = "sha256-CjNpkQQ2UREADmlyLUt7zbhjXf0rTjFhNbFYLwJKkc8="; }) - ] ++ lib.optionals (lib.versionAtLeast version "1.3.0" && lib.versionOlder version "1.6.0") [ - # needed for #12601 to get applied successfully - (fetchpatch { - url = "https://github.com/crystal-lang/crystal/commit/bf4009dacbf67a63a1cbaffddbdc99549bb70a03.patch"; - sha256 = "sha256-KpMA5Zdy0QI+HcfuZVRT2gLPS7oH2D4MsdYEnHGDt/0="; - }) - ] ++ lib.optionals (lib.versionAtLeast version "1.3.0" && lib.versionOlder version "1.6.1") [ - # fixes an issue that prevented tests from passing when ran with - # the --release flag - # the PR has been merged since version 1.6.1 - (fetchpatch { - url = "https://github.com/crystal-lang/crystal/pull/12601.patch"; - sha256 = "sha256-3NiUC4EyP/jSn62sv38eieKcVw9zUfRB78aAvnxV57E="; - }) ]; outputs = [ "out" "lib" "bin" ]; @@ -187,6 +173,9 @@ let FLAGS = [ "--single-module" # needed for deterministic builds + ] ++ lib.optionals (lib.versionAtLeast version "1.3.0" && lib.versionOlder version "1.6.1") [ + # ffi is only used by the interpreter and its spec are broken on < 1.6.1 + "-Dwithout_ffi" ]; # This makes sure we don't keep depending on the previous version of