From 357ae167e2374454a5463222ab60782114b59148 Mon Sep 17 00:00:00 2001 From: K900 Date: Tue, 2 Aug 2022 00:34:28 +0300 Subject: [PATCH] crystal_1_0, crystal_1_1: fix build --- pkgs/development/compilers/crystal/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/development/compilers/crystal/default.nix b/pkgs/development/compilers/crystal/default.nix index 9cf3bebe7ed9..88274ef73c94 100644 --- a/pkgs/development/compilers/crystal/default.nix +++ b/pkgs/development/compilers/crystal/default.nix @@ -2,6 +2,7 @@ , callPackage , fetchFromGitHub , fetchurl +, fetchpatch , lib # Dependencies , boehmgc @@ -97,6 +98,16 @@ let inherit sha256; }; + patches = lib.optionals (lib.versionOlder version "1.2.0") [ + # add support for DWARF5 debuginfo, fixes builds on recent compilers + # the PR is 8 commits from 2019, so just fetch the whole thing + # and hope it doesn't change + (fetchpatch { + url = "https://github.com/crystal-lang/crystal/pull/11399.patch"; + sha256 = "sha256-CjNpkQQ2UREADmlyLUt7zbhjXf0rTjFhNbFYLwJKkc8="; + }) + ]; + outputs = [ "out" "lib" "bin" ]; postPatch = ''