1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-17 16:02:43 +01:00
Commit graph

7286 commits

Author SHA1 Message Date
Will Dietz
a834861876
fix hashfile test that wasn't failing due to eval laziness
See:
7becb1bf1c (r33450554)
2019-05-08 10:04:54 +02:00
Eelco Dolstra
7becb1bf1c
Merge pull request #2792 from JohnAZoidberg/builtins-hash-file
Add builtins.hashFile
2019-05-07 13:26:59 +02:00
Daniel Schaefer
3f192ac80c Add builtins.hashFile
For text files it is possible to do it like so:
`builtins.hashString "sha256" (builtins.readFile /tmp/a)`
but that doesn't work for binary files.

With builtins.hashFile any kind of file can be conveniently hashed.
2019-05-03 17:23:36 +02:00
Eelco Dolstra
f9a2ea4486
Fix "Bad system call" running i686-linux binaries on x86_64-linux
To determine which seccomp filters to install, we were incorrectly
using settings.thisSystem, which doesn't denote the actual system when
--system is used.

Fixes #2791.
2019-05-03 10:48:33 +02:00
Eelco Dolstra
989cb37777
Merge pull request #2679 from bjornfor/offline-install
install script: don't abort when "nix-channel --update" fails
2019-05-01 15:48:39 +02:00
Samuel Dionne-Riel
cbc7d9a412 findRootsNoTemp: fixes comment about findRuntimeRoots
The NIX_ROOT_FINDER environment variable was removed in
3c46fe62b8 when porting from perl to C.
2019-04-30 22:43:24 -04:00
Eelco Dolstra
351fbfcb9b Include GC stats in printStats 2019-04-29 23:24:14 +02:00
Eelco Dolstra
c6ff34bd86 Measure GC duration 2019-04-29 23:04:50 +02:00
Eelco Dolstra
54e1ac6102 Slight optimization 2019-04-29 23:04:50 +02:00
Eelco Dolstra
abbbad5679 Add 'nix list-tarballs' command
E.g.

  $ nix list-tarballs nixpkgs.hello
  http://tarballs.nixos.org/stdenv-linux/x86_64/4907fc9e8d0d82b28b3c56e3a478a2882f1d700f/bootstrap-tools.tar.xz
  ...
  mirror://gnu/hello/hello-2.10.tar.gz

  $ nix list-tarballs --json -f '<nixpkgs/maintainers/scripts/all-tarballs.nix>'

(BTW the latter returns about 6000 files more than find-tarballs.nix.)
2019-04-29 23:04:50 +02:00
Eelco Dolstra
b19b221f98 SourceExprCommand: Print evaluator stats 2019-04-29 23:04:50 +02:00
Eelco Dolstra
76325ce5cd DerivationOutput::parseHashInfo: Return a tuple 2019-04-29 22:11:14 +02:00
Eelco Dolstra
c3b55a96a7 Bindings::get(): Add convenience method
This allows writing attribute lookups as

    if (auto name = value.attrs->get(state.sName))
      ...
2019-04-29 20:32:43 +02:00
Eelco Dolstra
6d118419f2 Garbage-collect paths 2019-04-29 16:27:56 +02:00
Eelco Dolstra
2995f9c48f Garbage-collect strings 2019-04-29 16:27:56 +02:00
Eelco Dolstra
9b822de4ef Inline allocValue() 2019-04-29 16:27:56 +02:00
Domen Kožar
83f2b110ce
Merge pull request #2750 from nh2/max-jobs-0-docs
docs: Mention `--max-jobs 0` to build remotely only
2019-04-29 12:44:54 +07:00
Eelco Dolstra
14f7a60755 Keep some stats 2019-04-24 13:46:34 +02:00
Eelco Dolstra
f22540464f
Merge pull request #2775 from LnL7/darwin-sandbox-hash-rewrite
build: only skip hash rewriting for sandboxing on linux
2019-04-24 10:45:45 +02:00
Eelco Dolstra
80accdcebe Remove Boehm GC dependency 2019-04-24 00:07:42 +02:00
Eelco Dolstra
69adbf5c77 Rename 2019-04-23 22:50:01 +02:00
Eelco Dolstra
35b76b21ee Size -> size_t 2019-04-23 22:47:30 +02:00
Eelco Dolstra
ba36d43d46 Freelist improvements 2019-04-23 22:44:17 +02:00
Eelco Dolstra
93b3d25bbb Move parseSize() to libutil 2019-04-23 22:33:10 +02:00
Eelco Dolstra
f7f73cf5ae Allow disabling some GC debug checks 2019-04-23 13:56:38 +02:00
Eelco Dolstra
a38a7b495c Use Value::misc to store strings
This allows strings < 23 characters (up from 16) to be stored directly
in Value. On a NixOS 19.03 system configuration evaluation, this
allows 1060588 out of 1189295 (89%) strings to be stored in Value.
2019-04-23 12:54:12 +02:00
Eelco Dolstra
742a8046de Store short strings in Values
The vast majority of strings are < 16 bytes, and so can be stored
directly in a Value. This saves a heap allocation and an indirection.
2019-04-23 12:20:27 +02:00
Eelco Dolstra
2160258cc4 Store contexts as symbols
This provides some deduplication since most contexts are used multiple
times.

Also, store singleton contexts directly in the Value object. This
saves a 16-byte Context object. This is useful because the vast
majority of contexts are singletons, e.g. 23723 out of 26138 in a
NixOS 19.03 system configuration.
2019-04-23 11:07:47 +02:00
Eelco Dolstra
e392ff53e9 Remove a word from Env 2019-04-23 01:11:50 +02:00
Eelco Dolstra
ae5b76a5a4 Checkpoint 2019-04-23 00:39:14 +02:00
Eelco Dolstra
7c716b4c49 Checkpoint 2019-04-22 23:25:47 +02:00
Daiderd Jordan
b614e0e53d
build: only skip hash rewriting for sandboxing on linux
The sandbox on darwin, and possibly other future platforms, doesn't have
enough isolation to redirect outputs without hash rewriting.
2019-04-17 23:41:23 +02:00
Eelco Dolstra
5112a33fb1
Fix release script 2019-04-15 19:17:17 +02:00
Eelco Dolstra
4237414f4d Checkpoint 2019-04-15 18:40:35 +02:00
Niklas Hambüchen
288f93cec0 manual: "Nix Package collection" -> "Nixpkgs package collection".
Makes difference between Nix and Nixpkgs clearer to avoid
some common confusion this sentence on IRC.

Also disambiguate an "it" reference.
2019-04-14 03:20:57 +02:00
Eelco Dolstra
bb6e6923f2 Add environment variable NIX_SHOW_SYMBOLS for dumping the symbol table 2019-04-11 23:04:13 +02:00
Eelco Dolstra
41ba5135e0 primeCache(): Barf if builds are needed but not allowed
Fixes #2753.
2019-04-01 21:09:49 +02:00
Eelco Dolstra
2bc6304793 getMachines(): Cache result 2019-04-01 21:09:35 +02:00
Eelco Dolstra
2f59b30251 Use Nixpkgs 19.03 2019-04-01 21:09:25 +02:00
Niklas Hambüchen
caa76c369a docs: Mention --max-jobs 0 to build remotely only 2019-03-31 03:57:45 +02:00
Eelco Dolstra
f32fbf952d Fix Bison 3.3 warning 2019-03-27 21:09:31 +01:00
Eelco Dolstra
e489f5cabf Update eval-okay-types.exp to match #1828 2019-03-27 21:07:04 +01:00
Bjørn Forsman
07d9981f34 install-multi-user: remove unneeded settings from nix.conf
Hardcoding the "max-jobs" and "cores" settings in nix.conf at install
time, to the same value as Nix' built-in default, makes little sense to
me.
2019-03-27 16:26:14 +01:00
Bjørn Forsman
dbe4c043d7 install-multi-user: reduce max-jobs from 32 to 1
Having max-jobs = 32 ($NIX_USER_COUNT is hardcoded to that value) may
severely overload the machine. The nix.conf(5) manual page says max-jobs
defaults to 1, so let's use that value.

NOTE: Both max-jobs and cores are now being set to their default value,
so they can be removed alltogether.
2019-03-27 16:23:35 +01:00
Samuel Dionne-Riel
d854e7dfd6 install-multi-user: Detect and fail lack of systemd separately
Otherwise, the user is shown:

```
Sorry, I don't know what to do on Linux
```

Which is... not exactly right.
2019-03-26 21:08:22 -04:00
Graham Christensen
6e9e34ea1f
Merge pull request #2744 from veprbl/patch-8
manual: mention the "channel:" shorthand for NIX_PATH
2019-03-25 21:49:48 -04:00
Dmitry Kalinkin
75ec68f93a
manual: mention the "channel:" shorthand for NIX_PATH
Bumped to 15.09 because older channels, when downloaded from
nixos.org, require firefox to be accessed via `pkgs.firefox`
2019-03-25 20:55:28 -04:00
Eelco Dolstra
5c05c238e6
Merge pull request #1828 from zimbatm/isPath
Add isPath primop
2019-03-25 19:58:11 +01:00
Will Dietz
63e7fc5096
perl/configure.ac: fix for new version location too 2019-03-25 09:18:30 +01:00
Will Dietz
1f9c8cd68b
configure.ac: update for new version file location 2019-03-25 09:18:30 +01:00