Commit graph

1905 commits

Author SHA1 Message Date
Scott Olson 9cf93ba135 Simplify fetchurl assertion logic.
The two lines I removed technically assert the exact same thing, since `!a -> b`
is equivalent to `a || b`. So, I replaced the two lines with the more symmetric
form to make it clearer.
2016-02-18 22:39:43 -06:00
Eelco Dolstra d71a4851e8 Don't try to apply patchelf to non-ELF binaries 2016-02-18 22:54:11 +01:00
Eelco Dolstra bf63de1613 separateDebugInfo: Handle weird filenames properly 2016-02-18 22:54:11 +01:00
Eelco Dolstra 076de98c94 separateDebugInfo: Restore ELF check 2016-02-18 21:37:26 +01:00
Luca Bruno b7c57c831f Merge pull request #13099 from datakurre/datakurre-dockertools
dockerTools: Fix issue where image name with repository prefix was no…
2016-02-18 17:30:54 +01:00
Asko Soukka 584427c694 dockerTools: Fix issue where image name with repository prefix was not supported 2016-02-18 18:16:58 +02:00
Vladimír Čunát e9520e81b3 Merge branch 'master' into staging 2016-02-17 10:06:31 +01:00
Benjamin Staffin fc85f1beed nix-prefetch-hg: Various bash style improvements, fixes #9511 2016-02-17 00:35:30 +01:00
Brian McKenna 8b644c5826 rust: fix prePatch phase fail when sourceRoot set
We want to go up more than a single directory if we're in a nested one.
2016-02-17 07:28:26 +11:00
Vladimír Čunát d039c87984 Merge branch 'master' into closure-size 2016-02-14 08:33:51 +01:00
zimbatm 02f5a01c19 nix-prefetch-git: use fetchgit's naming heuristic
This commit fixes #6651.

Before this change the `nix-prefetch-git` script would use a different store
name than nix's `fetchgit` function. Because of that it was not possible to
use `nix-prefetch-git` as a way to pre-populate the store (for example when
the user it using private git dependencies that needs access to the ssh agent)
2016-02-13 14:39:44 +00:00
Vladimír Čunát a115bff08c Merge branch 'master' into staging 2016-02-07 13:52:42 +01:00
Vladimír Čunát 96cbdc70f2 cc-wrapper: fix #10574: old gcc -> cc fallout
The part with gcc-wrapper-old changes is rather unimportant,
as it's almost unused but I still tested that the sole user `gnat` builds.
2016-02-05 14:05:14 +01:00
Vladimír Čunát 54299b60c4 Merge #12779: Mass replace pkg}/bin-style strings
... to refer to correct outputs
2016-02-03 17:25:22 +01:00
Vladimír Čunát f89a136fd5 cc-wrapper: fixup branch interactions
c0599fdd61 and changes on closure-size didn't go well together.
2016-02-03 16:57:41 +01:00
Vladimír Čunát ae74c356d9 Merge recent 'staging' into closure-size
Let's get rid of those merge conflicts.
2016-02-03 16:57:19 +01:00
Guillaume Maudoux 9f358f809d Configure a default trust store for openssl 2016-02-03 12:42:01 +01:00
Eric Seidel f62b04954f fetchgitlocal: be less chatty 2016-02-01 10:57:01 -08:00
Tuomas Tynkkynen 3cc7fa0be9 treewide: Mass replace 'lzma}/bin' to refer the 'bin' output 2016-02-01 20:46:15 +02:00
Eelco Dolstra 030838ba25 makeModulesClosure: Small cleanup 2016-02-01 18:19:23 +01:00
Thomas Tuegel 1e5cad9c8c Merge pull request #12738 from ttuegel/emacsWithPackages
Reduce load time of emacsWithPackages
2016-01-31 17:28:20 -06:00
Franz Pletz c5f092c6a7 Merge pull request #12626 from aspiwack/deepclone-doc
Fix usage message in `nix-prefetch-git`
2016-01-30 17:34:42 +01:00
Eelco Dolstra 9855cbcbf8 debian: 8.2 -> 8.3 2016-01-30 11:08:37 +01:00
zimbatm 48a5bb703d stdenv: fix set-source-date-epoch-to-latest (close #12602)
In some cases the $sourceRoot is missing. Skip the hook instead
of showing the following cryptic error:

    find: cannot search `': No such file or directory
    /nix/store/0p1afvl8jcpi6dvsq2n58i90w9c59vz1-set-source-date-epoch-to-latest.sh: line 12: [: : integer expression expected

vcunat removed the warning; the hook will just skip silently in these cases.
Perhaps someone can improve on it some time.
2016-01-29 12:03:48 +01:00
Vladimír Čunát de0af30716 Merge branch 'master' into staging 2016-01-29 10:19:48 +01:00
aszlig ab84149c99
buildEnv: Pass the right number of args to addPkg
Regression introduced by 4529ed1259.

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
2016-01-28 14:50:44 +01:00
Vladimír Čunát ab8a691d05 nixos systemPackages: rework default outputs
- 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.
2016-01-28 11:24:18 +01:00
Vladimír Čunát a33fcc8731 cc-wrapper: attempt to fix on darwin
This fixes evaluation at least. I'm unable to test this myself and noone steps up;
https://github.com/NixOS/nixpkgs/pull/7701#issuecomment-174448705
however, Hydra's macs are idling so let's employ them for that.
2016-01-28 06:59:36 +01:00
Arthur Noel 903129f770 dockerTools: private registry support
* authorization token is optional
* registry url is taken from X-Docker-Endpoints header
* pull.sh correctly resumes partial layer downloads
* detjson.py does not fail on missing keys
2016-01-27 21:13:07 +00:00
Thomas Tuegel 063f5e3d0b remove autonix 2016-01-27 06:26:14 -06:00
Arnaud Spiwack 07f7ecdcce Fix usage message in nix-prefetch-git
The comment related to the `deepClone` and `no-deepClone` options was
misleading as these options have no relation with submodules, but on the
the depth in `git clone --depth n`.
2016-01-26 16:09:52 +01:00
Peter Simons 5ff34bac8c build-support/source-tarball.nix: fix syntax highlighting in Emacs 2016-01-26 14:03:06 +01:00
Vladimír Čunát c0599fdd61 Merge #11798: cc-wrapper: fix on darwin 2016-01-25 10:03:42 +01:00
Vladimír Čunát 8f48a9756b cc-wrapper: quote when saving $PATH 2016-01-25 09:54:10 +01:00
Dan Peebles 8f9aea9ccc grsecurity: fix kernel config and uncomment grsecurity kernels 2016-01-23 16:58:44 +00:00
Dan Peebles 33cf0792b1 grsecurity-testing: update patches and associated kernel version 2016-01-23 14:29:34 +00:00
Nikolay Amiantov f18317885a fhs-userenv: don't use bash login mode
Login mode can cause hidden problems, e.g. #12406. Generally we don't want
to read user's .bash_profile when we don't start an interactive shell inside
a chroot.
2016-01-23 15:55:53 +03:00
Vladimír Čunát 0957359568 Merge branch 'staging' 2016-01-22 13:48:35 +01:00
Thomas Tuegel 32c30411cf emacsWithPackages: link packages into single load-path
This should provide a small speed improvement by avoiding having to set
hundreds of load-paths.
2016-01-20 12:53:11 -06:00
Thomas Tuegel 2b1024646b emacsWithPackages: defer loading package.el
Also stops duplicating load paths.
2016-01-20 12:43:21 -06:00
Thomas Tuegel 97e1258ded emacsWithPackages: use local variables correctly 2016-01-20 12:43:00 -06:00
Rok Garbas 36fc03edb6 fetchgit: import impure GIT_PROXY_COMMAND and SOCKS_SERVER, fixes #8605
These environment variables allow using fetchgit with git:// URLs using
the SOCKS proxy technique described in 'Using Git with a SOCKS proxy':

  http://www.patthoyts.tk/blog/using-git-with-socks-proxy.html

Briefly, GIT_PROXY_COMMAND is set to a script which invokes connect[1],
which reads SOCKS_PROXY, which might be pointing to a local instance of
'ssh -D'.

[1] pkgs/tools/networking/connect
2016-01-20 02:18:22 +01:00
Anthony Cowley d96893647d cc-wrapper: fix on darwin
The ld-wrapper.sh script calls `readlink` in some circumstances. We need
to ensure that this is the `readlink` from the `coreutils` package so
that flag support is as expected.

This is accomplished by explicitly setting PATH at the top of each shell
script.

Without doing this, the following happens with a trivial `main.c`:

```
nix-env -f "<nixpkgs>" -iA pkgs.clang
$ clang main.c -L /nix/../nix/store/2ankvagznq062x1gifpxwkk7fp3xwy63-xnu-2422.115.4/Library -o a.out
readlink: illegal option -- f
usage: readlink [-n] [file ...]
```

The key element is the `..` in the path supplied to the linker via a
`-L` flag. With this patch, the above invocation works correctly on
darwin, whose native `/usr/bin/readlink` does not support the `-f` flag.

The explicit path also ensures that the `grep` called by `cc-wrapper.sh`
is the one from Nix.

Fixes #6447
2016-01-19 17:47:11 -05:00
Domen Kožar 9c571a98ed Merge pull request #10998 from andrewrynhard/master
Add help flag to nix-prefetch-git
2016-01-19 12:01:55 +01:00
Eelco Dolstra e210fdd272 Merge pull request #12469 from domenkozar/fetchurl/executable
fetchurl: support executables
2016-01-19 11:27:13 +01:00
Domen Kožar c7383cb34b fetchurl: support executables 2016-01-19 11:17:49 +01:00
Vladimír Čunát 716aac2519 Merge branch 'staging' into closure-size 2016-01-19 09:55:31 +01:00
Domen Kožar 3b381d37ee Merge pull request #5096 from aszlig/buildenv-check-collision-contents
buildEnv: Check the content of colliding paths.
2016-01-19 01:00:09 +01:00
Thomas Tuegel 9dfd9fe0bf elpa2nix: fix packages with DOS line endings 2016-01-18 15:29:19 -06:00
Thomas Tuegel decb5802c9 elpaBuild: factor out package installation
Building packages requires package-build.el from Melpa, but installing
packages only requires package.el. Packages from ELPA are already built,
so there is no need to involve package-build.el.
2016-01-18 15:29:19 -06:00
Thomas Tuegel 1724a07e2e melpaBuild: keep original source file names without hash 2016-01-18 15:29:19 -06:00
Thomas Tuegel cd54d7af47 melpaBuild: don't download dependencies
Stop package.el from trying to download dependencies. It wouldn't work
anyway.
2016-01-18 15:29:17 -06:00
Thomas Tuegel 18251778c9 melpaBuild: don't guess archive file name
package-build can tell us exactly what the archive file name is, instead
of globbing for it.
2016-01-18 15:29:17 -06:00
Thomas Tuegel 4b2303b8c9 melpaBuild: get Emacs package name from recipe
When building a package from a Melpa recipe file, get the Emacs package
name from the recipe. Nix is more restrictive about packages names than
Emacs, so the Nix name for a package is sometimes different.
2016-01-18 15:29:16 -06:00
Vladimír Čunát 620c147cce Merge branch 'master' into staging 2016-01-18 09:48:49 +01:00
aszlig bfb11fd030
buildEnv: Skip content check on ignoreCollisions.
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>
2016-01-18 03:56:09 +01:00
aszlig 4529ed1259
buildEnv: Check the content of colliding paths.
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>
2016-01-18 03:54:22 +01:00
Domen Kožar 36057827f6 requireFile: remove colon from the url for easier copy/paste 2016-01-16 21:58:40 +01:00
Nikolay Amiantov de9634bba3 Merge pull request #11998 from abbradar/initrd-root
make-initrd: store all files with root as owner
2016-01-16 22:45:49 +03:00
Eelco Dolstra 2fcee55e5f separateDebugInfo: Create symlinks matching original binaries
For instance, a binary like libfoo.so will cause a symlink
lib/debug/libfoo.so.debug -> .build-id/<build-ID>.debug to be
created. This is primarily useful for use with eu-addr2line, if you
know the name of a binary and the relative address, but not the build
ID.
2016-01-15 16:16:11 +01:00
Vladimír Čunát 2d0893088f Merge branch 'master' into staging 2016-01-15 13:43:57 +01:00
Vladimír Čunát 98218971c2 Merge #12299: make firefox-like browsers wrapped by default 2016-01-15 08:53:58 +01:00
Vladimír Čunát f50d80f627 makeDesktopItem: change name of the derivations
The name wasn't suggesting what kind of stuff is in there;
now it's the same as the name of the file that gets generated.
2016-01-15 08:37:02 +01:00
Domen Kožar 622eb5f699 requireFile: use correct absolute path syntax 2016-01-14 14:13:58 +01:00
lethalman 091c74b1c8 Merge pull request #12062 from mogorman/platformio
platformio: init at 2.7.0
2016-01-13 15:47:25 +01:00
Luca Bruno 4a4561ce24 dockerTools: nix functions for manipulating docker images 2016-01-13 10:27:37 +01:00
Vladimír Čunát 19d22184d3 stdenv/multiple-outputs.sh: small tweaks
- fix in silencing some moveToOutput messages
- allow removing (developer) documentation even without defining outputs
  (note: some paths are auto-removed by default, e.g. gtk-doc and man3)
2016-01-12 23:57:47 +01:00
Tyson Whitehead 5c89edbc3b buildRustPackage: don't hardcode /nix/store, use $NIX_STORE 2016-01-12 13:45:11 -05:00
Nikolay Amiantov 9124e9584b Merge pull request #11779 from abbradar/fhs-root
chroot-user: don't create new user namespace if we are root
2016-01-12 14:40:45 +03:00
Nikolay Amiantov ded1a55b8d substituteAllFiles: support postInstall 2016-01-10 06:03:26 +03:00
Eelco Dolstra 64bc8a84a4 Force another rebuild
Unfortunately, yesterday Nix got reverted to a version with broken
passAsFile implementation on some Hydra machines, so we have corrupted
files again. (E.g. http://hydra.nixos.org/build/29777678.) Forcing
another gratuitous rebuild to get rid of them.

(cherry picked from commit 75974d9220b8397c736ada76fb24eb934fa62f6c)
2016-01-07 13:21:16 +01:00
Matthew O'Gorman c87ef76027
build-fhs-userenv: added the option meta to be passed down to the final derivation. 2016-01-06 04:06:28 -05:00
Eelco Dolstra 38460cfe72 set-source-date-epoch-to-latest.sh: Support Darwin 2016-01-06 00:31:27 +01:00
Eelco Dolstra 81e530a749 Set SOURCE_DATE_EPOCH to latest source file
This provides a timestamp that's more useful than 1970-01-01 yet still
deterministic.
2016-01-05 17:21:48 +01:00
Eelco Dolstra 2b5ed58099 cc-wrapper: Don't mess with __DATE__ and __TIME__
This is handled by $SOURCE_DATE_EPOCH now.
2016-01-05 17:21:48 +01:00
Eric Seidel a8217711ce fetchgitLocal: make it work in submodules 2016-01-04 15:09:00 -08:00
Dan Peebles e81ae8e5a0 native-darwin-cctools-wrapper: kill it
Nothing uses it anymore
2016-01-03 20:28:34 -05:00
Vladimír Čunát e22d26bedb cc-wrapper: small changes, mostly just cosmetic ones 2016-01-02 11:14:09 +01:00
Michael Raskin 502c791611 update-walker: add a minimal description 2016-01-01 19:07:38 +01:00
Vladimír Čunát f9f6f41bff Merge branch 'master' into closure-size
TODO: there was more significant refactoring of qtbase and plasma 5.5
on master, and I'm deferring pointing to correct outputs to later.
2015-12-31 09:53:02 +01:00
Thomas Tuegel 7466e0f264 melpaBuild: accept recipeFile in lieu of fileSpecs 2015-12-29 13:23:49 -06:00
Vladimír Čunát b91dcad4bc fetchFromBitBucket: auto-remove an impure file
Also fix the hash in goPackages.inflect, the only user of the fetcher ATM.
Closes #12002 (different `inflect` fix), fixes #12012.
Using fetchzip-derived functions is likely more efficient than fetchhg,
and it's lighter on dependencies (hash is the same as with fetchhg in this case).
2015-12-29 16:54:50 +01:00
Nikolay Amiantov 9c431b77ff make-initrd: store all files with root as owner 2015-12-28 12:07:11 +03:00
Thomas Tuegel 688c005608 melpaBuild: update package-build.el 2015-12-27 10:59:27 -06:00
Thomas Tuegel 0b1edac8c0 nix-prefetch-bzr: match path name to fetchbzr name
fetchbzr always uses the derivation name `bzr-export`. nix-prefetch-bzr
should use the same name for its output. This avoids duplicate downloads
and problems with forbidden characters in bazaar repository names.
2015-12-19 09:32:22 -06:00
Thomas Tuegel 55544c1e68 nix-prefetch-zip: keep downloaded file extension
Keep the correct file extension on the downloaded file so that
`unpackFile` will know how to unpack it correctly.
2015-12-19 09:32:22 -06:00
Thomas Tuegel 0bc4af00ee emacsWithPackages: add user documentation 2015-12-19 09:32:16 -06:00
Thomas Tuegel dadfd93811 emacsWithPackages: know its own package set
Fixes #10819. emacsWithPackages will know its own package set. This
requires it to be in a package set, rather than at the top level, so it
lives in emacsPackagesNg.
2015-12-19 09:31:41 -06:00
Nikolay Amiantov ed4219964d chrootenv: add setuid wrappers to path 2015-12-17 14:21:17 +03:00
Nikolay Amiantov d6c1150195 chrootenv: symlink su and sudo stuff 2015-12-17 14:21:13 +03:00
Nikolay Amiantov 230898ceb2 chrootenv-user: don't unshare user namespace if we are root 2015-12-17 14:21:06 +03:00
Thomas Tuegel d6bec4e77f add copyPathToStore and copyPathsToStore 2015-12-16 15:00:44 -06:00
Nikolay Amiantov 8fb2141a69 Merge pull request #11710 from kevincox/userenv-no-path
Remove PATH assumption from fhs-userenv.
2015-12-15 16:51:44 +03:00
aszlig a5bc11f9eb
nixos/vm-tests: Remove msize mount option
This seems to be the root cause of the random page allocation failures
and @wizeman did a very good job on not only finding the root problem
but also giving a detailed explanation of it in #10828.

Here is an excerpt:

  The problem here is that the kernel is trying to allocate a contiguous
  section of 2^7=128 pages, which is 512 KB. This is way too much:
  kernel pages tend to get fragmented over time and kernel developers
  often go to great lengths to try allocating at most only 1 contiguous
  page at a time whenever they can.

  From the error message, it looks like the culprit is unionfs, but this
  is misleading: unionfs is the name of the userspace process that was
  running when the system ran out of memory, but it wasn't unionfs who
  was allocating the memory: it was the kernel; specifically it was the
  v9fs_dir_readdir_dotl() function, which is the code for handling the
  readdir() function in the 9p filesystem (the filesystem that is used
  to share a directory structure between a qemu host and its VM).

  If you look at the code, here's what it's doing at the moment it tries
  to allocate memory:

    buflen = fid->clnt->msize - P9_IOHDRSZ;

    rdir = v9fs_alloc_rdir_buf(file, buflen);

  If you look into v9fs_alloc_rdir_buf(), you will see that it will try
  to allocate a contiguous buffer of memory (using kzalloc(), which is a
  wrapper around kmalloc()) of size buflen + 8 bytes or so.

  So in reality, this code actually allocates a buffer of size
  proportional to fid->clnt->msize. What is this msize? If you follow
  the definition of the structures, you will see that it's the
  negotiated buffer transfer size between 9p client and 9p server. On
  the client side, it can be controlled with the msize mount option.

  What this all means is that, the reason for running out of memory is
  that the code (which we can't easily change) tries to allocate a
  contiguous buffer of size more or less equal to "negotiated 9p
  protocol buffer size", which seems to be way too big (in our NixOS
  tests, at least).

After that initial finding, @lethalman tested the gnome3 gdm test
without setting the msize parameter at all and it seems to have resolved
the problem.

The reason why I'm committing this without testing against all of the
NixOS VM test is basically that I think we can only go better but not
worse than the current state.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-12-14 17:26:24 +01:00
Kevin Cox 2f26b82411 Remove PATH assumption from fhs-userenv.
Previously is was assumed that bash was in the path when calling the
environment setup script. This changes all of the references of bash to
be absolute paths so that the user doesn't have to worry about the
environment they call it with.
2015-12-14 11:14:53 -05:00
Thomas Tuegel 623a117bdd makeDesktopItem: add StartupNotify key 2015-12-12 17:25:56 -06:00
Luca Bruno 5b0352a6a4 Merge branch 'master' into closure-size 2015-12-11 18:31:00 +01:00
Nikolay Amiantov 8ec4b45dbd Merge pull request #11602 from zimbatm/stricter-chroot-user
build-fhs-userenv: don't leak file descriptors
2015-12-11 00:40:41 +03:00
zimbatm 9b33ec1764 build-fhs-userenv: don't leak file descriptors
This re-uses the capabilities documented in `Process.spawn` to avoid leaking
unecessary file-descriptors to the sandbox
2015-12-10 16:01:04 +00:00
Eelco Dolstra bb672805cd fetchurl: Always use tarballs.nixos.org
Otherwise, if the upstream mirror changes (rather than deletes) a
file, then tarballs.nixos.org won't be used even if it has a copy of
the original file, and so we'll get a hash mismatch.
2015-12-10 16:06:12 +01:00
Thomas Tuegel 07a0031029 melpaBuild: add unpackCmd for single-file packages
Emacs packages are commonly distributed as single .el files. This
unpackCmd handles them correctly and sets up sourceRoot. Other sources
are treated in the default manner.
2015-12-06 11:50:10 -06:00
Thomas Tuegel 63eb6fdd8a fetchsvn: correctly handle trailing slashes
`splitString` does not split on trailing separators.
2015-12-06 11:49:51 -06:00
Peter Simons b89514eced fetchgit: follow up to 2cf7069b7d
If "fetcher" is a string, then Nix will execute it with bash already, so
the additional bash argument in that string was redundant and apparently
causes trouble on non-Linux platforms.

Hopefully fixes https://github.com/NixOS/nixpkgs/issues/11496.
2015-12-06 15:06:02 +01:00
Vladimír Čunát 263fd55d4b Merge recent staging built on Hydra
http://hydra.nixos.org/eval/1231884
Only Darwin jobs seem to be queued now,
but we can't afford to wait for that single build slave.
2015-12-05 11:11:51 +01:00
Peter Simons 65f3932f6e Update list of gnupg.org mirror sites.
The list we had before contained a lot of junk, i.e. sites that were no
longer online or no longer in sync. The new list of sites comes from
https://gnupg.org/download/index.html.
2015-12-04 21:11:22 +01:00
Nikolay Amiantov 00f6ce133c buildFHS{Chroot,User}Env: support extraInstallCommands 2015-12-04 00:58:47 +03:00
Luca Bruno e289717414 rename moveToOutput and propagatedBuildInputs 2015-12-02 10:05:36 +01:00
Luca Bruno 31ed92f65f Fix system-path with multiout 2015-12-01 15:09:41 +01:00
Peter Simons 806008a48e Merge pull request #11362 from dezgeg/pr-buildenv-meta
buildEnv: Allow setting meta attributes
2015-11-30 23:21:39 +01:00
Tuomas Tynkkynen 74c09a6e64 buildEnv: Allow setting meta attributes 2015-11-29 19:13:19 +02:00
Luca Bruno 920b1d3591 Merge branch 'master' into closure-size 2015-11-29 16:50:26 +01:00
Peter Simons 2cf7069b7d fetchgit: call in-repository script with bash explicitly
The script's shebang depends on /usr/bin/env, which we don't have in chroot
environments. This patch remedies the fallout from ade9f7167d, which
fixed https://github.com/NixOS/nixpkgs/issues/11284.
2015-11-29 15:43:56 +01:00
Peter Simons ade9f7167d nix-prefetch-git: make sure the script is interpreted by bash
Fixes https://github.com/NixOS/nixpkgs/issues/11284.
2015-11-27 11:17:50 +01:00
Luca Bruno a412927924 Merge remote-tracking branch 'origin/master' into closure-size 2015-11-25 21:37:30 +01:00
Eelco Dolstra 75e41b0210 Add Fedora 23 2015-11-25 16:18:15 +01:00
Eelco Dolstra e4eee41ad0 Add Ubuntu 15.10 2015-11-25 15:40:08 +01:00
Nikolay Amiantov 287f99bada r-modules: use HTTPS, allow passing args from generated set, use MRAN 2015-11-25 11:39:28 +01:00
Wei-Ming Yang 3a205134fb Update builder.sh
fix a incorrect name of environment variable
2015-11-25 17:14:03 +08:00
Ricardo M. Correia 799f0f1f23 buildRustPackage: fix failure due to branch names with slashes
Fixes #11237
2015-11-24 20:50:11 +01:00
Nikolay Amiantov 0427b21aba chrootenv: symlink some directories instead of copying 2015-11-23 21:39:49 +03:00
Nikolay Amiantov 6d6c1d3523 chrootenv: fix include directories 2015-11-23 19:54:07 +03:00
Vladimír Čunát 13eca6f79a Merge #11067: SmartOS updates
I amended some commits slightly.
2015-11-23 14:45:44 +01:00
Vladimír Čunát 333d69a5f0 Merge staging into closure-size
The most complex problems were from dealing with switches reverted in
the meantime (gcc5, gmp6, ncurses6).
It's likely that darwin is (still) broken nontrivially.
2015-11-20 14:32:58 +01:00
Jude Taylor 131e831cb9 allow networking by default and remove it from derivations 2015-11-19 11:31:06 -08:00
Jude Taylor df80090d09 use per-derivation sandbox profiles 2015-11-19 11:31:06 -08:00
Jude Taylor 914e9baefe start on sandbox stuff 2015-11-19 11:31:06 -08:00
Eelco Dolstra 16acdb45bd Revert "kernel: Remove unsupported 3.10, 3.12, 3.14"
This reverts commit 2441e002e2. The
motivation for removing them was not very convincing. Also, we need
3.14 on some Hydra build machines.
2015-11-19 14:25:16 +01:00
Ricardo M. Correia 2b694c237b cargo, cargoSnapshot: add rustc runtime dependency
It turns out that cargo implicitly depends on rustc at runtime: even
`cargo help` will fail if rustc is not in the PATH.

This means that we need to wrap the cargo binary to add rustc to PATH.
However, I have opted into doing something slightly unusual: instead of
tying down a specific cargo to use a specific rustc (i.e., wrap cargo so
that "${rustc}/bin" is prefixed into PATH), instead I'm adding the rustc
used to build cargo as a fallback rust compiler (i.e., wrap cargo so
that "${rustc}/bin" is suffixed into PATH). This means that cargo will
prefer to use a rust compiler that is in the default path, but fallback
into the one used to build cargo only if there wasn't any rust compiler
in the default path.

The reason I'm doing this is that otherwise it could cause unexpected
effects. For example, if you had a build environment with the
rustcMaster and cargo derivations, you would expect cargo to use
rustcMaster to compile your project (since rustcMaster would be the only
compiler available in $PATH), but this wouldn't happen if we tied down
cargo to use the rustc that was used to compile it (because the default
cargo derivation gets compiled with the stable rust compiler).

That said, I have slightly modified makeRustPlatform so that a rust
platform will always use the rust compiler that was used to build cargo,
because this prevents mistakenly depending on two different versions of
the rust compiler (stable and unstable) in the same rust platform,
something which is usually undesirable.

Fixes #11053
2015-11-18 02:41:45 +01:00
Shea Levy a75de3ce56 Merge branch 'replace-dependency' of https://github.com/roconnor/nixpkgs
When replace-dependency is given a drv that doesn't actually depend on
oldDependency, then just return back the original drv but also issue a
warning.
2015-11-17 07:09:03 -05:00
Russell O'Connor fb683211dc replace-dependency.nix: Remove unnecessary carriage return. 2015-11-16 17:52:12 -05:00
Russell O'Connor 94e68bf9ee replace-dependency.nix: Give attr a slightly more meaningful name of drvHash 2015-11-16 17:44:03 -05:00
Danny Wilson f17dea3b3d Fix compilation of GCC 4.9 on SmartOS.
Fix ld-solaris-wrapper never calling ld (since gcc->cc-wrapper refactor).
2015-11-16 17:20:16 +01:00
Danny Wilson f9134ca9df Fix patchShebangs on SmartOS
Tail is very picky about the space after -c
 when compiled by Nix on Illumos (no idea why).
2015-11-16 17:20:14 +01:00
Danny Wilson 6a2b723a8b Fix build of gccgo-wrapper on Illumos.
When compiling GCC with NIX_ENFORCE_PURITY,
linking libgcc fails because crti.o and friends
aren't part of the nix store.
2015-11-16 17:20:12 +01:00
Danny Wilson d50d14d55f Use the nix provided shell.
This is guaranteed to be bash, SmartOS has ksh by
 default and doesn't work.
2015-11-16 17:20:11 +01:00
Shea Levy afaf712ee7 replace-dependency.nix: Use dynamic attrs now. 2015-11-16 05:42:27 -05:00
Russell O'Connor 782cfe94b0 replace-dependency.nix: new feature
When replace-dependency is given a drv that doesn't actually depend on oldDependency, then just return back the original drv but also issue a warning.
2015-11-15 19:52:30 -05:00
William A. Kennington III 6602f49495 Revert "Revert "Merge pull request #9543 from NixOS/staging.post-15.06""
This reverts commit 741bf840da.

This reverts the fallout from reverting the major changes.
2015-11-14 12:32:51 -08:00
William A. Kennington III 9579c9ec7f Merge commit 'cb21b77' into master.upstream
This is a partial merge of staging for builds which are working
2015-11-13 15:53:10 -08:00
Andrew Rynhard 42ff8ad780 Add help flag to nix-prefetch-git 2015-11-12 15:10:56 -08:00
obadz 972381b66a citrix-receiver: init at 13.2.1, fixes #8458 2015-11-11 22:27:15 +01:00
Nikolay Amiantov 1b69894d74 fhs-env: symlink /usr/lib to libs for the main architecture 2015-11-11 00:01:02 +03:00
Nikolay Amiantov d4c27381dc Merge pull request #10460 from abbradar/remote-askpass
Support network in initrd and entering LUKS passphrase via SSH
2015-11-10 16:41:34 +03:00
William A. Kennington III 2441e002e2 kernel: Remove unsupported 3.10, 3.12, 3.14
Our base kernel headers were bumped to 3.18 so we can no longer reliably
support kernels older than 3.18
2015-11-09 11:10:42 -08:00
Vladimír Čunát d10b9108f2 wrapGAppsHook: fix $gappsWrapperArgs as intended
i.e. define it even if $dontWrapGApps is set, and document the intention.
2015-11-09 15:40:20 +01:00
Vladimír Čunát 3f074b8a1e wrapGAppsHook: avoid running multiple times
/cc #10351 and @lethalman.
2015-11-09 15:19:41 +01:00
William A. Kennington III a26c8e9b83 Merge branch 'master.upstream' into staging.upstream 2015-11-07 15:51:51 -08:00
goibhniu 04d45939d0 Merge pull request #10688 from demin-dmitriy/pinta
pinta: 1.4 -> 1.6
2015-11-07 15:38:44 +01:00
Wout Mertens 774f74b875 Don't fail if env-vars cannot be written to
env-vars is a debugging aid, see
3e5dbb2433
for a rationale for this change.
2015-11-04 16:32:59 +01:00
William A. Kennington III 4251612faa Merge branch 'master.upstream' into staging.upstream 2015-11-04 01:00:48 -08:00
Vladimír Čunát b4bd19762a Revert "Don't fail if env-vars cannot be written to" 2015-11-04 07:30:02 +01:00
Wout Mertens baba136c30 Merge pull request #10262 from wmertens/nofailnixshell
Don't fail if env-vars cannot be written to
2015-11-04 07:21:56 +01:00
Wout Mertens b21a5013a0 Don't fail if env-vars cannot be written to
env-vars is a debugging aid, see
3e5dbb2433
for a rationale for this change.
2015-11-04 07:19:57 +01:00
Ricardo M. Correia 2389a707af fetch-cargo-deps: add debug output
... so that we can find out why there are sporadic hash mismatches.
2015-11-02 15:44:43 +01:00
William A. Kennington III 1496b0f6a1 Fix buildenv 2015-10-30 18:09:45 -07:00
William A. Kennington III dd2de66d61 Merge branch 'master.upstream' into staging.upstream 2015-10-30 17:16:07 -07:00
Eelco Dolstra 58e9440b89 Add option to link additional package outputs into system.path
This is necessary to get stuff like separate manpages, info files,
debug symbols, etc.
2015-10-30 15:21:02 +01:00
Ricardo M. Correia 777c9c3768 buildRustPackage: fix erroneous /bin/sh reference
The fetch-cargo-deps script is written in bash syntax, but it
erroneously ran under the /bin/sh interpreter.

This wasn't noticed because /bin/sh is actually bash in NixOS, but on
some other systems this is not true.
2015-10-29 15:16:51 +01:00
Demin Dmitriy dc70fcd94b build-dotnet-package: add optional makeWrapperArgs argument
3 lines of code are shamelessly stolen from buildPythonPackage
2015-10-29 06:02:18 +03:00
Vladimír Čunát efcad4c910 gcc5: split $doc into $man and $info
... because cc-wrapper is meant to propagate man pages into user envs,
and info pages are rather large.

Also replace the duplicate g++ and gcc man1 pages by a symlink.
2015-10-28 10:15:55 +01:00
Vladimír Čunát 55d129609d cc-wrapper: correct ccLDFlags with multiple outputs
Note: -B argument seems more like for gcc's main output,
though it's used in a bit strange way here.
(Upstream default is /usr/lib/gcc/ which we don't move.)
2015-10-28 10:15:54 +01:00
Vladimír Čunát cd7a78d7e4 cc-wrapper: fix typo ignoring flags; fixes #10574 2015-10-28 10:15:54 +01:00
Vladimír Čunát 64cdc48d1d stdenv/multiple-outputs: add REMOVE target, use for docdev
Now any developer docs are removed by default, unless "docdev"
is in $outputs or $outputDocdev is defined.
Currently devdoc consists of just man3 and gtk-doc.
2015-10-28 10:15:54 +01:00
Vladimír Čunát 689d9757c5 stdenv/multiple-outputs: autoremove empty directories
i.e. remove chains of empty dirs after moving contents out of them.
2015-10-28 10:15:53 +01:00
Vladimír Čunát 148e03b2f1 gmp: split into multiple outputs 2015-10-28 10:15:49 +01:00
Vladimír Čunát b95f266638 stdenv/multiple-outputs: mainly add $docdev
Packages often provide some developer documentation
which is useless to typical users (e.g. man3 and gtk-doc).
2015-10-28 10:09:32 +01:00
aszlig 82d88b5bcb
vmTools.commonDebPackages: Add "mawk".
While debugging an issue with running NixOps tests, I found out that the
output from debClosureGenerator is not deterministic.

The reason behind this is the way how Provides and Replaces fields are
handled. I haven't yet found out what's the exact issue, but so far
packages "Provides" are more or less picked at random.

So, running the NixOps Hetzner tests we get either mawk, original-awk or
gawk altering on every invocation.

While for the test it isn't poisionous whether wi have mawk or gawk,
having original-awk certainly is, because live-build only works with
mawk or gawk.

The best solution would obviously be to make debClosureGenerator
deterministic, but in the case of "Provides: awk", we can safely pick
mawk by default, because the latter has a "Priority: required" in its
package description.

This also has the advantage that we can safely cherry-pick this to
release-15.09 because it's very unlikely that we'll break the
debClosureGenerator by adding a dependency to commonDebPackages.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-10-26 20:56:42 +01:00
Wout Mertens 5c34563cda Merge pull request #10517 from demin-dmitriy/sublime3
sublime3: make sublime text work with pkexec and gksudo
2015-10-24 19:16:34 +02:00
Demin Dmitriy 0cea20a652 libredirect: add __xlib64 and posix_spawn 2015-10-24 18:04:33 +03:00
Nikolay Amiantov 489e947a51 Merge pull request #10506 from abbradar/buildenv-wip
buildenv: support very long `paths`
2015-10-24 11:11:08 +03:00
Nikolay Amiantov d49140f3e4 buildenv: support very long paths 2015-10-22 15:35:39 +03:00
Bjørn Forsman ad49db64da build-fhs-chrootenv: add /etc/mtab -> /proc/mounts symlink
Needed to be able to run some programs (e.g. tune2fs) in the chroot.

AFAIK, /etc/mtab is deprecated, but programs still use it.
2015-10-21 21:44:29 +02:00
Nikolay Amiantov da38314be6 buildFHSEnv: create /etc/profile with writeText
This should avoid accidential expansion of variables, i.e. in
"export PATH=/some/path:$PATH"
$PATH would have been expanded in the environment builder!
2015-10-21 16:02:08 +03:00
Nikolay Amiantov a995837606 Merge pull request #10320 from abbradar/fhs-simplify
chroot-env: simplify, clean directories structure
2015-10-19 11:18:49 +03:00
Nikolay Amiantov 3c7871a1c0 nuke-references: support -e option 2015-10-18 18:41:11 +03:00
William A. Kennington III 194357ad20 grsecurityUnstable: 4.1.7 -> 4.2.3 2015-10-15 10:41:04 -07:00
Nikolay Amiantov ab730370ba chroot-env: simplify, clean directories structure 2015-10-12 17:38:35 +03:00
Eelco Dolstra 7260c04266 debian: Update to 7.9, 8.2 2015-10-08 11:20:26 +02:00
Eric Seidel 9be18c4d07 Merge pull request #10176 from Ericson2314/fetchgitLocal
Rewrite `fetchgitLocal`
2015-10-07 18:37:35 -07:00
Nikolay Amiantov 46de04489b build-fhs-userenv: fix extraBindMounts 2015-10-07 14:58:37 +03:00
ts468 db25ece3c8 fetchurl/builder.sh: style fix, close #10260 2015-10-07 09:48:58 +02:00
Juho Östman e7a28447ea fetchhg: fixed nix-prefetch-hg interpreter 2015-10-06 22:41:46 +03:00
Eelco Dolstra 106738b196 Give more memory for the disk image builder
http://hydra.nixos.org/build/26480662
2015-10-06 15:03:26 +02:00
Nikolay Amiantov 5897433b31 build-fhs-userenv: add extraBindMounts support 2015-10-06 15:32:37 +03:00
Vladimír Čunát f361938b21 Merge staging into closure-size
This makes gcc5 the default builder, etc.
2015-10-03 15:23:13 +02:00
Bjørn Forsman 05668fbe92 build-fhs-chrootenv: add /etc/os-release from host
This allows software inside the chroot to identify the host OS via the
standard /etc/os-release file.
2015-10-03 14:58:41 +02:00
Tuomas Tynkkynen d844a1002f stdenv/multiple-outputs: Fix checking of propagatedOutputs
'[[ ! -v "$propagatedOutputs" ]]' is incorrect and always evaluates to
true. The correct form using double brackets would be
'[[ ! -v propagatedOutputs ]]', but I strongly dislike '[[ ]]' due to
the totally different quoting rules compared to everything else in bash.
2015-10-03 14:08:48 +02:00
Tuomas Tynkkynen 52c4337356 stdenv/multiple-outputs: Guard greps with 'set +/-o pipefail'
This is required since #7524 is fixed ("stdenv: Errors in hooks (such as
postUnpack) get ignored")
2015-10-03 14:08:48 +02:00
Vladimír Čunát 5227fb1dd5 Merge commit staging+systemd into closure-size
Many non-conflict problems weren't (fully) resolved in this commit yet.
2015-10-03 13:33:37 +02:00
Bjørn Forsman cd22214e0e build-fhs-chrootenv: add missing /usr/include
This patch brings the include/ directories of all specified packages to
appear under /usr/include in the FHS chroot. As per spec[1].

[1] http://www.pathname.com/fhs/pub/fhs-2.3.html#USRINCLUDEDIRECTORYFORSTANDARDINCLU
2015-10-02 19:13:41 +02:00
John Ericson 72660409f5 Rewrite fetchgitLocal
For practical purposes, here are the changes in behavior:
 - When fetching from a subdirectory of a repo, do not rebuild because of
   changes elsewhere in the repo
 - Fetch (not-ignored) untracked files too

It does this by letting git hash and export the directory in question,
which I believes makes for a cleaner implementation than the ad-hoc copying
and hashing that was there before.
2015-10-01 22:00:44 -07:00
William A. Kennington III 5cfe893cc4 Merge commit '2d464f75ed46869b5942c4b479772a0367b30608' into master.upstream
This is a partial commit from staging in an attempt to make merges
smaller.
2015-09-23 14:35:36 -07:00
Vladimír Čunát 6b0add86b9 separateDebugInfo: one more comment 2015-09-23 10:35:40 +02:00
Vladimír Čunát 22521f3b90 separateDebugInfo: fix typo in comment 2015-09-22 22:07:58 +02:00
Vladimír Čunát b3658bc01b separateDebugInfo: compress it by default
Using zlib should be cheap enough and save lots of HDD space.
Case study (glib): 11 MB -> 4 MB.
2015-09-22 22:05:44 +02:00
Eelco Dolstra 2a28bc6691 separateDebugInfo: Assert Linux
Also remove some unintended setting of separateDebugInfo.
2015-09-22 20:21:10 +02:00
William A. Kennington III 3fcbd5a829 Merge branch 'master.upstream' into staging.upstream 2015-09-20 14:54:53 -07:00
Nikolay Amiantov f5deff5137 nix-prefetch-git: pull all tags from remote when checkouting by revision
Close #9790.
This fixes checkouting for a nasty combination:

1. To be checkouted is a revision which corresponds to tag in a form "<tag>^{}".
2. This revision is not fetched by default.
2015-09-20 18:24:34 +02:00
William A. Kennington III 6e09223627 Merge branch 'master.upstream' into staging.upstream 2015-09-18 17:16:27 -07:00
Vladimír Čunát 0fdb93864e Merge new texlive infrastructure, /CC #287 2015-09-18 20:52:34 +02:00