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 = ''