about summary refs log tree commit diff
path: root/pkgs/stdenv/generic
Commit message (Collapse)AuthorAge
* stdenv-generic: add meta attributes checksEric Sagnes2017-04-29
|
* treewide: fix the remaining issues with meta attributesDan Peebles2017-04-29
|
* treewide: fix assorted issues revealed by the meta checkerDan Peebles2017-04-28
| | | Turns out a couple of the licenses were wrong, as well as being strings.
* stdenv-generic: add meta attribute checkingDan Peebles2017-04-28
| | | | This is turned off by default but I think we should fix all packages to respect it and then turn it on by default
* mkDerivation: Don't pass buildInputs to stdenv builder in nativeBuildInputsTuomas Tynkkynen2017-03-02
| | | | | | | | | | | | | | | | | | When not cross compiling, nativeBuildInputs and buildInputs have identical behaviour. Currently that is implemented by having mkDerivation do a concatenation of those variables in Nix code and pass that to the builder via the nativeBuildInputs attribute. However, that has some annoying side effects, like `foo.buildInputs` evaluating to `[ ]` even if buildInputs were specified in the nix expression for foo. Instead, pass buildInputs and nativeBuildInputs in separate variables as usual, and move the logic of cross compilation vs. native compilation to the stdenv builder script. This is probably a tiny bit uglier but fixes the previous problem. Issue #4855.
* nixpkgs: allow packages to be marked insecureGraham Christensen2017-02-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a package's meta has `knownVulnerabilities`, like so: stdenv.mkDerivation { name = "foobar-1.2.3"; ... meta.knownVulnerabilities = [ "CVE-0000-00000: remote code execution" "CVE-0000-00001: local privilege escalation" ]; } and a user attempts to install the package, they will be greeted with a warning indicating that maybe they don't want to install it: error: Package ‘foobar-1.2.3’ in ‘...default.nix:20’ is marked as insecure, refusing to evaluate. Known issues: - CVE-0000-00000: remote code execution - CVE-0000-00001: local privilege escalation You can install it anyway by whitelisting this package, using the following methods: a) for `nixos-rebuild` you can add ‘foobar-1.2.3’ to `nixpkgs.config.permittedInsecurePackages` in the configuration.nix, like so: { nixpkgs.config.permittedInsecurePackages = [ "foobar-1.2.3" ]; } b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add ‘foobar-1.2.3’ to `permittedInsecurePackages` in ~/.config/nixpkgs/config.nix, like so: { permittedInsecurePackages = [ "foobar-1.2.3" ]; } Adding either of these configurations will permit this specific version to be installed. A third option also exists: NIXPKGS_ALLOW_INSECURE=1 nix-build ... though I specifically avoided having a global file-based toggle to disable this check. This way, users don't disable it once in order to get a single package, and then don't realize future packages are insecure.
* Revert "nixpkgs: allow packages to be marked insecure"Graham Christensen2017-02-23
|
* nixpkgs: allow packages to be marked insecureGraham Christensen2017-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a package's meta has `knownVulnerabilities`, like so: stdenv.mkDerivation { name = "foobar-1.2.3"; ... meta.knownVulnerabilities = [ "CVE-0000-00000: remote code execution" "CVE-0000-00001: local privilege escalation" ]; } and a user attempts to install the package, they will be greeted with a warning indicating that maybe they don't want to install it: error: Package ‘foobar-1.2.3’ in ‘...default.nix:20’ is marked as insecure, refusing to evaluate. Known issues: - CVE-0000-00000: remote code execution - CVE-0000-00001: local privilege escalation You can install it anyway by whitelisting this package, using the following methods: a) for `nixos-rebuild` you can add ‘foobar-1.2.3’ to `nixpkgs.config.permittedInsecurePackages` in the configuration.nix, like so: { nixpkgs.config.permittedInsecurePackages = [ "foobar-1.2.3" ]; } b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add ‘foobar-1.2.3’ to `permittedInsecurePackages` in ~/.config/nixpkgs/config.nix, like so: { permittedInsecurePackages = [ "foobar-1.2.3" ]; } Adding either of these configurations will permit this specific version to be installed. A third option also exists: NIXPKGS_ALLOW_INSECURE=1 nix-build ... though I specifically avoided having a global file-based toggle to disable this check. This way, users don't disable it once in order to get a single package, and then don't realize future packages are insecure.
* ~/.nixpkgs -> ~/.config/nixpkgsEelco Dolstra2017-02-01
| | | | | | The former is still respected as a fallback for config.nix for backwards compatibility (but not for overlays because they're a new feature).
* stdenv: make is64bit evaluate true on aarch64Tuomas Tynkkynen2017-01-29
| | | | This should fix the NSS build.
* stdenv: Bringup aarch64 architecture supportTuomas Tynkkynen2017-01-25
|
* top-level: Introduce `buildPackages` for resolving build-time depsJohn Ericson2017-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [N.B., this package also applies to the commits that follow it in the same PR.] In most cases, buildPackages = pkgs so things work just as before. For cross compiling, however, buildPackages is resolved as the previous bootstrapping stage. This allows us to avoid the mkDerivation hacks cross compiling currently uses today. To avoid a massive refactor, callPackage will splice together both package sets. Again to avoid churn, it uses the old `nativeDrv` vs `crossDrv` to do so. So now, whether cross compiling or not, packages with get a `nativeDrv` and `crossDrv`---in the non-cross-compiling case they are simply the same derivation. This is good because it reduces the divergence between the cross and non-cross dataflow. See `pkgs/top-level/splice.nix` for a comment along the lines of the preceding paragraph, and the code that does this splicing. Also, `forceNativeDrv` is replaced with `forceNativePackages`. The latter resolves `pkgs` unless the host platform is different from the build platform, in which case it resolves to `buildPackages`. Note that the target platform is not important here---it will not prevent `forcedNativePackages` from resolving to `pkgs`. -------- Temporarily, we make preserve some dubious decisions in the name of preserving hashes: Most importantly, we don't distinguish between "host" and "target" in the autoconf sense. This leads to the proliferation of *Cross derivations currently used. What we ought to is resolve native deps of the cross "build packages" (build = host != target) package set against the "vanilla packages" (build = host = target) package set. Instead, "build packages" uses itself, with (informally) target != build in all cases. This is wrong because it violates the "sliding window" principle of bootstrapping stages that shifting the platform triple of one stage to the left coincides with the next stage's platform triple. Only because we don't explicitly distinguish between "host" and "target" does it appear that the "sliding window" principle is preserved--indeed it is over the reductionary "platform double" of just "build" and "host/target". Additionally, we build libc, libgcc, etc in the same stage as the compilers themselves, which is wrong because they are used at runtime, not build time. Fixing this is somewhat subtle, and the solution and problem will be better explained in the commit that does fix it. Commits after this will solve both these issues, at the expense of breaking cross hashes. Native hashes won't be broken, thankfully. -------- Did the temporary ugliness pan out? Of the packages that currently build in `release-cross.nix`, the only ones that have their hash changed are `*.gcc.crossDrv` and `bootstrapTools.*.coreutilsMinimal`. In both cases I think it doesn't matter. 1. GCC when doing a `build = host = target = foreign` build (maximally cross), still defines environment variables like `CPATH`[1] with packages. This seems assuredly wrong because whether gcc dynamically links those, or the programs built by gcc dynamically link those---I have no idea which case is reality---they should be foreign. Therefore, in all likelihood, I just made the gcc less broken. 2. Coreutils (ab)used the old cross-compiling infrastructure to depend on a native version of itself. When coreutils was overwritten to be built with fewer features, the native version it used would also be overwritten because the binding was tight. Now it uses the much looser `BuildPackages.coreutils` which is just fine as a richer build dep doesn't cause any problems and avoids a rebuild. So, in conclusion I'd say the conservatism payed off. Onward to actually raking the muck in the next PR! [1]: https://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html
* top-level: Modernize stdenv.overrides giving it self and superJohn Ericson2017-01-13
| | | | Document breaking change in 17.03 release notes
* allowUnfree: mention the solution that works for nix-shell as wellDomen Kožar2016-11-16
|
* Merge pull request #18660 from aneeshusa/add-override-attrsDomen Kožar2016-10-30
|\ | | | | mkDerivation: add overrideAttrs function
| * mkDerivation: add overrideAttrs functionAneesh Agrawal2016-10-02
| | | | | | | | | | | | | | | | | | This is similar to `overrideDerivation`, but overrides the arguments to `mkDerivation` instead of the underlying `derivation` call. Also update `makeOverridable` so that uses of `overrideAttrs` can be followed by `override` and `overrideDerivation`, i.e. they can be mix-and-matched.
* | Merge pull request #19769 from groxxda/licenseJoachim F2016-10-24
|\ \ | | | | | | stdenv.hasLicense: ? supports nested lookup
| * | stdenv.hasLicense: ? supports nested lookupAlexander Ried2016-10-22
| | | | | | | | | | | | this avoids one copy of the attrset
* | | stdenv: throwEvalHelp performance (#19779)Alexander Ried2016-10-22
|/ /
* | stdenv stripHash(): fixup after #19324Vladimír Čunát2016-10-12
| |
* | stdenv/stripHash: print to stdout, not to variableProfpatsch2016-10-11
| | | | | | | | | | | | | | | | | | | | `stripHash` documentation states that it prints out the stripped name to the stdout, but the function stored the value in `strippedName` instead. Basically all usages did something like `$(stripHash $foo | echo $strippedName)` which is just braindamaged. Fixed the implementation and all invocations.
* | stdenv.mkDerivation: add comments w/ manual links (#18707)Chris Martin2016-09-18
|/
* stdenv: leave SSL_CERT_FILE in shells (#15571)Nikolay Amiantov2016-09-01
|
* stdenv.mkDerivation: Use chooseDevOutputsTuomas Tynkkynen2016-08-29
|
* Merge remote-tracking branch 'upstream/master' into stagingRobin Gloster2016-08-29
|\
| * stdenv: Add platformsTuomas Tynkkynen2016-08-28
| |
* | Tweak error messageEelco Dolstra2016-08-26
| |
* | stdenv substitute: fail on non-existant input fileRobin Gloster2016-08-26
|/ | | | fixes #9744
* pkgs.runCommand: passAsFile (buildCommand can be very long)Domen Kožar2016-06-10
| | | | | | | | | | | | | | Close #15803. This avoids the error: while setting up the build environment: executing ‘/nix/store/7sb42axk5lrxqz45nldrb2pchlys14s1-bash-4.3-p42/bin/bash’: Argument list too long Note: I wanted to make it optional based on buildCommand length, but that seems pointless as I'm sure it's less performant. Amended by vcunat: https://github.com/NixOS/nixpkgs/pull/15803#issuecomment-224841225
* stdenv: fix paxmarkJoachim Fasting2016-05-27
| | | | | | | | | | On Linux, paxctl's setup hook should overwrite the paxmark stub, but the stub is defined after the setup hooks are sourced, so the stub ends up overwriting the real function. The result is that paxmark fails to do anything. The fix is to define the stub before any setup hooks are sourced. Thanks to @vcunat for figuring this out. Closes #15492
* stdenv setup.sh: revert most of changes around #14907Vladimír Čunát2016-05-12
| | | | | | | | | | | I'm giving this up. Feel free to find some reasonable variant that works at least on Linux and Darwin. Problems encountered: - During bootstrap of Darwin stdenv `env -0` and some bash features don't work. - Without `env -0` the contents of some multi-line phases is taken as variable declarations, which wouldn't typically matter, but the PR wanted to refuse bash-invalid names which would be occasionally triggered. This commit dowgrades that to a warning with explanation.
* stdenv substituteAll: use yet another implementationVladimír Čunát2016-05-08
| | | | | | | | It turned out that process substitution fed into a while-cycle isn't recognized during darwin bootstrap: http://hydra.nixos.org/build/35382446/nixlog/1/raw Also fix broken NIX_DEBUG output, noticed by abbradar.
* stdenv substituteAll: use more robust codeVladimír Čunát2016-05-07
| | | | | | | The set/env fix in #14907 wasn't very good, so let's use a null-delimited approach. Suggested by Aszlig. In particular, this should fix a mass-breakage on Darwin, though I was unable to test that.
* Merge #14920: windows improvements, mainly mingwVladimír Čunát2016-05-05
|\
| * stdenv for windows: auto-link dependency DLLsVladimír Čunát2016-04-23
| | | | | | | | | | | | | | | | | | | | For every *.{exe,dll} in $output/bin/ we try to find all (potential) transitive dependencies and symlink those DLLs into $output/bin so they are found on invocation. (DLLs are first searched in the directory of the running exe file.) The links are relative, so relocating whole /nix/store won't break them. The hook is activated on cygwin and when cross-compiling to mingw.
* | Merge commit 'refs/pull/14907/head' of git://github.com/NixOS/nixpkgs into ↵Nikolay Amiantov2016-04-25
|\ \ | | | | | | | | | staging
| * | doc/stdenv.xml document substitution env variablesProfpatsch2016-04-23
| | | | | | | | | | | | | | | The filtering of environment variables that start with an uppercase letter is documented in the manual.
| * | setup.hs: substitute uses only valid bash namesProfpatsch2016-04-23
| |/ | | | | | | | | | | | | | | | | | | bash variable names may only contain alphanumeric ASCII-symbols and _, and must not start with a number. Nix expression attribute names however might contain nearly every character (in particular spaces and dashes). Previously, a substitution that was not a valid bash name would be expanded to an empty string. This commit introduce a check that throws a (hopefully) helpful error when a wrong name is used in a substitution.
* | stdenv: clarify how `outputsToInstall` is chosenNikolay Amiantov2016-04-25
| | | | | | | | See https://github.com/NixOS/nixpkgs/pull/14694/files#r60013871
* | add get* helper functions and mass-replace manual outputs search with themNikolay Amiantov2016-04-25
|/
* Merge #12653: rework default outputsVladimír Čunát2016-04-07
|\
| * 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
| * stdenv: set meta.outputsToInstall unless overriddenVladimír Čunát2016-04-07
| |
* | Merge 'staging' into closure-sizeVladimír Čunát2016-04-07
|\ \ | | | | | | | | | | | | | | | This is mainly to get the update of bootstrap tools. Otherwise there were mysterious segfaults: https://github.com/NixOS/nixpkgs/pull/7701#issuecomment-203389817
| * | stdenv: don't complain about configure script not existingCharles Strahan2016-04-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Close #14335. Since 89036ef76ab09a, when a package doesn't include a configure script, the build complains with: grep: : No such file or directory grep: : No such file or directory This prevents that.
* | | Merge branch 'master' into closure-sizeVladimír Čunát2016-04-01
|\| | | |/ |/| | | | | Beware that stdenv doesn't build. It seems something more will be needed than just resolution of merge conflicts.
| * stdenv-linux: Ensure binutils comes before bootstrapTools in $PATHEelco Dolstra2016-02-28
| | | | | | | | | | | | Otherwise, when building glibc and other packages, the "strip" from bootstrapTools is used, which doesn't recognise some tags produced by the newer "ld" from binutils.
* | Merge master into closure-sizeVladimír Čunát2016-03-08
|\| | | | | | | | | The kde-5 stuff still didn't merge well. I hand-fixed what I saw, but there may be more problems.
| * stdenv: set SSL_CERT_FILE only if it isn't alreadyNikolay Amiantov2016-02-25
| |
| * Don't try to apply patchelf to non-ELF binariesEelco Dolstra2016-02-18
| |