!VRULIdgoKmKPzJZzjj:nixos.org

Nix Hackers

901 Members
For people hacking on the Nix package manager itself191 Servers

Load older messages


SenderMessageTime
18 Apr 2025
@winter:catgirl.cloudWinter anyone know if the docs to build locally w/ Meson are still accurate? the prefix env stuff doesn’t seem to work properly — --prefix gets properly passed to meson setup but ninja’s install phase is still trying to install into $PREFIX 08:58:53
@allrealmsoflife:matrix.orgallrealmsoflife
In reply to @winter:catgirl.cloud
anyone know if the docs to build locally w/ Meson are still accurate? the prefix env stuff doesn’t seem to work properly — --prefix gets properly passed to meson setup but ninja’s install phase is still trying to install into $PREFIX
Are you trying to build Nix from source? Which docs are you following, the official ones building from source dont say much, and last time I failed building Nix from source too.
09:10:44
@trofi:matrix.orgtrofi New json-3.12.0 exposed a bug in how nix deserializes integers: https://github.com/NixOS/nix/issues/13046 15:54:09
@Ericson2314:matrix.orgJohn Ericson thanks trofi 16:59:23
@Ericson2314:matrix.orgJohn Ericson I didn't know we had a $PREFIX defined? 16:59:54
@winter:catgirl.cloudWinter
In reply to @Ericson2314:matrix.org
I didn't know we had a $PREFIX defined?
in the default nix-shell $PREFIX points to nix-util’s $out ;)
17:00:16
@Ericson2314:matrix.orgJohn Ericson Winter: oh hmm that might be an artifact of how we made the dev shell? 17:01:27
@winter:catgirl.cloudWinteryeah. but i guess that begs the question: has nobody tested the dev shell/does nobody use it?17:02:23
@winter:catgirl.cloudWinterlike should a shell hook be added to just unset $prefix/$out? that seems simplest but shrug17:02:53
@winter:catgirl.cloudWinteror dontSetPrefix=true ig17:03:09
@Ericson2314:matrix.orgJohn Ericson Winter: I don't think we do much installing from the dev shell 19:21:05
@winter:catgirl.cloudWinterfair, guess you just use the bins19:21:24
@Ericson2314:matrix.orgJohn Ericsonwhat made you want to do that?19:21:24
@Ericson2314:matrix.orgJohn Ericson (though I do recall runnning installPhase and it worked with nix develop) 19:21:40
@Ericson2314:matrix.orgJohn Ericson trofi: gotta say the nlohmann people don't seem super clear about this 19:22:19
@winter:catgirl.cloudWinternothing in particular19:22:33
@winter:catgirl.cloudWinterwas just linearly following the docs19:22:33
@Ericson2314:matrix.orgJohn Ericsone.g. is a positive integer always parsed as an unsigned number?19:22:39
@Ericson2314:matrix.orgJohn Ericsondo you need to try both just to be sure?19:22:44
@Ericson2314:matrix.orgJohn Ericsonmaybe the docs need to be changed?19:23:07
@Ericson2314:matrix.orgJohn Ericsonbefore you had to install for the install tests19:23:12
@Ericson2314:matrix.orgJohn Ericsonwith since Meson you don't need t19:23:18
@Ericson2314:matrix.orgJohn Ericson* with since Meson you don't need to19:23:19
@winter:catgirl.cloudWinter
In reply to @Ericson2314:matrix.org
maybe the docs need to be changed?
might be best to remove the install section, yeah
19:32:59
@trofi:matrix.orgtrofi Yeah. AFAIU the https://github.com/nlohmann/json/issues/4475 as get_ref() can expose mutable references it's unsafe to return signed reference to unsigned underlying type (breaks -fstrict-aliasing assumptions). It was allowed by accident. And AFAIU whether to use signed or unsigned internally is dependent on actual json data. 0 is unsigned while -1 is signed. 19:46:48
19 Apr 2025
@ochoa:matrix.orgOchoa left the room.21:30:18
@jaen:matrix.orgjaen I'm not sure if it's the best place to ask this, but I figured subflakes are new enough and not yet ironed out that it might as well be. I tried to play around with them with the latest nix to see how the situation has improved and I have two questions:
a) should I expect subflakes to work without a git repo, or not? If lockfiles are already there it seems to keep working even if I drop the .git folder, but without it will fail to generate the lock file complaining about access to absolute path '/nix/store/flake.nix' is forbidden in pure evaluation mode for a subflake that refers to its parent,
b) in another test I have a root flake, and two child flakes which are siblings. Both siblings refer to the parent, and one of the siblings refer to another, which results in a found circular import of flake for the root flake. Is this something that is not supposed work "by specification" or is it a consequence of https://github.com/NixOS/nix/issues/7730 not being resolved yet? I feel intuitively that this should work, but maybe there's something I missing that makes it impossible?
22:07:11
@alexfmpe:matrix.orgalexfmpe changed their profile picture.23:56:01
20 Apr 2025
@cikokaro:matrix.orgorhosko joined the room.08:51:54
@roberthensing:matrix.orgRobert Hensing (roberth) a: Relative path flakes are an incremental improvement. They create a new relation, between a flake and a "parent" whose source it is relative to. The source of a path flake (ie non-git) is currently always the directory of the flake in isolation, so inputs can only refer to subdirectories.
This could be improved by parsing the flake.nix in the context of the whole file system first, figure out the locations of the closure of path inputs, and use those. I don't think we can treat them similarly to git flakes though, because that would mean taking the most specific common ancestor directory as the only "parent source" for all path inputs, which will include things like ~/src or /. That's not feasible with the current flake to store path copying solution, but even after we fix that, it would not be checking any kind of hermeticity. I think the property we want is that the knowing the inputs closure is sufficient to know which files are available to evaluation, and such a single source wouldn't provide much info.
Instead, we could import these flakes individually and by default disallow any "implicit", non-inputs parent references like "${readFile ../version.txt}". These could be re-allowed with an explicit parent = ../.; field in the flake.nix top level attrset. This is more explicit/hermetic and makes the eval cache more effective by ignoring changes in unrelated sibling directories.
We could prototype this approach by implementing it for path inputs first and harmonizing the other flake input types with it afterwards.
11:54:20

Show newer messages


Back to Room ListRoom Version: 6