Commit Graph

21 Commits

Author SHA1 Message Date
Animesh Sahu
6077061403
nixos/ruby-modules: proper treatment to ruby modules of type git/url 2023-06-15 17:18:11 +05:30
Arnout Engelen
c5e2f3c066
ruby: move towards ruby 3
Currently, `pkgs.ruby` is ruby 2.7.6, which is in 'security updates
only' mode and scheduled to go EOL April 2023. Updating `pkgs.ruby`
to be ruby 3.1 would be a rather large change, but using ruby 3 to
bootstrap building ruby itself would be a nice first step in that
direction.

Tested with asciidoctor that this indeed now allows building a ruby
application without getting ruby 2.7 in the build closure.

Also fixes #192729
2022-10-06 17:09:38 +02:00
github-actions[bot]
8aaeccd647
Merge master into staging-next 2022-07-26 06:02:16 +00:00
Sandro
1539747c7e
bundlerApp: set meta.mainProgram 2022-07-25 15:46:23 +02:00
Artturin
271665ec4c bundlerApp: put makeWrapper in nativeBuildInputs
fixes cross 'error: attribute 'runtimeShell' missing'
2022-07-14 22:08:56 +03:00
Naïm Favier
9160044f5f
treewide/makeWrapper: replace --run cd with --chdir
Lay the groundwork for switching to binary wrappers by reducing uses
of `--run` (which is not supported by `makeBinaryWrapper`).
2022-03-19 09:46:31 +01:00
Pavol Rusnak
a6ce00c50c
treewide: remove stdenv where not needed 2021-01-25 18:31:47 +01:00
Michael Fellinger
a2e73b062a
bundler: 1.17.3 -> 2.1.4 2020-04-03 23:52:14 +02:00
zimbatm
cef857e8b7 bundlerApp: avoid unecessary rebuilds when gemdir changes
Because the gemdir was referenced on the derivation, it would cause the
whole gemdir to get added to the store, which would in turn force the
derivation to be rebuilt whenever unrelated folder files would change.
2019-09-13 11:40:40 +00:00
worldofpeace
741163efdb
Merge pull request #65370 from Ma27/package-3llo
_3llo: init at 0.3.0
2019-08-25 15:42:13 -04:00
Maximilian Bosch
ebc4a417d0
ruby/bundlerApp: ignore gemset in env attribute set
The `gemset` field can be an attribute set as well in `buildRubyGem`,
however attribute sets can't be coerced to strings for the environment
set.

The impact should be relatively small as the environment variables are
only used by the `runCommand` script for `bunlderApp` which doesn't
refer to `gemset` at all.
2019-08-19 13:46:52 +02:00
Nick Novitski
ec3f7e3e54 bundlerApp: meta.platforms defaults to platforms of ruby dependency (#65697) 2019-08-01 08:44:30 +00:00
Lily Ballard
39eb49c9f0 bundlerApp: Set up passthru properly
The manual documents both bundlerEnv and bundlerApp as providing `env`
and `wrappedRuby` attributes on the resulting derivations. However only
bundlerEnv actually had these attributes. Update bundlerApp to provide
the same passthru that bundlerEnv does.
2019-06-10 14:13:04 -07:00
Michael Fellinger
5e1e055817 bundlerApp: don't execute postBuild twice 2019-04-30 17:16:31 +02:00
Lily Ballard
8e9796cae2 Make gemdir optional for bundlerApp
Like `bundlerEnv`, the `gemdir` parameter to `bundlerApp` can be omitted
if all 3 of `gemfile`, `lockfile`, and `gemset` are provided.
2019-04-10 13:26:31 -07:00
Nick Novitski
f2c07cd63e xcpretty: init at 0.3.0 (#48494) 2018-11-28 12:21:37 +01:00
Alyssa Ross
69dcb1a2c0 bundlerApp: take buildInputs (#45435)
It would be reasonable to have a Ruby program that depends on some other
program being in the PATH. In this case, the obvious thing to do would
be something like this:

    bundlerApp {
      # ...
      buildInputs = [ makeWrapper ];
      postBuild = ''
        wrapProgram "$out/bin/foo" \
          --prefix PATH : ${lib.makeBinPath [ dep ]}
      '';
    }

However, this doesn't work, because even though it just forwards most of
its arguments to `runCommand`, `bundlerApp` won't take a `buildInputs`
parameter. It doesn't even specify its own `buildInputs`, which means
that the `scripts` parameter to `bundlerApp` (which depends on
`makeWrapper`) is completely broken, and, as far as I can tell, has been
since its inception. I've added a `makeWrapper` build input if the
scripts parameter is present to fix this.

I've added a `buildInputs` option to `bundlerApp`. It's also passed
through to bundled-common because `postBuild` scripts are run there as
well. This actually means that in this example we'd end up going through
two layers of wrappers (one from `bundlerApp` and one from
bundled-common), but that has always been the case and isn't likely to
break anything. That oddity does suggest that it might be prudent to
not forward `postBuild` to bundled-common (or to at least use a
different option) though...

FWIW, as far as I can tell no package in nixpkgs uses either the
`scripts` or `postBuild` options to `bundlerApp`.
2018-10-29 22:39:51 +01:00
Michael Fellinger
34e1fa4a50 buildRubyGem: Provide manpages for Ruby gems (#49334) 2018-10-29 01:48:05 +01:00
Joe Hermaszewski
69017e46ae ruby bundlerApp: Allow passing gemConfig through to bundlerEnv 2018-04-09 18:51:34 +08:00
Judson
e149f02344
Using pname and fetching versions 2017-06-27 22:33:18 -07:00
Judson
70e7e543c5
A few cleanups and renames. One feature remains... 2017-06-27 10:56:36 -07:00