diff --git a/pkgs/development/compilers/crystal/default.nix b/pkgs/development/compilers/crystal/default.nix index 03a914695a06..124643443482 100644 --- a/pkgs/development/compilers/crystal/default.nix +++ b/pkgs/development/compilers/crystal/default.nix @@ -58,16 +58,17 @@ let outputs = [ "out" "lib" "bin" ]; - # we are almost able to run the full test suite now postPatch = '' substituteInPlace src/crystal/system/unix/time.cr \ --replace /usr/share/zoneinfo ${tzdata}/share/zoneinfo ln -s spec/compiler spec/std + mkdir /tmp/crystal substituteInPlace spec/std/file_spec.cr \ --replace '/bin/ls' '${coreutils}/bin/ls' \ - --replace '/usr/share' '/tmp/test' + --replace '/usr/share' '/tmp/crystal' \ + --replace '/usr' '/tmp' substituteInPlace spec/std/process_spec.cr \ --replace '/bin/cat' '${coreutils}/bin/cat' \ @@ -76,8 +77,23 @@ let --replace '"env"' '"${coreutils}/bin/env"' \ --replace '"/usr"' '"/tmp"' + substituteInPlace spec/std/socket/tcp_server_spec.cr \ + --replace '{% if flag?(:gnu) %}"listen: "{% else %}"bind: "{% end %}' '"bind: "' + substituteInPlace spec/std/system_spec.cr \ --replace '`hostname`' '`${nettools}/bin/hostname`' + + # See https://github.com/crystal-lang/crystal/pull/8640 + substituteInPlace spec/std/http/cookie_spec.cr \ + --replace '01 Jan 2020' '01 Jan #{Time.utc.year + 2}' + + # See https://github.com/crystal-lang/crystal/issues/8629 + substituteInPlace spec/std/socket/udp_socket_spec.cr \ + --replace 'it "joins and transmits to multicast groups"' 'pending "joins and transmits to multicast groups"' + + # See https://github.com/crystal-lang/crystal/pull/8699 + substituteInPlace spec/std/xml/xml_spec.cr \ + --replace 'it "handles errors"' 'pending "handles errors"' ''; buildInputs = commonBuildInputs extraBuildInputs; @@ -189,6 +205,24 @@ in rec { }; }; + binaryCrystal_0_30 = genericBinary { + version = "0.30.1"; + sha256s = { + x86_64-linux = "1k2mb74jh3ns3m7y73j4wpf571sayn73zbn6d7q81d09r280zrma"; + i686-linux = "0vsq1ayf922spydp2g2mmimc797jmm7nl5nljhfppcclrwygdyk2"; + x86_64-darwin = "1p3s4lwdgykb7h7aysjhrs7vm0zhinzw5d7rfv6jsyin4j8yxhzz"; + }; + }; + + binaryCrystal_0_31 = genericBinary { + version = "0.31.1"; + sha256s = { + x86_64-linux = "0r8salf572xrnr4m6ll9q5hz6jj8q7ff1rljlhmqb1r26a8mi2ih"; + i686-linux = "0hridnis5vvrswflx0q67xfg5hryhz6ivlwrb9n4pryj5d1gwjrr"; + x86_64-darwin = "1dgxgv0s3swkc5cwawzgpbc6bcd2nx4hjxc7iw2h907y1vgmbipz"; + }; + }; + crystal_0_25 = generic { version = "0.25.1"; sha256 = "15xmbkalsdk9qpc6wfpkly3sifgw6a4ai5jzlv78dh3jp7glmgyl"; @@ -228,18 +262,16 @@ in rec { version = "0.31.1"; sha256 = "1dswxa32w16gnc6yjym12xj7ibg0g6zk3ngvl76lwdjqb1h6lwz8"; doCheck = false; # 5 checks are failing now - binary = crystal_0_30; + binary = binaryCrystal_0_30; }; crystal_0_32 = generic { - version = "255bfc5fa925b95b72e34b26ad997fb2b3f83059"; - sha256 = "1dgk36cj5lwhs1c4zp0s1c9hjk0h3vljq6zwhlnzkl1xs7cgzim1"; - doCheck = false; # 5 checks are failing now - binary = crystal_0_31; - extraBuildInputs = [ readline ]; + version = "0.32.1"; + sha256 = "120ndi3nhh2r52hjvhwfb49cdggr1bzdq6b8xg7irzavhjinfza6"; + binary = binaryCrystal_0_31; }; - crystal = crystal_0_31; + crystal = crystal_0_32; crystal2nix = callPackage ./crystal2nix.nix {}; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d60fa665e0db..2feb885ba5dd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7890,6 +7890,7 @@ in crystal_0_29 crystal_0_30 crystal_0_31 + crystal_0_32 crystal crystal2nix;