File tree Expand file tree Collapse file tree 3 files changed +34
-11
lines changed Expand file tree Collapse file tree 3 files changed +34
-11
lines changed Original file line number Diff line number Diff line change 2
2
description = "mkRuby to build a version of Ruby" ;
3
3
4
4
inputs . flake-utils . url = "github:numtide/flake-utils" ;
5
- inputs . nixpkgs . url = "github:NixOS/nixpkgs/nixos-23.05 " ;
5
+ inputs . nixpkgs . url = "github:NixOS/nixpkgs/nixos-23.11 " ;
6
6
inputs . flake-compat . url = "github:edolstra/flake-compat" ;
7
7
inputs . flake-compat . flake = false ;
8
8
Original file line number Diff line number Diff line change 1
1
{ versionComparison
2
2
, openssl_1_1
3
+ , stdenv
3
4
} :
4
5
[
6
+ # Some of the older versions do not build.
5
7
{
6
8
condition = version : with versionComparison version ;
7
9
composeAny hasPrefix [
24
26
] ;
25
27
override = pkg : pkg . overrideAttrs ( finalAttrs : previousAttrs : { meta = previousAttrs . meta // { broken = true ; } ; } ) ;
26
28
}
29
+ # Some of the older versions do not build on OSX. Mark these as broken.
30
+ {
31
+ condition = version : stdenv . isDarwin && ( with versionComparison version ;
32
+ composeAny hasPrefix [
33
+ "2.2.1"
34
+ "2.2.2"
35
+ "2.2.3"
36
+ "2.2.4"
37
+ "2.2.5"
38
+ "2.2.6"
39
+ "2.2.7"
40
+ "2.2.8"
41
+ "2.2.9"
42
+ "2.6.7"
43
+ ] ) ;
44
+ override = pkg : pkg . overrideAttrs ( finalAttrs : previousAttrs : { meta = previousAttrs . meta // { broken = true ; } ; } ) ;
45
+ }
46
+ # Ruby 3.1 introduced support for OpenSSL 3, everything before that uses OpenSSL 1.1.
27
47
{
28
48
condition = version : with versionComparison version ;
29
49
lessThan "3.1" ;
30
50
override = pkg : pkg . override { openssl = openssl_1_1 ; } ;
31
51
}
52
+ # Ruby nowadays uses an convention for libDir = MAJOR.MINOR.0.
53
+ # This wasn't the case for Ruby < 3.
32
54
{
33
55
condition = version : with versionComparison version ;
34
56
hasPrefix "2.0" ;
39
61
hasPrefix "1.9" && greaterOrEqualTo "1.9.1" ;
40
62
override = pkg : pkg . override { libDir = "1.9.1" ; } ;
41
63
}
64
+ # yjit support was introduced in Ruby 3.2. Disable it for older versions.
42
65
{
43
66
condition = version : with versionComparison version ;
44
67
lessThan "3.2" ;
You can’t perform that action at this time.
0 commit comments