nixpkgs/pkgs/development
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
..
arduino
beam-modules
bower-modules/generic
compilers Merge pull request #49369 from Mic92/mono-cleanup3 2018-10-29 10:27:22 +00:00
coq-modules coqPackages.category-theory: fix build 2018-10-24 05:50:04 +00:00
dotnet-modules/patches
em-modules/generic
go-modules buildGoPackage: re-enable GOCACHE 2018-10-28 13:51:16 +00:00
guile-modules
haskell-modules Merge pull request #48699 from ElvishJerricco/overridable-buildFromSdist 2018-10-26 11:17:24 +01:00
idris-modules idrisPackages.{categories,derive}: Use upstream instead of forks 2018-10-26 11:15:10 +02:00
interpreters Merge pull request #49232 from geistesk/racket-7.1 2018-10-29 08:19:09 +00:00
java-modules
libraries Merge pull request #49070 from r-ryantm/auto-update/python3.6-dlib 2018-10-29 19:27:07 +01:00
lisp-modules
lua-modules
misc loc: enable darwin build 2018-10-27 10:05:01 +01:00
mobile
node-packages
ocaml-modules Merge pull request #49210 from r-ryantm/auto-update/ocaml4.06.1-ocaml-migrate-parsetree 2018-10-29 01:12:54 +00:00
perl-modules
pharo
pure-modules
python-modules Merge pull request #49070 from r-ryantm/auto-update/python3.6-dlib 2018-10-29 19:27:07 +01:00
r-modules
ruby-modules bundlerApp: take buildInputs (#45435) 2018-10-29 22:39:51 +01:00
tools gron: 0.5.2 -> 0.6.0 (#49282) 2018-10-29 11:56:56 +01:00
web