From 8eee05e8e67fd9b7293e546efc91d9d71f5ad29e Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Thu, 13 Feb 2025 07:03:55 -0500 Subject: [PATCH 1/4] crystal: remove unused patch from < 1.2.0 --- pkgs/development/compilers/crystal/default.nix | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/pkgs/development/compilers/crystal/default.nix b/pkgs/development/compilers/crystal/default.nix index 52557ca4a64a..2386f0eabe2a 100644 --- a/pkgs/development/compilers/crystal/default.nix +++ b/pkgs/development/compilers/crystal/default.nix @@ -2,7 +2,6 @@ , callPackage , fetchFromGitHub , fetchurl -, fetchpatch , lib , substituteAll # Dependencies @@ -99,16 +98,7 @@ let src = ./tzdata.patch; inherit tzdata; }) - ] - ++ 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" ]; From 70d23021065a53e0a6611e3922522f0e15277b8e Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Thu, 13 Feb 2025 07:46:44 -0500 Subject: [PATCH 2/4] crystal: remove unused ffi flag from < 1.6.1 --- pkgs/development/compilers/crystal/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/development/compilers/crystal/default.nix b/pkgs/development/compilers/crystal/default.nix index 2386f0eabe2a..812d36a60181 100644 --- a/pkgs/development/compilers/crystal/default.nix +++ b/pkgs/development/compilers/crystal/default.nix @@ -178,9 +178,6 @@ 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 From a5456d1c7f49df69210fc596c6d0a54cf6326547 Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Thu, 13 Feb 2025 07:51:59 -0500 Subject: [PATCH 3/4] crystal: remove unused binaryUrl conditional from < 1.2.0 --- pkgs/development/compilers/crystal/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/development/compilers/crystal/default.nix b/pkgs/development/compilers/crystal/default.nix index 812d36a60181..b00b441b4b70 100644 --- a/pkgs/development/compilers/crystal/default.nix +++ b/pkgs/development/compilers/crystal/default.nix @@ -49,8 +49,6 @@ let binaryUrl = version: rel: if arch == archs.aarch64-linux then "https://dev.alpinelinux.org/archive/crystal/crystal-${version}-aarch64-alpine-linux-musl.tar.gz" - else if arch == archs.x86_64-darwin && lib.versionOlder version "1.2.0" then - "https://github.com/crystal-lang/crystal/releases/download/${version}/crystal-${version}-${toString rel}-darwin-x86_64.tar.gz" else "https://github.com/crystal-lang/crystal/releases/download/${version}/crystal-${version}-${toString rel}-${arch}.tar.gz"; From 14dd0e0e6b0ebb34046f21998a7bbbf29d33198f Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Thu, 13 Feb 2025 07:54:05 -0500 Subject: [PATCH 4/4] crystal: remove unused substituteInPlace from < 1.7.0 --- pkgs/development/compilers/crystal/default.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkgs/development/compilers/crystal/default.nix b/pkgs/development/compilers/crystal/default.nix index b00b441b4b70..a0aa47a88151 100644 --- a/pkgs/development/compilers/crystal/default.nix +++ b/pkgs/development/compilers/crystal/default.nix @@ -134,10 +134,6 @@ let substituteInPlace spec/std/socket/udp_socket_spec.cr \ --replace 'it "joins and transmits to multicast groups"' 'pending "joins and transmits to multicast groups"' - '' + lib.optionalString (stdenv.hostPlatform.isDarwin && lib.versionAtLeast version "1.3.0" && lib.versionOlder version "1.7.0") '' - # See https://github.com/NixOS/nixpkgs/pull/195606#issuecomment-1356491277 - substituteInPlace spec/compiler/loader/unix_spec.cr \ - --replace 'it "parses file paths"' 'pending "parses file paths"' '' + lib.optionalString (stdenv.cc.isClang && (stdenv.cc.libcxx != null)) '' # Darwin links against libc++ not libstdc++. Newer versions of clang (12+) require # libc++abi to be linked explicitly (see https://github.com/NixOS/nixpkgs/issues/166205).