Eelco Dolstra
9f113fe6bf
Merge remote-tracking branch 'origin/master' into configs
2020-09-25 10:28:20 +02:00
Eelco Dolstra
7b2ae472ff
expectArg(): Respect the 'optional' flag
2020-09-25 10:27:40 +02:00
Eelco Dolstra
8f50523c38
nix run: Support overriding module options
...
E.g.
$ nix run /home/eelco/Tweag/nix-ux/configs#hello --argstr who Everybody
warning: creating lock file '/tmp/nix-shell.Jr8WDs/nix-9520-0/flake.lock'
Hello Everybody
2020-09-25 10:11:36 +02:00
Eelco Dolstra
2e5ff87d0e
Merge pull request #4065 from paulopiyo777/flakeBranch
...
Remove redundant value checks
2020-09-25 09:49:15 +02:00
Paul Opiyo
4d863a9fcb
Remove redundant value checks
...
std::optional had redundant checks for whether it had a value.
An object is emplaced either way so it can be dereferenced
without repeating a value check
2020-09-24 18:32:03 -05:00
Eelco Dolstra
5a7fd38dbb
Merge pull request #4063 from kquick/fix_hash-file_desc
...
Fixes fall-through to report correct description of hash-file command.
2020-09-24 23:01:32 +02:00
Eelco Dolstra
dc4a280318
Allow overring module options from the command line
...
E.g.
$ nix build github:tweag/nix-ux/configs?dir=configs#hello --argstr who Everybody
$ ./result/bin/hello
Hello Everybody
This works by generating a new flake that imports the specified one
and sets the specified module options.
2020-09-24 22:55:30 +02:00
Kevin Quick
bd5f3dbe11
Fixes fall-through to report correct description of hash-file command.
2020-09-24 12:30:03 -07:00
Eelco Dolstra
b068f96b92
Merge remote-tracking branch 'origin/master' into configs
2020-09-24 13:05:27 +02:00
Eelco Dolstra
8d9402f411
Merge pull request #4054 from edolstra/fix-4021
...
registerOutputs(): Don't call canonicalisePathMetaData() twice
2020-09-23 21:57:53 +02:00
Eelco Dolstra
4ce8a3ed45
Hopefully fix EPERM on macOS
2020-09-23 21:29:10 +02:00
Eelco Dolstra
9a24ece122
Fix exception
2020-09-23 20:21:08 +02:00
Eelco Dolstra
8ee779da7d
Merge pull request #4057 from martinetd/btrfs-compression
...
nix/store on btrfs compression: add workaround
2020-09-23 19:19:21 +02:00
Eelco Dolstra
236d9ee7f7
lstat() cleanup
2020-09-23 19:17:28 +02:00
Eelco Dolstra
688bd4fb50
After rewriting a path, make it read-only
2020-09-23 19:10:16 +02:00
Eelco Dolstra
31ab4c3816
Test whether build/repair results are read-only
2020-09-23 19:09:58 +02:00
Dominique Martinet
2548347bba
libutil/archive: add preallocate-contents option
...
Make archive preallocation (fallocate) optional because some filesystems
like btrfs do not behave as expected with fallocate.
See #3550 .
2020-09-23 18:49:11 +02:00
Eelco Dolstra
cec9473871
DerivationGoal::registerOutputs(): Don't canonicalize twice
...
Fixes #4021 .
2020-09-23 18:21:22 +02:00
Eelco Dolstra
d4f8163d10
canonicalisePathMetaData_(): Change assertion to error message
2020-09-23 18:21:22 +02:00
Eelco Dolstra
e8f0b1e996
DerivationGoal::registerOutputs(): Fix bad format string
2020-09-23 18:21:22 +02:00
Eelco Dolstra
9c95a8bebf
Merge pull request #4055 from tweag/link-with-gold
...
Use gold as the linker on Linux
2020-09-23 18:20:46 +02:00
regnat
21639b2d17
Use gold as the linker on Linux
...
Saves ~7s in the linking phase
2020-09-23 16:10:31 +02:00
Eelco Dolstra
1dc3f5355a
Support flakes in TOML format
...
So instead of a 'flake.nix', flakes can now contain a 'nix.toml' file
like this:
description = "My own Hello World"
[inputs]
configs.url = "github:tweag/nix-ux/configs?dir=configs"
[my-hello]
extends = [ "configs#hello" ]
doc = '''
A specialized version of the Hello package!
'''
who = "Springfield"
'my-hello' defines an output named 'modules.my-hello', which can be
built as follows:
$ nix build /path/to/flake#my-hello
$ ./result/bin/hello
Hello Springfield
2020-09-23 14:57:47 +02:00
Eelco Dolstra
08992ab6bc
Merge remote-tracking branch 'origin/master' into configs
2020-09-23 14:09:03 +02:00
Eelco Dolstra
8a2e10827f
Remove unused Flake::vOutputs field
2020-09-23 14:08:52 +02:00
Domen Kožar
dac8a1a5e1
Merge pull request #4052 from ujjwaljainnn/fix-typo
...
fixed typo
2020-09-23 09:58:30 +02:00
ujjwal
a2f5c921d4
fixed typo
2020-09-22 23:37:06 +05:30
Eelco Dolstra
c559570c08
Merge remote-tracking branch 'origin/master' into configs
2020-09-22 15:35:44 +02:00
Eelco Dolstra
980edd1f3a
RemoteStore::addCAToStore(): Don't hold connection while calling queryPathInfo()
...
This leads to a deadlock if we're at the connection limit.
2020-09-22 15:28:20 +02:00
Eelco Dolstra
ca85bc5924
Merge remote-tracking branch 'origin/master' into configs
2020-09-22 14:48:07 +02:00
Eelco Dolstra
5b107f2c5f
Merge pull request #4038 from maljub01/master
...
Add a nix.conf option for allowing a symlinked store
2020-09-22 13:19:22 +02:00
Eelco Dolstra
35a0ac1838
Style fixes
2020-09-22 11:40:19 +02:00
Eelco Dolstra
92ac8df0ec
Merge branch 'add-ca-to-store' of https://github.com/hercules-ci/nix
2020-09-22 11:31:33 +02:00
Eelco Dolstra
e7f1109f06
Merge pull request #4040 from OmnipotentEntity/master
...
Fix compatibility with nlohmann-json 3.9.1
2020-09-22 11:09:25 +02:00
Eelco Dolstra
7dd8baafe1
Merge pull request #4041 from cole-h/enum-stringify
...
Serialize SandboxMode enum to string for JSON
2020-09-22 11:08:56 +02:00
Eelco Dolstra
451567d259
Merge pull request #4049 from tweag/remove-signed-unsigned-warning
...
Silence a compiler warning in serialise.hh
2020-09-22 11:05:24 +02:00
Eelco Dolstra
38152410fb
Merge pull request #4048 from tweag/dont-fortify-on-dev
...
Disable `FORTIFY_SOURCE` when compiling without optims
2020-09-22 11:03:19 +02:00
regnat
c1e79f870c
Silence a compiler warning in serialise.hh
...
Explicitely cast to `uint64_t` in `readNum` to avoid a "comparison
between signed and unsigned" warning
2020-09-22 10:39:29 +02:00
regnat
97b5154750
Disable FORTIFY_SOURCE when compiling without optims
...
Otherwise the build is cluttered with
```
/nix/store/fwpn2f7a4iqszyydw7ag61zlnp6xk5d3-glibc-2.30-dev/include/features.h:382:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
382 | # warning _FORTIFY_SOURCE requires compiling with optimization (-O)
| ^~~~~~~
```
when building with `OPTIMIZE=0`
2020-09-22 10:04:25 +02:00
Michael Reilly
d860295e11
Bump nlohmann-json version to 3.9.1
2020-09-21 14:24:43 -04:00
Cole Helbling
ba37299a03
Serialize SandboxMode enum to string for JSON
...
Rather than showing an integer as the default, instead show the boolean
referenced in the description.
The nix.conf.5 manpage used to show "default: 0", which is unnecessarily
opaque and confusing (doesn't 0 mean false, even though the default is
true?); now it properly shows that the default is true.
2020-09-21 10:36:45 -07:00
Eelco Dolstra
ecc8672aa0
fmt.hh: Don't include boost/algorithm/string/replace.hpp
...
This cuts compilation time by ~49s.
Issue #4045 .
2020-09-21 19:07:55 +02:00
Eelco Dolstra
557d2427ee
Random header cleanup
2020-09-21 18:59:02 +02:00
Eelco Dolstra
0716adaa8b
abstractsettingtojson.hh -> abstract-setting-to-json.hh
2020-09-21 18:49:43 +02:00
Eelco Dolstra
340ca382c4
Don't include nlohmann/json.hpp in globals.hh
...
This reduces compilation time by 207s.
Issue #4045 .
2020-09-21 18:47:18 +02:00
Eelco Dolstra
d51ba43047
Move Callback into its own header
...
This gets rid of the inclusion of <future> in util.hh, cutting
compilation time by ~20s (CPU time).
Issue #4045 .
2020-09-21 18:42:21 +02:00
Marwan Aljubeh
f80ffeb8c9
Update the variable name accordingly
2020-09-21 17:29:08 +01:00
Eelco Dolstra
e8e1d420f3
Don't include <regex> in header files
...
This reduces compilation time by ~15 seconds (CPU time).
Issue #4045 .
2020-09-21 18:22:45 +02:00
Marwan Aljubeh
4e1a04733d
Use a better name for the config option
2020-09-21 16:32:22 +01:00
Eelco Dolstra
cbe0bb29f4
Merge pull request #4035 from Ma27/url-attr
...
libfetchers/github: allow `url` attribute
2020-09-21 17:26:36 +02:00