Commit graph

1617 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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