Yorick van Pelt
f54c168031
add wrapper function around libarchive to c++ errors
2019-12-07 23:10:27 +07:00
Yorick van Pelt
232b390766
fixup! libarchive proof of concept
2019-12-07 23:00:37 +07:00
Yorick van Pelt
9ff5f6492f
libarchive proof of concept
2019-12-07 22:35:14 +07:00
Eelco Dolstra
ab88f4bbd4
Merge remote-tracking branch 'origin/master' into flakes
2019-12-05 20:53:32 +01:00
Eelco Dolstra
3b9c9d34e5
Shut up clang warning
...
(cherry picked from commit 3392f1b778
)
2019-12-05 20:41:44 +01:00
Eelco Dolstra
80ab95315d
nix doctor: Fix typo
...
(cherry picked from commit 96c6b08ed7
)
2019-12-05 20:40:52 +01:00
Eelco Dolstra
048ef27326
Typo
2019-12-05 20:34:34 +01:00
Eelco Dolstra
47a937d512
Show hash mismatch warnings in SRI format
...
(cherry picked from commit 63c5c91cc0
)
2019-12-05 20:32:25 +01:00
Eelco Dolstra
0678e4d56a
Move #include
...
(cherry picked from commit 8beedd4486
)
2019-12-05 20:30:29 +01:00
Eelco Dolstra
79142cbbe1
Bindings: Add convenience method for requiring an attribute
...
(cherry picked from commit fb692e5f7b
)
2019-12-05 20:29:15 +01:00
Eelco Dolstra
0d118ef0c9
Bindings::get(): Add convenience method
...
This allows writing attribute lookups as
if (auto name = value.attrs->get(state.sName))
...
(cherry picked from commit f216c76c56
)
2019-12-05 20:29:00 +01:00
Eelco Dolstra
5e449b43ed
Initialize Command::_name
...
(cherry picked from commit d0a769cb06
)
2019-12-05 20:21:22 +01:00
Eelco Dolstra
ac67685606
Make subcommand construction in MultiCommand lazy
...
(cherry picked from commit a0de58f471
)
2019-12-05 20:19:26 +01:00
Eelco Dolstra
f964f428fe
Move Command and MultiCommand to libutil
...
(cherry picked from commit f70434b1fb
)
2019-12-05 20:13:47 +01:00
Eelco Dolstra
f1b5c76c1a
MultiCommand: Simplify construction
...
(cherry picked from commit 15a16e5c05
)
2019-12-05 20:10:35 +01:00
Eelco Dolstra
092af3c826
Eliminate more pass-by-value in variadic calls
2019-12-05 19:58:52 +01:00
Eelco Dolstra
603b2f583c
Revert "Make fmt() non-recursive"
...
This reverts commit 2b761d5f50
.
Also *really* make fmt() take arguments by reference.
2019-12-05 19:58:49 +01:00
Eelco Dolstra
334b8f8af1
fmt(): Pass arguments by reference rather than by value
2019-12-05 17:40:46 +01:00
Eelco Dolstra
1789c56f43
Fix macOS build
...
https://hydra.nixos.org/build/107716759
2019-12-04 00:36:04 +01:00
Eelco Dolstra
c3c23a52ee
Merge remote-tracking branch 'origin/master' into flakes
2019-12-04 00:31:09 +01:00
Eelco Dolstra
e721f99817
nix: Add --refresh as an alias for --tarball-ttl 0
2019-12-02 15:56:37 +01:00
Eelco Dolstra
0456a4ec65
Merge branch 'run-environment' of https://github.com/mkenigs/nix into flakes
2019-12-02 13:01:43 +01:00
Eelco Dolstra
ac2bc721d8
Merge remote-tracking branch 'origin/recursive-nix'
2019-12-02 12:34:46 +01:00
matthew
062012eee1
typo
2019-12-01 18:34:59 -07:00
Brian Wignall
8737980e75
Fix typos
2019-11-30 19:04:14 -05:00
Eelco Dolstra
f102d793f1
Merge pull request #2748 from edolstra/rust
...
Make nix/unpack-channel.nix a builtin builder
2019-11-29 19:33:31 +01:00
Eelco Dolstra
2d6f1ddbb5
Remove builtins.valueSize
...
Fixes #3246 .
2019-11-28 13:52:42 +01:00
Eelco Dolstra
949dc84894
Fix segfault on i686-linux
...
https://hydra.nixos.org/build/107467517
Seems that on i686-linux, gcc and rustc disagree on how to return
1-word structs: gcc has the caller pass a pointer to the result, while
rustc has the callee return the result in a register. Work around this
by using a bare pointer.
2019-11-27 14:17:15 +01:00
Eelco Dolstra
ca8caaec5e
nix: Add --expr flag
...
This replaces the '(...)' installable syntax, which is not very
discoverable. The downside is that you can't have multiple expressions
or mix expressions and other installables.
2019-11-27 00:05:30 +01:00
Eelco Dolstra
8918bae098
Drop remaining uses of external "tar"
...
Also, fetchGit now runs in O(1) memory since we pipe the output of
'git archive' directly into unpackTarball() (rather than first reading
it all into memory).
2019-11-26 22:07:28 +01:00
Eelco Dolstra
d33dd6e6c0
Move code around
2019-11-26 22:07:28 +01:00
Eelco Dolstra
b7fba16613
Move code around
2019-11-26 22:07:28 +01:00
Eelco Dolstra
f738cd4d97
More Rust FFI adventures
...
We can now convert Rust Errors to C++ exceptions. At the Rust->C++ FFI
boundary, Result<T, Error> will cause Error to be converted to and
thrown as a C++ exception.
2019-11-26 22:07:28 +01:00
Eelco Dolstra
8110b4ebb2
Rust cleanup
2019-11-26 22:07:28 +01:00
Eelco Dolstra
045708db43
Make <nix/unpack-channel.nix> a builtin builder
...
This was the last function using a shell script, so this allows us to
get rid of tar, coreutils, bash etc.
2019-11-26 22:07:28 +01:00
Eelco Dolstra
e60f6bd4ce
Enable Rust code to call C++ Source objects
2019-11-26 22:07:28 +01:00
Eelco Dolstra
11da5b2816
Add some Rust code
2019-11-26 22:07:28 +01:00
Eelco Dolstra
abb8ef619b
Fix macOS build
...
https://hydra.nixos.org/build/107457009
2019-11-26 21:08:56 +01:00
Eelco Dolstra
313106d549
Fix clang warnings
2019-11-26 21:07:44 +01:00
Eelco Dolstra
425991883a
Merge pull request #3141 from xbreak/nocafile
...
Downloader: Log configured CA file
2019-11-26 20:52:25 +01:00
Eelco Dolstra
7c8d7c17f8
Merge pull request #3144 from matthewbauer/fix-sandbox-fallback
...
Fix sandbox fallback settings
2019-11-26 20:51:52 +01:00
Eelco Dolstra
ec5e7b44ff
Simplify
2019-11-26 20:26:22 +01:00
Eelco Dolstra
96e1c39bb7
Merge branch 'repair-bad-links' of https://github.com/chkno/nix
2019-11-26 20:21:48 +01:00
Eelco Dolstra
872740cf60
Merge pull request #3238 from puckipedia/attrset-overrides-dynamic
...
Ensure enough space in attrset bindings
2019-11-26 20:14:55 +01:00
Eelco Dolstra
c13193017f
Disallow empty store path names
...
Fixes #3239 .
2019-11-26 20:12:15 +01:00
Eelco Dolstra
89db9353d7
Doh
2019-11-26 20:08:25 +01:00
Eelco Dolstra
1ec6e6e11e
Add feature to disable URL literals
...
E.g.
$ nix-build '<nixpkgs>' -A hello --experimental-features no-url-literals
error: URL literals are disabled, at /nix/store/vsjamkzh15r3c779q2711az826hqgvzr-nixpkgs-20.03pre194957.bef773ed53f/nixpkgs/pkgs/top-level/all-packages.nix:1236:11
Helps with implementing https://github.com/NixOS/rfcs/pull/45 .
2019-11-26 19:48:34 +01:00
Puck Meerburg
cd55f91ad2
Ensure enough space in attrset bindings when using both __overrides and dynamic attributes
2019-11-25 12:37:14 +00:00
Eelco Dolstra
d12d69ea1a
Turn NIX_PATH into a config setting
...
This allows it to be set in nix.conf.
2019-11-22 23:07:35 +01:00
Eelco Dolstra
ec9dd9a5ae
Provide a default value for NIX_PATH
2019-11-22 22:08:51 +01:00