summary refs log tree commit diff
path: root/pkgs/build-support/buildenv
Commit message (Collapse)AuthorAge
* trivial-builders: merge passAsFile with env in runCommand'sternenseemann2021-03-18
| | | | | | | | | | | | Previously it was awkward to use the runCommand-variants with passAsFile as a double definition of passAsFile would potentially break runCommand: passAsFile would overwrite the previous definition, defeating the purpose of setting it in runCommand in the first place. This is now fixed by concatenating the [ "buildCommand" ] list with one the one from env, if present. Adjust buildEnv where passAsFile = null; was passed in some cases, breaking evaluation since it'd evaluate to [ "buildCommand" ] ++ null.
* buildEnv: Support `nativeBuildInputs` tooJohn Ericson2021-03-02
| | | | | | | | Since #112276, we should always put `makeWrapper` in `nativeBuildInputs`. But `buildEnv` was saying put it in `buildInputs`. That's wrong! Fix the instructions, and make the right thing possible.
* buildenv: paths to link resolving to the same absolute path is not a conflictJosé Romildo Malaquias2020-06-10
| | | | | | | | When building an environment if two paths conflict but one or both are symbolic links and they resolve to the same real path, the conflict is discarded because the contents of both paths are the same. One of them is chosen and there is no need to recur into them in order to build deeper symbolic links.
* buildEnv: check pathsToLink before checking collisionsLinus Heckemann2019-09-18
| | | | Fixes #32683
* Merge #55420: buildEnv, substituteAll: disable binary cacheVladimír Čunát2019-02-22
|\ | | | | | | ... into staging.
| * buildEnv: allowSubstitutes = falsevolth2019-02-07
| | | | | | trivial derivation
* | buildEnv: improve file check to avoid false-positivesMaximilian Bosch2019-02-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The original change in #55372 was supposed to fix the case where a store path which is a file should be placed into `buildEnv` which broke with a fairly misleading Perl error. Unfortunately this introduced a regression, `findFiles` can have targets that are files if the file isn't a store path. Rather than adding more obscure checks with probably further regressions, I figured that it's better to replicate the behavior of `lib.isStorePath` and explicitly check if the store path is a file and break in this case only. This should also fix recent staging issues.
* | buildEnv: break with a proper error if one path is actually a fileMaximilian Bosch2019-02-19
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | I noticed by creating `buildEnv` where I accidentally put a derivation from `pkgs.writeText` into `paths` and got a broken build with the following misleading error message: ``` Use of uninitialized value $stat1 in numeric ne (!=) at /nix/store/9g4wc31j7a2xp22xpgwr0qssfxahxdzl-builder.pl line 74. Use of uninitialized value $stat1 in bitwise and (&) at /nix/store/9g4wc31j7a2xp22xpgwr0qssfxahxdzl-builder.pl line 75. different permissions in `' and `/nix/store/0vy5ss91laxvwkyvrbld5hv27i88qk5w-noise': 0000 <-> 0444 at /nix/store/9g4wc31j7a2xp22xpgwr0qssfxahxdzl-builder.pl line 75. ``` It can be reproduced with an expression like this: ``` nix { pkgs ? import <nixpkgs> { } }: let file = pkgs.writeText "test" '' content ''; in pkgs.buildEnv { name = "test-env"; paths = [ /* ... */ file ]; } ```
* Merge pull request #27780 from tilpner/overridable-buildenvFrederik Rietdijk2017-09-14
|\ | | | | Make buildEnv overridable
| * buildenv: Make buildEnv overridabletilpner2017-08-02
| | | | | | | | | | | | | | | | callPackage already calls makeOverridable, but that just makes the function that evaluates to buildEnv overridable, not buildEnv itself. If no overridable version of buildEnv is used during construction, users can't override e.g. `paths` at all
| * buildenv: read propagated-user-env-packages line-by-lineThomas Tuegel2017-07-16
|/ | | | | | | | | Since 3cb745d5a69018829ac15f7d5a508135f6bda123, the format of propagated-user-env-packages has changed and propagated packages have not been included by buildenv, including in the system environment. The buildenv builder is modified to read propagated-user-env-packages line-by-line, instead of expecting all packages on one line.
* buildEnv: use buildPackages.perl so crossDrv worksEric Litak2017-04-14
|
* buildEnv: build the whole tree of directories to pathsToLinkAlexey Shmalko2016-07-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes #16614 and #16741. The first issue was caused by the fact that both `/share` and `/share/fish/vendor_completions.d` end in the `pathsToLink`. The `pkgs/build-support/buildenv/builder.pl` creates `/share`, then links `/share/fish` under `/share` and then tries to create the directory `/share/fish/vendor_completions.d` and fails because it already exists. The simplest way to reproduce the issue is to build the next Nix expression: ```nix let pkgs = import <nixpkgs> { }; in pkgs.buildEnv { name = "buildenv-issue"; paths = [ pkgs.fish pkgs.vim ]; pathsToLink = [ "/share" "/share/fish/vendor_completions.d" ]; } ``` The second issue is more critical and was caused by the fact findFiles doesn't recurse deep enough. It stops at first unique directory for the package (e.g., "/share" or even "/") and later the scripts decides it shouldn't link it as it doesn't match pathsToLink (e.g., "/share/fish"), so the result is empty. The test: ```nix let pkgs = import <nixpkgs> { }; in pkgs.buildEnv { name = "buildenv-issue"; paths = [ pkgs.fish pkgs.vim ]; pathsToLink = [ "/share/fish/functions" ]; } ``` or ```nix let pkgs = import <nixpkgs> { }; in pkgs.buildEnv { name = "buildenv-issue"; paths = [ pkgs.vim ]; pathsToLink = [ "/share" ]; } ```
* buildEnv: fix #14682 evaluation in some edge casesVladimír Čunát2016-04-17
| | | | | | I supplied meta.outputsToInstall automatically in all mkDerivation products, but some packages still don't use it. The reported case: jekyll -> bundlerEnv -> buildEnv -> runCommand.
* treewide: rename extraOutputs{ToLink,ToInstall}Vladimír Čunát2016-04-07
| | | | This is to get more consistent with `meta.outputsToInstall`.
* buildEnv: respect meta.outputsToInstallVladimír Čunát2016-04-07
| | | | | | As a result `systemPackages` now also respect it. Only nix-env remains and that has a PR filed: https://github.com/NixOS/nix/pull/815
* Merge branch 'closure-size' into p/default-outputsVladimír Čunát2016-03-14
|\
| * Merge recent 'staging' into closure-sizeVladimír Čunát2016-02-03
| |\ | | | | | | | | | Let's get rid of those merge conflicts.
| | * buildEnv: Pass the right number of args to addPkgaszlig2016-01-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regression introduced by 4529ed12590d7f814e40223437c7df4fea492e2d. I've missed this in #5096, not because of a messed up rebase as I have guessed from a comment on #12635 but missed this in the first place. The testing I did while working on the pull request weren't exhaustive enough to cover this, because I haven't tested with packages that use the propagatedUserEnvPkgs attribute. In order to make the test a bit more exhaustive this time, let's test it using: nix-build -E 'with import ./. {}; buildEnv { name = "testenv"; paths = [ pkgs.hello pkgs.binutils pkgs.libsoup pkgs.gnome3.yelp pkgs.gnome3.totem ]; }' And with this commit the errors no longer show up and the environment is built correctly. Signed-off-by: aszlig <aszlig@redmoonstudios.org> Fixes: #12635
| | * buildEnv: Skip content check on ignoreCollisions.aszlig2016-01-18
| | | | | | | | | | | | | | | | | | | | | Checking file contents is redundant in this case, because we will go ahead anyway, regardless of whether the content is the same. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
| | * buildEnv: Check the content of colliding paths.aszlig2016-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally wanted to include ignoreCollisions in cups-progs, but I think it's better if we use ignoreCollisions only if there are _real_ collisions between files with different contents. Of course, we also check whether the file permissions match, so you get a collision if contents are the same but the permissions are different. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
* | | nixos systemPackages: rework default outputsVladimír Čunát2016-01-28
|/ / | | | | | | | | | | | | | | | | | | | | - Now `pkg.outputUnspecified = true` but this attribute is missing in every output, so we can recognize whether the user chose or not. If (s)he didn't choose, we put `pkg.bin or pkg.out or pkg` into `systemPackages`. - `outputsToLink` is replaced by `extraOutputsToLink`. We add extra outputs *regardless* of whether the user chose anything. It's mainly meant for outputs with docs and debug symbols. - Note that as a result, some libraries will disappear from system path.
* | Merge branch 'master' into closure-sizeLuca Bruno2015-12-11
|\|
| * buildEnv: Allow setting meta attributesTuomas Tynkkynen2015-11-29
| |
* | Fix system-path with multioutLuca Bruno2015-12-01
|/
* Fix buildenvWilliam A. Kennington III2015-10-30
|
* Merge branch 'master.upstream' into staging.upstreamWilliam A. Kennington III2015-10-30
|\
| * Add option to link additional package outputs into system.pathEelco Dolstra2015-10-30
| | | | | | | | | | This is necessary to get stuff like separate manpages, info files, debug symbols, etc.
* | buildenv: support very long `paths`Nikolay Amiantov2015-10-22
|/
* buildEnv: add new parameters: extraPrefix and buildInputsVladimír Čunát2015-09-17
|
* buildEnv: Fix handling of empty list of packagesEelco Dolstra2015-08-25
|
* buildEnv: Support package priorities like nix-envEelco Dolstra2015-08-25
| | | | This gets rid of a bunch of collision warnings.
* buildEnv to support passthruFlorian Friesdorf2014-07-10
|
* buildEnv: don't warn about collisions in propagated packagesEelco Dolstra2012-07-25
| | | | This mimicks buildenv in Nix more closely.
* * Set preferLocalBuild on a few more trivial builders.Eelco Dolstra2012-04-26
| | | | svn path=/nixpkgs/trunk/; revision=33935
* * buildEnv: use $SHELL (i.e. bash) rather than /bin/sh. This allowsEelco Dolstra2010-11-03
| | | | | | | NixOS VM tests to be built on Ubuntu, where /bin/sh is dash rather than bash. svn path=/nixpkgs/trunk/; revision=24592
* * Make sure that if pathsToLink contains an element such asEelco Dolstra2010-08-09
| | | | | | "/share/info" that it doesn't match "/share/information.nix". svn path=/nixpkgs/trunk/; revision=23059
* * Ignore non-existant directories.Eelco Dolstra2010-08-07
| | | | svn path=/nixpkgs/trunk/; revision=23026
* * Remove the call to update-mime-database, which doesn't belong hereEelco Dolstra2010-07-08
| | | | | | but in the postBuild hook. svn path=/nixpkgs/trunk/; revision=22527
* * First figure out what symlinks need to be created, then createEelco Dolstra2010-07-08
| | | | | | | them. This prevents unnecessary unlink operations to resolve collisions between directories. svn path=/nixpkgs/trunk/; revision=22526
* Build MIME database from all available packagesYury G. Kudryashov2010-04-14
| | | | svn path=/nixpkgs/trunk/; revision=21076
* Ignore fake collisionsYury G. Kudryashov2010-04-14
| | | | svn path=/nixpkgs/trunk/; revision=21075
* Remove tabsYury G. Kudryashov2010-04-10
| | | | svn path=/nixpkgs/trunk/; revision=21004
* revrting my accident only keeping rubygem updates and ruby libsMarc Weber2009-06-30
| | | | | | This partially reverts commit -r 16100 svn path=/nixpkgs/trunk/; revision=16107
* adding rubygems support to nix - implemented target libraries/apps: sup mail ↵Marc Weber2009-06-30
| | | | | | client svn path=/nixpkgs/trunk/; revision=16100
* * Support a post-install hook.Eelco Dolstra2009-02-20
| | | | svn path=/nixpkgs/trunk/; revision=14142
* nixpkgs dir: nvidia and libsrvgWouter den Breejen2007-05-28
| | | | svn path=/nixpkgs/trunk/; revision=8785
* * Process packages in the specified order (i.e., don't sort).Eelco Dolstra2007-03-04
| | | | svn path=/nixpkgs/trunk/; revision=8166
* * Fork of build-env in the Nix distribution. This one supportsEelco Dolstra2006-11-28
ignoring collisions and selectively including directories. svn path=/nixpkgs/trunk/; revision=7160