!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

464 Members
Rust111 Servers

Load older messages


SenderMessageTime
19 Aug 2024
@samasaur:matrix.orgsamasaursince idk where else nixpkgs could be coming from08:24:28
@samasaur:matrix.orgsamasaurmight be something about how the module system means that it is using the nixpkgs that made the nixosSystem08:25:35
@samasaur:matrix.orgsamasaur
In reply to @blitz:chat.x86.lol
The quick fix would be in your NixOS config to manually set the package option of this module to the package output of the flake
this is probably the right solution for your use case
08:25:51
@samasaur:matrix.orgsamasaurif you can’t update the nixpkgs input of your config flake08:26:16
@simon.brandner:envs.netŠimon BrandnerHmm, it seems to be building now08:29:09
@simon.brandner:envs.netŠimon BrandnerI would expect this to be a very common problem and I don't really understand why it works this way...08:29:46
@blitz:chat.x86.lolblitzYou might want to try the NixOS discourse for these kinds of questions 08:29:55
@simon.brandner:envs.netŠimon BrandnerIs there another way to use a flake in my system config?08:29:58
@blitz:chat.x86.lolblitzIt's a problem with how the module is written 08:31:40
@simon.brandner:envs.netŠimon BrandnerHow should I write it instead?08:31:55
@blitz:chat.x86.lolblitzhttps://flake.parts/define-module-in-separate-file <- flake parts has a solution for this exact problem but it has its own steep learning curve 08:32:47
@blitz:chat.x86.lolblitzYou have to use outputs.packages... to define the default of the package option and not callPackage again 08:33:49
@blitz:chat.x86.lolblitzThe quick version would be to pass the flake's self parameter to the module 08:34:16
@blitz:chat.x86.lolblitzBut I'm currently sitting in a plane and can't directly edit your example. If you post it on discourse I'm sure someone can help you improve the module 08:35:00
@simon.brandner:envs.netŠimon BrandnerSounds good, I'll look at the link and possibly post on discourse08:39:15
@simon.brandner:envs.netŠimon Brandner
In reply to @blitz:chat.x86.lol
But I'm currently sitting in a plane and can't directly edit your example. If you post it on discourse I'm sure someone can help you improve the module
Here: https://discourse.nixos.org/t/nixos-module-using-system-nixpkgs-instead-of-the-nixpkgs-specified-in-the-modules-flake/50816
09:22:30
@mightyiam:matrix.orgShahar "Dawn" Or (mightyiam) joined the room.09:55:33
@blitz:chat.x86.lolblitz
In reply to @simon.brandner:envs.net
Here: https://discourse.nixos.org/t/nixos-module-using-system-nixpkgs-instead-of-the-nixpkgs-specified-in-the-modules-flake/50816
The response you got looks good!
10:15:38
@blitz:chat.x86.lolblitzI hope it helps you!10:15:50
@simon.brandner:envs.netŠimon BrandnerI'll give it a go later10:15:58
@simon.brandner:envs.netŠimon BrandnerIt did do the trick!11:25:06
@cafkafk:gitter.imcafkafk changed their profile picture.12:45:30
@damccull:matrix.orgdamccullIs it possible to have a flake with nativeBuildInputs listed such that one particular package is built from source with a specific version of rustc/cargo that is different than the version my devShell would then use?19:17:19
@damccull:matrix.orgdamccull * Is it possible to have a flake with nativeBuildInputs listed such that one particular package is built from source with a specific version of rustc/cargo that is different than the version my devShell would then use? Where I (hopefully) specify it instead of making a new flake/overlay for it19:18:17
@sasha:the-apothecary.clubSashanoraa.gay (she/her, ze/zir)
In reply to @damccull:matrix.org
Is it possible to have a flake with nativeBuildInputs listed such that one particular package is built from source with a specific version of rustc/cargo that is different than the version my devShell would then use? Where I (hopefully) specify it instead of making a new flake/overlay for it
I think something like that might be possile using the rust overlay https://github.com/oxalica/rust-overlay
19:38:43
@damccull:matrix.orgdamccull
In reply to @sasha:the-apothecary.club
I think something like that might be possile using the rust overlay https://github.com/oxalica/rust-overlay
Excellent. Now to figure out how. I'm already using oxilica's overlay. It's nice.
19:39:38
@damccull:matrix.orgdamccullMakes it easy to have multiple version of rust where I can jus tlaunch the right version devShell, but I need to figure out how a 1.80 devShell can build a specific dependency with 1.78 :D19:40:13
@qyliss:fairydust.spaceAlyssa RossAre you sure it isn't easier to update that dependency?20:09:09
@qyliss:fairydust.spaceAlyssa Ross(assuming this is because of the inference changes in 1.80, it's usually a very easy fix)20:09:51
20 Aug 2024
@weethet:catgirl.cloudWeetHet joined the room.00:09:38

Show newer messages


Back to Room ListRoom Version: 6