Commit Graph

16 Commits

Author SHA1 Message Date
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
volth
dda95bae35 [bot] treewide: remove unused 'args@' in lambdas 2018-07-20 19:54:05 +00:00
Raitis Veinbahs
a6a2e75804 ruby-modules: Import gemset if it's a path OR a string. (#38959)
This fixes the bug introduced by 8686b98612 which broke bundlerEnv
exprs when gemdir was a string (thus making gemset a string by
`gemset = gemdir + "/gemset.nix"`) which made it being treated as a
set.
2018-04-15 11:53:15 +01:00
Aneesh Agrawal
36f1bcbeb8 ruby treewide: don't merge source into top-level
Keep the `source` attrset distinct to prevent its entries from merging
with the top level attrs.
Since each type of source has a different set of entries for `source`,
this is the easiest way to keep them together.
This will pave the way for a new `url` type of source.

This is a mass-rebuild of many ruby packages,
notably those using `git` type sources.
2018-01-04 02:28:33 -05:00
Aneesh Agrawal
8686b98612 ruby-modules: Allow overriding gemset
This allows patching the gemset output by bundix from a default.nix
file, making it easier to perform updates since the bundix update no
longer has to be manually updated.
2018-01-04 02:28:33 -05:00
Michael Fellinger
d36a83a784 bundlerEnv: support unicode executables (#31145) 2017-11-03 11:31:16 +00:00
Robin Gloster
0154d1b03f
fix evaluation
cc @nyarly
2017-07-30 00:03:24 +02:00
Judson
0641253ae6
Small changes in response to review. 2017-07-02 17:18:58 -07: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
Judson
603e84caef
Fixing an overload of "pname" 2017-06-25 17:40:22 -07:00
Judson
964d9b7a06
Made gemdir handling into a common function 2017-06-09 09:04:33 -07:00
Judson
0bde4071fc
Merge branch 'bundlerenv_usecases' of github.com:nyarly/nixpkgs into bundlerenv_usecases 2017-05-31 09:53:03 -07:00
Judson
c4fc70f53c
Starting to add tool builder. Extracting bundler file computation. 2017-05-31 09:44:46 -07:00
zimbatm
2b7cfdd6e9 fix missing variable in bundler-env 2017-05-29 13:27:41 +01:00
Judson
998d011e42
Restructuring files 2017-05-27 15:19:34 -07:00