nixpkgs/pkgs/development/ruby-modules
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
..
bundix pkgs: refactor needless quoting of homepage meta attribute (#27809) 2017-08-01 22:03:30 +02:00
bundled-common bundlerApp: take buildInputs (#45435) 2018-10-29 22:39:51 +01:00
bundler bundler: 1.16.3 -> 1.16.6 2018-10-17 16:20:03 +01:00
bundler-app bundlerApp: take buildInputs (#45435) 2018-10-29 22:39:51 +01:00
bundler-env [bot] treewide: remove unused 'args@' in lambdas 2018-07-20 19:54:05 +00:00
gem buildRubyGem: Provide manpages for Ruby gems (#49334) 2018-10-29 01:48:05 +01:00
gem-config gem-config: capybara-webkit: qt48 -> qt59 2018-10-23 16:14:21 +01:00
solargraph solargraph: 0.28.1 -> 0.28.2 (#47944) 2018-10-06 15:34:37 +02:00
testing reewide: Purge all uses stdenv.system and top-level system 2018-08-30 17:20:32 -04:00
runtests.sh Small changes in response to review. 2017-07-02 17:18:58 -07:00