!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

610 Members
122 Servers

Load older messages


SenderMessageTime
31 Jul 2024
@simon.brandner:envs.netŠimon Brandner So the problem is that the build.rs thingy is failing to find the file it generated (and I indeed cannot find it in /tmp/nix-build-app-0.0.1.drv-0) 16:47:55
@simon.brandner:envs.netŠimon Brandner It could be an issue with OUT_DIR not being set correctly... 16:50:32
@quapka4:matrix.orgquapka4

Hi folks, is it not possible to directly change the sources in $src during any of the phases? Imagine I need to add a generic target to Makefile, so I wanted to do something like:

  mySource = ./extraMakeTarget.txt
  <somePhase> = ''
    cat $mySource >> $src/makefile
  '';

But I am getting a Permission Denied error.

17:08:40
@quapka4:matrix.orgquapka4 I don't/can't easily use patches because the makefile can have various structure depending on the version of the package. 17:09:14
@quapka4:matrix.orgquapka4I assumed that during the phases I kinda have a full access to whatever sources I have, because my changes through any phase end up in the resulting hash anyway.17:12:05
@soispha:vhack.euBenedikt
In reply to @quapka4:matrix.org
I assumed that during the phases I kinda have a full access to whatever sources I have, because my changes through any phase end up in the resulting hash anyway.
You actually do, but the source (refered to by $src) is still in the read-only nix store. You probably want to change the upacked source, which should be in the working directory of the builder
17:17:46
@quapka4:matrix.orgquapka4
In reply to @soispha:vhack.eu
You actually do, but the source (refered to by $src) is still in the read-only nix store. You probably want to change the upacked source, which should be in the working directory of the builder
Ah, thanks!
17:19:57
@quapka4:matrix.orgquapka4 So, change $src to $sourceRoot works. 17:20:33
@quapka4:matrix.orgquapka4 And I guess postUnpack would be the appropriate place. 17:23:26
@simon.brandner:envs.netŠimon Brandner
In reply to @simon.brandner:envs.net
It could be an issue with OUT_DIR not being set correctly...
Trying to print it makes a bit confused... When building using cargo, I see /home/..., when using nix build, I see /build/...
17:29:38
@samasaur:matrix.orgsamasaur Pretty sure that is because when you are using nix build the build is run as a nixbld user, and their home directories are not under /home 19:09:25
1 Aug 2024
@rick:matrix.ciphernetics.nlMindavi
In reply to @quapka4:matrix.org
And I guess postUnpack would be the appropriate place.
postPatch or prePatch, I'd say
05:31:16
@teutat3s:pub.solar@teutat3s:pub.solar left the room.07:50:30
@vika:fireburn.ruVika (she/her) changed their profile picture.11:50:42
2 Aug 2024
@fiioul:matrix.orgfiioul joined the room.19:37:18
7 Aug 2024
@oatmealraisin:matrix.orgoatmealraisin joined the room.17:56:26
@taffisher:matrix.org@taffisher:matrix.org left the room.19:13:00
@hyperflarex:matrix.orghyperflare joined the room.19:44:42
8 Aug 2024
@quapka4:matrix.orgquapka4 Hi, a simple thing :D. I have a flake.nix that builds on my NixOS machine, but when I tried to build that flake on another non-NixOS machine that has Nix installed with nix-user-chroot the build fails on one particular package (libgpg-error). What is the reasonable way to debug this? 08:29:52
@quapka4:matrix.orgquapka4I hope it's some mismatch of channels or some version or something, because this hassle with "runs on my machine" is exactly something I wanted to avoid when diving into Nix :D08:30:43
@dramforever:matrix.orgdramforever
In reply to @quapka4:matrix.org
Hi, a simple thing :D. I have a flake.nix that builds on my NixOS machine, but when I tried to build that flake on another non-NixOS machine that has Nix installed with nix-user-chroot the build fails on one particular package (libgpg-error). What is the reasonable way to debug this?
if the store path is the same then it's not some channel or version mismatch
08:33:18
@dramforever:matrix.orgdramforeverit could just be something in libgpg-error that works differently in a chroot... unfortunately it's also basically an ad-hoc process to see what went wrong08:34:06
@quapka4:matrix.orgquapka4 Well, nix-user-chroot gives me /nix/store and my NixOS also has /nix/store. 08:34:56
@dramforever:matrix.orgdramforeveroh i mean the path of that thing that "builds"08:35:16
@dramforever:matrix.orgdramforeverhow are you running anything? full command and logs?08:35:24
@dramforever:matrix.orgdramforever it should fail at the end something like for full logs run nix log /nix/store/somethingsomething.drv 08:35:53
@quapka4:matrix.orgquapka4 Just nix build '.?submodules=1'. 08:36:00
@dramforever:matrix.orgdramforeverif that long something is the same it's not a channel or version mismatch08:36:03
@dramforever:matrix.orgdramforeveroh yeah sorry there's no way to know what the success side looks like 🤦08:36:38
@dramforever:matrix.orgdramforever
In reply to @quapka4:matrix.org
Just nix build '.?submodules=1'.
how about nix eval --raw '.?submodules=1' on both sides
08:37:11

Show newer messages


Back to Room ListRoom Version: 6