Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework project to allow multiple package sets #23

Merged
merged 54 commits into from
Dec 24, 2022
Merged
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
846f12b
use JSON for version information
bobvanderlinden Dec 20, 2022
8a0ad50
introduce overrides
bobvanderlinden Dec 20, 2022
6725cee
generalize mkPackage by avoiding rubySrc and using versionSource
bobvanderlinden Dec 20, 2022
d206110
define rubygems using overrides
bobvanderlinden Dec 20, 2022
61cf5a8
generalize mkPackages
bobvanderlinden Dec 20, 2022
eeccd5c
simplify ruby version handling
bobvanderlinden Dec 20, 2022
04fc4f4
fix version-comparison
bobvanderlinden Dec 20, 2022
e711f82
fix mkRuby
bobvanderlinden Dec 20, 2022
478c263
check ruby execution instead of builds
bobvanderlinden Dec 20, 2022
5052f0b
remove lib/version.nix
bobvanderlinden Dec 20, 2022
2db6a63
remove unused versions directory and derivation.nix
bobvanderlinden Dec 20, 2022
36ddc1a
move ruby-related files to ruby/
bobvanderlinden Dec 20, 2022
cebb3ad
format mkRuby
bobvanderlinden Dec 20, 2022
e8b2488
introduce ruby/default.nix
bobvanderlinden Dec 20, 2022
47b73b4
make flake outputs use pkgsets generically
bobvanderlinden Dec 21, 2022
73d5427
make rubygems a pkgset
bobvanderlinden Dec 21, 2022
cde7828
support empty version to specify default package name
bobvanderlinden Dec 21, 2022
5bb3880
fix version comparison of has*
bobvanderlinden Dec 21, 2022
baa7143
rubygems: move versions to json file
bobvanderlinden Dec 21, 2022
5d3888e
rubygems: remove unused files
bobvanderlinden Dec 21, 2022
864169d
update: use new location of ruby updater
bobvanderlinden Dec 21, 2022
18e8824
rubygems: simplify overrides for <3
bobvanderlinden Dec 21, 2022
8b7345b
ruby: avoid having a patches argument
bobvanderlinden Dec 21, 2022
92212b9
version-comparison: introduce hasPrefix
bobvanderlinden Dec 21, 2022
93a618c
version-comparison: remove hasMajor* methods
bobvanderlinden Dec 21, 2022
2ec7823
generalize pkgset updating
bobvanderlinden Dec 22, 2022
ec3fac7
README: match the new structure
bobvanderlinden Dec 22, 2022
932140a
generalize overlays
bobvanderlinden Dec 22, 2022
84c31cc
update the default template
bobvanderlinden Dec 22, 2022
2793792
check all Ruby versions
bobvanderlinden Dec 22, 2022
42e45c3
ci: use cachix instead of GHA cache
bobvanderlinden Dec 22, 2022
1943146
ci: avoid failing early with checks
bobvanderlinden Dec 22, 2022
016e022
add nixConfig for cachix
bobvanderlinden Dec 22, 2022
d7821c0
rubygems: add updater
bobvanderlinden Dec 22, 2022
5edc82a
ci: disable fail-fast
bobvanderlinden Dec 23, 2022
9672063
allow marking broken ruby versions
bobvanderlinden Dec 23, 2022
0e8e3de
fix hash for 3.0.0 patch
bobvanderlinden Dec 23, 2022
4f7e736
rename check commands to check-ruby-X.X.X
bobvanderlinden Dec 23, 2022
14d2fac
ci: nicer name for check step
bobvanderlinden Dec 23, 2022
781b4d8
flake: use extra-substituters instead of substituters
bobvanderlinden Dec 23, 2022
1f2e273
ruby: make 3.0.0-3.0.3 use openssl1.1 as well
bobvanderlinden Dec 23, 2022
75d8add
ruby: mark 2.5.8 as broken
bobvanderlinden Dec 23, 2022
13b1c6a
rubygems: move >3 patches to package-fn
bobvanderlinden Dec 23, 2022
dd96673
rubygems: update hashes from ci
bobvanderlinden Dec 23, 2022
86cd604
ruby: remove unused args
bobvanderlinden Dec 23, 2022
0bc399c
ruby: apply rubygems-2.6 only for <2.4, not 2.4.0
bobvanderlinden Dec 23, 2022
d1a7024
stop adding custom rubygems
bobvanderlinden Dec 24, 2022
52d6da9
ruby: remove unclear comment
bobvanderlinden Dec 24, 2022
24e03da
change maintainer
bobvanderlinden Dec 24, 2022
c4afbe4
change metadata
bobvanderlinden Dec 24, 2022
ec7cfa5
Revert "stop adding custom rubygems"
bobvanderlinden Dec 24, 2022
5b54002
make adding custom rubygems optional
bobvanderlinden Dec 24, 2022
12d991d
remove custom rubygems for ruby >=3.1.3
bobvanderlinden Dec 24, 2022
d3c4644
remove newlines to match build that was cached already
bobvanderlinden Dec 24, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
version-comparison: remove hasMajor* methods
bobvanderlinden committed Dec 21, 2022
commit 93a618c6b02931a7683591e0e818886661b2d0bc
9 changes: 3 additions & 6 deletions lib/version-comparison.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Usage:
# with (import version-comparison.nix) version;
# hasMajor 3 && lessThan "3.2"
# hasPrefix "3" && lessThan "3.2"
# Examples:
# Apply patches only to 3.x, but the patch is already available from > 3.2
# hasMajor 3 && lessThan "3.2"
# Apply patch to problem only to 3.x, but problem was resolved in 3.2
# hasPrefix "3" && lessThan "3.2"
let
inherit (builtins) compareVersions genList length elemAt all;
hasPrefixList = prefix: list:
@@ -24,9 +24,6 @@ rec {
greaterOrEqualTo = comparison: compareVersions version comparison >= 0;
lessOrEqualTo = comparison: compareVersions version comparison <= 0;
inRange = from: to: greaterOrEqualTo from && lessOrEqualTo to;
hasMajor = major: (greaterOrEqualTo "${toString major}") && (lessThan "${toString (major + 1)}");
hasMajorMinor = major: minor: (greaterOrEqualTo "${toString major}.${toString minor}") && (lessThan "${toString major}.${toString (minor + 1)}");
hasMajorMinorPatch = major: minor: patch: (greaterOrEqualTo "${toString major}.${toString minor}.${toString patch}") && (lessThan "${toString major}.${toString minor}.${toString (patch + 1)}");
hasPrefix = prefix:
let
prefixSegments = builtins.splitVersion prefix;