Commit Graph

5849 Commits

Author SHA1 Message Date
Eelco Dolstra 0395b9b94a
Add memoise primop
'builtins.memoise f x' is equal to 'f x', but uses a cache to speed up
repeated invocations of 'f' with the same 'x'. A typical application
is memoising evaluations of Nixpkgs in NixOps network
specifications. For example, with the patch below, the time to
evaluate a 10-machine NixOps network is reduced from 17.1s to 9.6s,
while memory consumption goes from 4486 MiB to 3089 MiB. (This is with
GC_INITIAL_HEAP_SIZE=16G.)

Nixpkgs patch:

diff --git a/pkgs/top-level/impure.nix b/pkgs/top-level/impure.nix
index a9f21e45aed..f641067e022 100644
--- a/pkgs/top-level/impure.nix
+++ b/pkgs/top-level/impure.nix
@@ -79,7 +79,7 @@ in
 # not be passed.
 assert args ? localSystem -> !(args ? system || args ? platform);

-import ./. (builtins.removeAttrs args [ "system" "platform" ] // {
+builtins.memoise or (x: x) (import ./.) (builtins.removeAttrs args [ "system" "platform" ] // {
   inherit config overlays crossSystem;
   # Fallback: Assume we are building packages on the current (build, in GNU
   # Autotools parlance) system.
2018-01-11 19:24:22 +01:00
Will Dietz 435ccc7980 release: access fetchGit from builtins to fix eval w/1.11 (<1.12) 2018-01-10 14:19:29 -06:00
Eelco Dolstra da85bea7a8
Merge pull request #1777 from bhipple/fix-32bit-rpm-builds
Fix Fedora 25 i386 RPM build
2018-01-10 11:58:20 +01:00
Eelco Dolstra 874ad7d9f8
Merge pull request #1788 from k0001/rem-subs-1
nix.conf: builders-use-substitutes
2018-01-10 11:31:51 +01:00
Renzo Carbonara b0328c244d nix.conf: builders-use-substitutes
Fixes #937
2018-01-09 22:40:07 +01:00
Eelco Dolstra 3cd0704387
Merge pull request #1787 from dtzWill/fix/git-not-on-PATH
fix git cache 'corruption' when git not available, breaks all future use of fetchGit
2018-01-09 16:49:44 +01:00
Will Dietz 428680b307 fetchGit: fix creation of uninitialized cache dir, let git create it
fetchGit test (as modified in previous commit) now passes.
2018-01-09 09:05:18 -06:00
Will Dietz 84d9e213d2 fetchGit.sh: Test we don't "corrupt" cache if invoke w/o git avail 2018-01-09 08:58:19 -06:00
Eelco Dolstra 7b9583680e
Improve error message with --repair for untrusted users 2018-01-08 19:13:48 +01:00
Eelco Dolstra 6e0989685a
Merge pull request #1774 from LnL7/darwin-no-etc-profile
installer: don't touch /etc/profile
2018-01-05 12:00:44 +01:00
Benjamin Hipple 1882e802e7 Fix Fedora 25 i386 RPM build 2018-01-04 19:44:32 -05:00
Eelco Dolstra 44272d8719
Rename "use-substitutes" to "substitute"
Commit c2154d4c84 renamed
"build-use-substitutes" to "use-substitutes", but that broke
"nix-copy-closure --use-substitutes".
2018-01-04 16:58:39 +01:00
Domen Kožar 1b851ae8f6
Merge pull request #1773 from bhipple/fix-hydra-rpm-builds
Fix RPM builds by increasing VM memory size
2018-01-04 12:00:32 +00:00
Daiderd Jordan 27788f4060
installer: don't touch /etc/profile
The default profile already loads /etc/bashrc.
2018-01-03 22:29:54 +01:00
Benjamin Hipple 4cb5c51375 Fix RPM builds by increasing VM memory size
The VM was running out of RAM while handling debug symbols, which caused the
eu-strip to fail while separating debug symbols.
2018-01-02 23:39:42 -05:00
Eelco Dolstra e297aa7b1c
Merge pull request #1772 from shlevy/hasContext
Add hasContext primop
2018-01-02 18:53:57 +01:00
Shea Levy 689b2783fc
Add hasContext primop 2018-01-02 12:25:14 -05:00
Eelco Dolstra f68c2b5a78
Merge pull request #1770 from dtzWill/fix/run-test-sandbox-ubuntu
run.sh: include lib64 in sandbox-paths to fix on ubuntu 16.XX
2018-01-02 11:32:18 +01:00
Eelco Dolstra 9b67f234c9
Merge pull request #1768 from dtzWill/feature/brotli
use libbrotli directly when available
2018-01-02 11:31:29 +01:00
Eelco Dolstra 099ba37820
Merge pull request #1766 from FRidh/aspell
Do not export ASPELL_CONF
2018-01-02 11:29:13 +01:00
Will Dietz 5afee18726 run.sh: include lib64 in sandbox-paths to fix on ubuntu 16.XX
(cc #1769)
2017-12-30 22:41:49 -06:00
Will Dietz 9dd2b8ac7b use libbrotli directly when available
* Look for both 'brotli' and 'bro' as external command,
  since upstream has renamed it in newer versions.
  If neither are found, current runtime behavior
  is preserved: try to find 'bro' on PATH.
* Limit amount handed to BrotliEncoderCompressStream
  to ensure interrupts are processed in a timely manner.
  Testing shows negligible performance impact.
  (Other compression sinks don't seem to require this)
2017-12-30 20:26:33 -06:00
Frederik Rietdijk ab8ba71205 Do not export ASPELL_CONF
This does not belong in Nix. Setting this env var is already done by the aspell derivation found in Nixpkgs.
2017-12-29 13:45:54 +01:00
Shea Levy 6a0dd63508
Merge branch 'fix/issue-1757' of git://github.com/dtzWill/nix 2017-12-27 18:51:05 -05:00
Shea Levy 25196d0d26
Merge branch 'fix/fetchGit-clean-branch' of git://github.com/dtzWill/nix 2017-12-27 18:50:08 -05:00
Will Dietz bd17ccf1d8 nix repl: use linenoiseKeyType to differentiate ^C and ^D
Fixes #1757.
2017-12-26 19:25:50 -06:00
Eelco Dolstra 4801420893
Remove debug line 2017-12-25 14:53:15 +01:00
Will Dietz 2e6f06c37e fetchGit: Fix handling of local repo when not using 'master' branch
Add tests checking this behavior.
2017-12-22 15:29:52 -06:00
Eelco Dolstra aa43cbb764
Check aws-sdk-cpp version 2017-12-22 12:05:13 +01:00
Eelco Dolstra 6d80870832
release.nix: Use fetchTarball and fetchGit
In particular, using fetchGit means we don't need hackery to clean the
source tree when building from an unclean tree.
2017-12-22 11:35:32 +01:00
Shea Levy 62e214fa6f
Merge branch 'fix/issue-1742-empty-completions' of git://github.com/dtzWill/nix 2017-12-20 13:18:36 -05:00
Eelco Dolstra 576abaa650
Merge pull request #1753 from FRidh/fix/escaping
Fix escaping, fixes build
2017-12-20 16:23:18 +01:00
Frederik Rietdijk af1e2ffca1 Fix escaping, fixes build 2017-12-20 13:24:39 +01:00
Will Dietz 71987b18d4 linenoise.cpp: allow completions from empty input
Fixes #1742.
2017-12-19 12:52:10 -06:00
Dan Peebles ca40fbdc50 Add an issue template to cut down on the confusion 2017-12-17 11:08:28 -05:00
Eelco Dolstra 8efe937a35 Fix build on gcc 7
Fixes #1738.
2017-12-16 00:49:31 +01:00
Eelco Dolstra 1dffbff57d
Merge pull request #1736 from bgamari/stoi-exceptions
Gracefully handle exceptions from stoi
2017-12-15 11:39:43 +01:00
Ben Gamari 626a94d70e edit: Catch stoi exceptions from line number parsing 2017-12-14 19:11:56 -05:00
Ben Gamari f9bcbddef2 json-to-value: Throw sensible error message on invalid numbers 2017-12-14 19:09:45 -05:00
Eelco Dolstra 5d5b931fb1 Fix build against current aws-sdk-cpp 2017-12-14 16:45:40 +01:00
Eelco Dolstra 1ca8e95178
Merge pull request #1722 from bhipple/fix-for-older-libcurl
Fix for builds with system libcurl < 7.30
2017-12-12 11:48:08 +01:00
Eelco Dolstra de38fa9987
Merge pull request #1724 from dtzWill/fix/minor-warnings
fix minor warnings
2017-12-12 11:47:47 +01:00
Eelco Dolstra e3c19ff9bc
Merge pull request #1725 from chris-martin/pr/concatStringsSep
Add builtins.concatStringSep to the manual
2017-12-12 11:46:10 +01:00
Chris Martin 2a8f09a8c1 Add builtins.concatStringSep to the manual 2017-12-11 14:28:03 -05:00
Will Dietz 00e0c416ff Mark comparison call operator as const 2017-12-11 12:08:40 -06:00
Will Dietz e4d43f1f94 logging.cc: add missing 'override' 2017-12-11 12:08:40 -06:00
Will Dietz c800f47395 Fix forward-decl of Bindings as "class", match definition.
(appease clang -Wmismatched-tags warning)
2017-12-11 11:51:55 -06:00
Eelco Dolstra 06d4566c2d
Merge pull request #1721 from expipiplus1/patch-2
Escape left angle brackets in XML documentation
2017-12-11 17:29:36 +01:00
Shea Levy 5ba5ca7888
Merge branch 'feature/linenoise-ng' of git://github.com/dtzWill/nix 2017-12-11 07:52:20 -05:00
Benjamin Hipple d76c4fe770 Fix for builds with system libcurl < 7.30
CentOS 7.4 and RHEL 7.4 ship with libcurl-devel-7.29.0-42.el7.x86_64; this flag
was added in 7.30.0
https://curl.haxx.se/libcurl/c/CURLMOPT_MAX_TOTAL_CONNECTIONS.html
2017-12-09 20:02:21 -05:00