!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

610 Members
122 Servers

Load older messages


SenderMessageTime
12 Aug 2024
@qu4pk4:matrix.orgqu4pk4 How to use passthru.tests for testing Flake package builds? My idea is to build static libraries and tests that the lib<name>.a indeed exists by compiling a simple source. 07:45:44
@qu4pk4:matrix.orgqu4pk4 But pkgs.runCommand used in https://nixos.org/manual/nixpkgs/stable/#var-meta-tests-nixos does not result in a derivation and therefore both nix run and nix build complain. 07:46:46
@qu4pk4:matrix.orgqu4pk4 Or are passthru.tests somehow ran automatically on nix bulid '.#<pkg>'? 07:48:45
@amiablechief:matrix.org@amiablechief:matrix.org left the room.11:34:31
@kyub:matrix.org@kyub:matrix.org left the room.16:59:15
13 Aug 2024
@nat:nekopon.plnat changed their profile picture.15:06:42
@nat:nekopon.plnat changed their display name from nat ⋆ ˚。⋆୨୧˚ to nat.15:06:45
@jul1u5:matrix.orgjul1u5 changed their display name from Julius Marozas to jul1u5.21:58:50
14 Aug 2024
@peddie:matrix.orgpeddie changed their profile picture.00:34:49
@fudgemaster:matrix.orgFrank Geusch changed their display name from Master Fudge to Frank Geusch.13:25:41
15 Aug 2024
@simon.brandner:envs.netŠimon BrandnerHi, I am developing a pam module. How would I test the Nix module (and therefore the Pam module) without having to rebuild my system everytime I make a change and want to test it? Is there something clever I can do?14:04:48
@soispha:vhack.euBenediktYou could use the nixos VM test (see the manual and the wiki about that)14:17:34
@soispha:vhack.euBenediktIt could be hard to set the test up though (depending on what part of pam you want to test)14:18:25
@simon.brandner:envs.netŠimon BrandnerIt does sound rather complex but I'll at least have a look14:28:58
@simon.brandner:envs.netŠimon BrandnerOk, a simpler question: how would I add a new PAM rule in my NixOS config?14:40:36
@soispha:vhack.euBenedikt I'm not so familiar with pam, but its probably listed in the option search? 19:01:47
16 Aug 2024
@glaringweakness:nope.chat@glaringweakness:nope.chat left the room.02:05:58
17 Aug 2024
@wdiaz:matrix.orgwdiaz joined the room.04:15:46
@isabel:isabelroses.com@isabel:isabelroses.com left the room.12:36:27
@qu4pk4:matrix.orgqu4pk4 I am having troubles building Java application with gradle2nix that needs sources from one of the submodules. The nix version is 2.42.2, which is after the .?submodules=1 being needed. I have read this https://github.com/NixOS/nix/pull/7862#issuecomment-1908577578 and what I think is going on is that the submodules aren't being needed and therefore aren't fetched (because they are fetched lazily). What is the canonical way to force them to evaluate? 15:08:22
@qu4pk4:matrix.orgqu4pk4 * I am having troubles building Java application with gradle2nix that needs sources from one of the submodules. The nix version is 2.42.2, which is after the .?submodules=1 being needed. I have read this https://github.com/NixOS/nix/pull/7862#issuecomment-1908577578 and what I think is going on is that the submodules aren't being needed by the flake directly and therefore aren't fetched (because they are fetched lazily). What is the canonical way to force them to evaluate? 15:10:19
@qu4pk4:matrix.orgqu4pk4
In reply to @qu4pk4:matrix.org
I am having troubles building Java application with gradle2nix that needs sources from one of the submodules. The nix version is 2.42.2, which is after the .?submodules=1 being needed. I have read this https://github.com/NixOS/nix/pull/7862#issuecomment-1908577578 and what I think is going on is that the submodules aren't being needed by the flake directly and therefore aren't fetched (because they are fetched lazily). What is the canonical way to force them to evaluate?

Ah, it's the # missing... is this expected behaviour:

nix build '.?submodules=1' <- doesn't work
nix build '.?submodules=1#' <- works and invokes the default
15:50:30
18 Aug 2024
@r3vx:matrix.orgr3vx joined the room.14:17:29
@simon.brandner:envs.netŠimon Brandner

I am seeing a peculiar issue: nix build works just fine but when using the flake from my NixOS config I get complaints about Rust version:

error: builder for '/nix/store/p7dajki1blbc0wlsjk86ymh3pi3zh0mk-oblichey-0.0.1.drv' failed with exit code 101;
       last 10 log lines:
       > Finished cargoSetupPostPatchHook
       > Running phase: updateAutotoolsGnuConfigScriptsPhase
       > Running phase: configurePhase
       > Running phase: buildPhase
       > Executing cargoBuildHook
       > ++ env CC_X86_64_UNKNOWN_LINUX_GNU=/nix/store/9bv7dcvmfcjnmg5mnqwqlq2wxfn8d7yi-gcc-wrapper-13.2.0/bin/cc CXX_X86_64_UNKNOWN_LINUX_GNU=/nix/store/9bv7dcvmfcjnmg5mnqw
qlq2wxfn8d7yi-gcc-wrapper-13.2.0/bin/c++ CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=/nix/store/9bv7dcvmfcjnmg5mnqwqlq2wxfn8d7yi-gcc-wrapper-13.2.0/bin/cc CC_X86_64_UNKNOWN
_LINUX_GNU=/nix/store/9bv7dcvmfcjnmg5mnqwqlq2wxfn8d7yi-gcc-wrapper-13.2.0/bin/cc CXX_X86_64_UNKNOWN_LINUX_GNU=/nix/store/9bv7dcvmfcjnmg5mnqwqlq2wxfn8d7yi-gcc-wrapper-13.2.0/
bin/c++ CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=/nix/store/9bv7dcvmfcjnmg5mnqwqlq2wxfn8d7yi-gcc-wrapper-13.2.0/bin/cc CARGO_BUILD_TARGET=x86_64-unknown-linux-gnu HOST_C
C=/nix/store/9bv7dcvmfcjnmg5mnqwqlq2wxfn8d7yi-gcc-wrapper-13.2.0/bin/cc HOST_CXX=/nix/store/9bv7dcvmfcjnmg5mnqwqlq2wxfn8d7yi-gcc-wrapper-13.2.0/bin/c++ cargo build -j 8 --ta
rget x86_64-unknown-linux-gnu --frozen --profile release
       > error: package `cubecl v0.1.1 (https://github.com/tracel-ai/cubecl?rev=dd274b6515f853ab1c82db410d6fc7697060f69e#dd274b65)` cannot be built because it requires rustc
 1.79 or newer, while the currently active rustc version is 1.77.2
       > Either upgrade to rustc 1.79 or newer, or use
       > cargo update cubecl@0.1.1 --precise ver
       > where `ver` is the latest version of `cubecl` supporting rustc 1.77.2
       For full logs, run 'nix log /nix/store/p7dajki1blbc0wlsjk86ymh3pi3zh0mk-oblichey-0.0.1.drv'.
error: 1 dependencies of derivation '/nix/store/mxwvym1s7dd4szzs3ccxnwxfx4iqsqbb-ags.pam.drv' failed to build
error: 1 dependencies of derivation '/nix/store/fbzf0cszdcds4h93m52w7sicav68cfa0-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/8s9wxgvic20f6pxp5cr6nmii9y25pirl-nixos-system-Simon-s-Tuxedo-InfinityBook-14-Gen8-24.11.20240529.ad57eef.drv' failed to build

Has anyone ever seen this?

(originally posted elsewhere but this room might be more appropriate)

19:57:49
19 Aug 2024
@aos1:matrix.orgaos My only guess here is that you have channels active and your nix build is using the nixpkgs from your path, while your flake is using a nixpkgs from your input and they are different 02:48:17
@simon.brandner:envs.netŠimon BrandnerI did find out I had some channels on my system but removing them did not do the trick...07:06:22
@simon.brandner:envs.netŠimon Brandner Will ask in #rust:nixos.org as well... 07:19:01
@simon.brandner:envs.netŠimon BrandnerHow would I handle a flake input that is a Git LFS repo?08:51:04
@simon.brandner:envs.netŠimon BrandnerThis seems to contain some suggestions: https://nixos-and-flakes.thiscute.world/other-usage-of-flakes/inputs10:03:18
@lxsameer:matrix.orglxsameerhey folks, do you know any solution to conditional flake inputs?10:46:47

Show newer messages


Back to Room ListRoom Version: 6