69dcb1a2c0
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`. |
||
---|---|---|
.github | ||
doc | ||
lib | ||
maintainers | ||
nixos | ||
pkgs | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.version | ||
COPYING | ||
default.nix | ||
README.md |
Nixpkgs is a collection of packages for the Nix package manager. It is periodically built and tested by the Hydra build daemon as so-called channels. To get channel information via git, add nixpkgs-channels as a remote:
% git remote add channels https://github.com/NixOS/nixpkgs-channels.git
For stability and maximum binary package support, it is recommended to maintain
custom changes on top of one of the channels, e.g. nixos-18.09
for the latest
release and nixos-unstable
for the latest successful build of master:
% git remote update channels
% git rebase channels/nixos-18.09
For pull-requests, please rebase onto nixpkgs master
.
NixOS Linux distribution source code is located inside
nixos/
folder.
- NixOS installation instructions
- Documentation (Nix Expression Language chapter)
- Manual (How to write packages for Nix)
- Manual (NixOS)
- Community maintained wiki
- Continuous package builds for unstable/master
- Continuous package builds for 18.09 release
- Tests for unstable/master
- Tests for 18.09 release
Communication:
Note: MIT license does not apply to the packages built by Nixpkgs, merely to the package descriptions (Nix expressions, build scripts, and so on). It also might not apply to patches included in Nixpkgs, which may be derivative works of the packages to which they apply. The aforementioned artifacts are all covered by the licenses of the respective packages.