Taeer Bar-Yam
9da8f5e25d
path antiquotations: canonizePath -> canonicalizePath
2021-08-31 08:02:04 -04:00
Eelco Dolstra
eda0fee160
Merge pull request #5175 from Pamplemousse/make
...
Don't overwrite user provided `lib*_LDFLAGS`
2021-08-30 12:44:29 +02:00
Eelco Dolstra
323cafcb4e
Merge pull request #5191 from hercules-ci/evalstate-lifetime-hygiene
...
EvalState lifetime hygiene
2021-08-30 12:23:09 +02:00
Robert Hensing
8656b130ea
Fix use after free with vImportedDrvToDerivation
2021-08-29 20:42:57 +02:00
Robert Hensing
8bc76acc7c
Move vCallFlake into EvalState
...
This fixes a use-after-free bug:
1. s = new EvalState();
2. callFlake()
3. static vCallFlake now references s
4. delete s;
5. s2 = new EvalState();
6. callFlake()
7. static vCallFlake still references s
8. crash
Nix 2.3 did not have a problem with recreating EvalState.
2021-08-29 20:42:49 +02:00
Robert Hensing
f10465774f
Force all Pos* to be non-null
...
This fixes a class of crashes and introduces ptr<T> to make the
code robust against this failure mode going forward.
Thanks regnat for the idea of a ref<T> without overhead!
Closes #4895
Closes #4893
Closes #5127
Closes #5113
2021-08-29 18:11:58 +02:00
Ben Burdette
310c689d31
remove more explicit valmap code
2021-08-25 13:18:27 -06:00
Ben Burdette
d8a977a22e
adding all the value names from env.values[0]
2021-08-25 11:19:09 -06:00
Pamplemousse
a4c6d319a8
Don't overwrite user provided lib*_LDFLAGS
...
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
2021-08-25 08:59:19 -07:00
Ben Burdette
bd3b5329f9
print env bindings
2021-08-24 16:32:54 -06:00
Eelco Dolstra
af94b54db3
Coding style
2021-08-23 13:05:42 +02:00
Tom Bereknyei
d90582be33
Allow use of path and filterSource in flakes
...
As filterSource and path perform work, add paths to allowedPaths.
2021-08-22 18:45:42 -04:00
Ben Burdette
4b5f9b35f0
env to bindings
2021-08-18 21:25:26 -06:00
Ben Burdette
2272021536
more error fixes
2021-08-18 20:02:23 -06:00
Ben Burdette
e82cf13b1e
switch to fakeenvs
2021-08-18 17:53:10 -06:00
Ben Burdette
b6eb38016b
moving towards env in exceptions
2021-08-17 14:39:50 -06:00
Alex Zero
b3c424f5a6
Fix follows paths in subordinate lockfiles
2021-08-17 15:25:42 +01:00
Piotr Szubiakowski
9f13cb31e8
Install pkg-config files in the correct location
...
Use `$(libdir)` while installing .pc files looks like a more generic
solution. For example, it will work for distributions like RHEL or
Fedora where .pc files are installed in `/usr/lib64/pkgconfig`.
2021-08-13 21:08:58 +00:00
Eelco Dolstra
6b8069b823
In flake lock file diffs, show the last-modified date of inputs if available
...
This is a bit more informative than just the hash.
Also, format the diffs a bit nicer.
2021-08-11 19:35:28 +02:00
Ben Burdette
030271184f
trying env args; but unecessary?
2021-08-09 14:30:47 -06:00
Eelco Dolstra
8943e3176d
Merge pull request #5111 from Pamplemousse/clean
...
Minor maintenance cleaning
2021-08-09 20:05:03 +02:00
Pamplemousse
2de7a1fe67
libexpr: Squash similar conditions
...
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
2021-08-09 10:10:11 -07:00
Alexander Bantyev
54c580b71f
Whitelist nixConfig.flake-registry
...
flake-registry should be safe to set to an aribtrary value, since it
is identical to just setting `inputs`.
2021-08-07 14:42:59 +03:00
Ben Burdette
89264d20e6
move valmap to hh; add to env
2021-08-06 11:09:27 -06:00
Taeer Bar-Yam
8f9429dcab
add antiquotations to paths
2021-08-06 06:46:05 -04:00
Madeline Haraj
cb1ffb7789
Use the store path as the context of the result of fetchTree, not the real path
2021-08-05 22:08:39 -04:00
Viktor Kronvall
7cdaae6b9c
Support SCP-like URLs in builtins.fetchGit attrs
...
This extends https://github.com/NixOS/nix/pull/4978 with
supporting the SCP-like urls in expressions like
```nix
builtins.fetchGit {
url = "git@github.com:NixOS/nix.git";
ref = "master";
}
```
2021-07-30 08:17:46 +09:00
Eelco Dolstra
7816ef6c51
Merge pull request #5042 from alyssais/pthread
...
Enable pthreads for new libraries
2021-07-28 12:31:01 +02:00
Eelco Dolstra
c000cec27f
Merge pull request #5048 from tweag/flox-eval-store
...
--eval-store and faster closure copying
2021-07-27 12:20:32 +02:00
Pamplemousse
c2d7c0cdb9
libexpr: Remove unused code
...
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
2021-07-26 09:14:34 -07:00
Alyssa Ross
ae0c026fe9
Enable pthreads for new libraries
...
Otherwise the lack of pthread causes linking to fail for NetBSD.
2021-07-24 09:15:01 +00:00
Eelco Dolstra
2ff3035cf4
Support --eval-store in nix-instantiate and nix-build
2021-07-22 09:59:51 +02:00
Eelco Dolstra
bef40c2949
Add --eval-store option
2021-07-22 09:59:51 +02:00
Pamplemousse
c1c5dd7449
Avoid global counters
...
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
2021-07-21 16:49:52 -07:00
Eelco Dolstra
fc248cf59e
Merge branch 'balsoft/no-registries' of https://github.com/serokell/nix
2021-07-21 10:11:40 +02:00
Robert Hensing
ad24921de8
Rename findDerivationFilename -> findPackageFilename
...
It does not operate on a derivation and does not return a
derivation path. Instead it works at the language level,
where a distinct term "package" is more appropriate to
distinguish the parent object of `meta.position`; an
attribute which doesn't even make it into the derivation.
2021-07-19 18:10:10 +02:00
Alexander Bantyev
3e57e3480b
Add use-registries config option (and deprecate --no-registries flag)
...
Some people want to avoid using registries at all on their system; Instead
of having to add --no-registries to every command, this commit allows to
set use-registries = false in the config. --no-registries is still allowed
everywhere it was allowed previously, but is now deprecated.
Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2021-07-16 23:26:04 +03:00
Eelco Dolstra
77d5b37da3
Merge pull request #5011 from Pamplemousse/fix_adjustLoc
...
libexpr: Fix read out-of-bound on the heap
2021-07-15 09:23:59 +02:00
Pamplemousse
99f8fc995b
libexpr: Fix read out-of-bound on the heap
...
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
2021-07-14 09:09:42 -07:00
Niels Egberts
ae0ed53b09
toString also coerces a set with an outPath attribute to a string
...
nix-repl> builtins.toString { outPath = "somestring"; }
"somestring"
2021-07-09 21:50:10 +01:00
Eelco Dolstra
d2b8b23ae9
Merge pull request #4995 from NixOS/fetchgit-name-attribute
...
Fix the `name` attribute in builtins.fetchGit
2021-07-09 00:32:13 +02:00
regnat
a654c1d81c
Restore the possibility to use a name
parameter in fetchGit
...
Accidentally broken by 7e5c79a2d2
2021-07-08 14:57:48 +02:00
Eelco Dolstra
8648143120
Merge pull request #4988 from NixOS/fetchgit-name-attribute
...
Add a name attribute to the fetchers
2021-07-08 14:33:49 +02:00
regnat
7e5c79a2d2
Forbid the name
attribute for fetchTree
...
We need to support it for the “old” fetch* functions for backwards
compatibility, but we don’t need it for fetchTree (as it’s a new
function).
Given that changing the `name` messes-up the content hashing, we can
just forbid passing a custom `name` argument to it
2021-07-08 13:53:52 +02:00
Eelco Dolstra
2172e60f7a
Merge pull request #4935 from alyssais/host_os
...
Apply OS checks to host platform, not build
2021-07-08 12:40:54 +02:00
Eelco Dolstra
156666de3d
Merge pull request #4969 from serokell/balsoft/fix-nixConfig-flake-registry
...
flake.nixConfig: fix flake-registry config settings
2021-07-08 12:35:08 +02:00
regnat
e4b082a52b
allow fetchMercurial to take a name
argument
2021-07-06 08:43:06 +02:00
Eelco Dolstra
1f93084149
Merge pull request #4978 from NixOS/scp-uris
...
Allow scp-style uris in `fetchgit`
2021-07-05 14:07:04 +02:00
Eelco Dolstra
24bc935462
Merge branch 'disable_gc' of https://github.com/Pamplemousse/nix
2021-07-05 13:53:52 +02:00
Domen Kožar
f9d72855ae
Merge pull request #4967 from Pamplemousse/specific_errors
...
Prefer to throw specific errors
2021-07-03 10:34:56 +02:00