@@ -3907,15 +3907,13 @@ Fetch a [Ruby][ruby] gem from [Ruby community’s gem hosting service][rubygems]
39073907Types:
39083908
39093909- fetchRubyGem (` function { ... } -> package` ):
3910- - name (` str` ):
3911- Name of the gem to download.
3912- - version (` str` ):
3913- Version of the gem to download.
39143910 - sha256 (` str` ):
39153911 SHA256 of the expected output,
39163912 In order to get the SHA256
39173913 you can omit this parameter and execute Makes,
39183914 Makes will tell you the correct SHA256 on failure.
3915+ - url (` str` ):
3916+ url of the gem to download.
39193917
39203918Example:
39213919
@@ -3925,9 +3923,8 @@ Example:
39253923, ...
39263924}:
39273925fetchRubyGem {
3928- name = " slim" ;
3929- version = " 4.1.0" ;
3930- sha256 = " 0gjx30g84c82qzg32bd7giscvb4206v7mvg56kc839w9wjagn36n" ;
3926+ sha256 = " 04nc8x27hlzlrr5c2gn7mar4vdr0apw5xg22wp6m8dx3wqr04a0y" ;
3927+ url = " https://rubygems.org/downloads/ast-2.4.2.gem" ;
39313928}
39323929` ` `
39333930
@@ -4431,6 +4428,8 @@ $ m . /example
44314428Fetch and install the specified [Ruby][ruby] gems
44324429from the [Ruby community’s gem hosting service][rubygems].
44334430
4431+ Pre-requisites: [Generating a sourcesYaml](# makerubylock)
4432+
44344433Types:
44354434
44364435- makeRubyGemsInstall (` function { ... } -> package` ):
@@ -4439,11 +4438,12 @@ Types:
44394438 Custom name to assign to the build step, be creative, it helps in debugging.
44404439 - ruby (` enum [ " 2.7" " 3.0" ]` ):
44414440 Version of the [Ruby][ruby] interpreter.
4442- - rubyGems (` listOf (asIn fetchRubyGem)` ):
4443- Ruby gems specification that should be fetched and installed.
44444441 - searchPaths (` asIn makeSearchPaths` ): Optional.
44454442 Arguments here will be passed as-is to ` makeSearchPaths` .
44464443 Defaults to ` makeSearchPaths` ' s defaults.
4444+ - sourcesYaml (`package`):
4445+ `sources.yaml` file
4446+ computed as explained in the pre-requisites section.
44474447
44484448Example:
44494449
@@ -4455,23 +4455,7 @@ Example:
44554455makeRubyGemsInstall {
44564456 name = "example";
44574457 ruby = "3.0";
4458- rubyGems = [
4459- {
4460- name = "tilt";
4461- version = "2.0.10";
4462- sha256 = "0rn8z8hda4h41a64l0zhkiwz2vxw9b1nb70gl37h1dg2k874yrlv";
4463- }
4464- {
4465- name = "slim";
4466- version = "4.1.0";
4467- sha256 = "0gjx30g84c82qzg32bd7giscvb4206v7mvg56kc839w9wjagn36n";
4468- }
4469- {
4470- name = "temple";
4471- version = "0.8.2";
4472- sha256 = "060zzj7c2kicdfk6cpnn40n9yjnhfrr13d0rsbdhdij68chp2861";
4473- }
4474- ];
4458+ sourcesYaml = projectPath "/makes/example/sources.yaml";
44754459}
44764460```
44774461
@@ -4481,6 +4465,8 @@ Create an environment where the specified [Ruby][ruby] gems
44814465from the [Ruby community’s gem hosting service][rubygems]
44824466are available.
44834467
4468+ Pre-requisites: [Generating a sourcesYaml](#makerubylock)
4469+
44844470Types:
44854471
44864472- makeRubyGemsEnvironment (`function { ... } -> package`):
@@ -4489,8 +4475,6 @@ Types:
44894475 Custom name to assign to the build step, be creative, it helps in debugging.
44904476 - ruby (`enum [ "2.7" "3.0" ]`):
44914477 Version of the [Ruby][ruby] interpreter.
4492- - rubyGems (`listOf (asIn fetchRubyGem)`):
4493- Ruby gems specification that should be fetched and installed.
44944478 - searchPathsBuild (`asIn makeSearchPaths`): Optional.
44954479 Arguments here will be passed as-is to `makeSearchPaths`
44964480 and used while installing gems.
@@ -4499,6 +4483,9 @@ Types:
44994483 Arguments here will be passed as-is to ` makeSearchPaths`
45004484 and propagated to the runtime environment.
45014485 Defaults to ` makeSearchPaths` ' s defaults.
4486+ - sourcesYaml (`package`):
4487+ `sources.yaml` file
4488+ computed as explained in the pre-requisites section.
45024489
45034490Example:
45044491
@@ -4513,25 +4500,9 @@ let
45134500 env = makeRubyGemsEnvironment {
45144501 name = "example";
45154502 ruby = "3.0";
4516- rubyGems = [
4517- {
4518- name = "slim";
4519- sha256 = "0gjx30g84c82qzg32bd7giscvb4206v7mvg56kc839w9wjagn36n";
4520- version = "4.1.0";
4521- }
4522- {
4523- name = "temple";
4524- sha256 = "060zzj7c2kicdfk6cpnn40n9yjnhfrr13d0rsbdhdij68chp2861";
4525- version = "0.8.2";
4526- }
4527- {
4528- name = "tilt";
4529- sha256 = "0rn8z8hda4h41a64l0zhkiwz2vxw9b1nb70gl37h1dg2k874yrlv";
4530- version = "2.0.10";
4531- }
4532- ];
45334503 searchPathsBuild.bin = [ inputs.nixpkgs.gcc ];
45344504 searchPathsRuntime.rpath = [ inputs.nixpkgs.gcc.cc.lib ];
4505+ sourcesYaml = projectPath "/makes/example/sources.yaml";
45354506 };
45364507in
45374508makeScript {
0 commit comments