!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

465 Members
Rust111 Servers

Load older messages


SenderMessageTime
17 Sep 2024
@hive:the-apothecary.clubLi-ion changed their profile picture.16:18:32
@hive:the-apothecary.clubLi-ion changed their display name from Ms. Connection to D. Tritus.16:19:41
@arexon:matrix.org@arexon:matrix.org changed their profile picture.16:57:52
18 Sep 2024
@artur:glasgow.social(artur 'manuel) changed their profile picture.23:00:30
19 Sep 2024
@arexon:matrix.org@arexon:matrix.org left the room.09:20:05
@glepage:matrix.orgGaétan Lepage Do you bother fixing VERGEN warnings (complaining about not finding git and thus not being able to fill the VERGEN_* variables) ? 11:50:46
@qyliss:fairydust.spaceAlyssa Rosslots of packages do — plenty of examples in Nixpkgs11:52:41
@glepage:matrix.orgGaétan Lepage Oh yes, I know about the cosmic ones for instance. I was wondering whether it was important or not.
I will go for it as it cannot hurt :)
12:05:43
@qyliss:fairydust.spaceAlyssa Rossexactly12:11:57
20 Sep 2024
@me:alice-carroll.petalice joined the room.03:37:14
@creepinson:matrix.orgTheo ParisHmm should I make a new issue since this is closed? https://github.com/nix-community/home-manager/issues/3482#issuecomment-236287548705:48:46
@creepinson:matrix.orgTheo Paris * Hmm should I make a new issue in nixpkgs itself since this is closed? https://github.com/nix-community/home-manager/issues/3482#issuecomment-236287548705:49:00
@creepinson:matrix.orgTheo ParisI ran nix develop on a flake with rustc in nativeBuildInputs and then cargo run and it failed. I then added iconv to buildInputs on darwin and it worked05:49:42
@qyliss:fairydust.spaceAlyssa RossThat doesn't sound like an issue?07:28:26
@qyliss:fairydust.spaceAlyssa RossSometimes Rust programs depend on iconv, so you have to add an iconv input.07:28:45
@kiike:matrix.orgEnric Morales

What would be the process of overriding the attrs of a cross-compiling rustc (patches or whatever phase)? I am trying in different modifications but not quite hitting the correct incantation:

  cross = import ../../../.. {
    system = hostPlatform.system;
    crossSystem = lib.systems.examples.arm-embedded // {
      rust.rustcTarget = buildTarget.targetPlatform;
    };
    overlays = [
      (final: prev: {
        rustc = prev.wrapRustc (
          prev.rustc.unwrapped.overrideAttrs (
            {
              patches ? [ ],
              ...
            }:
            {
              patches = patches ++ [ ./fix-rustc-bootstrap.patch ];
            }
          )
        );
      })
    ];
  };

of course, if I remove pkgCross and the platform, the rustc will be properly overridden, but the cross-one being untouched. I tried overlaying and setting pkgsBuildTarget instead, but then encountered the following error:

   error: attribute 'targetPackages' missing
09:33:24
@kiike:matrix.orgEnric Morales *

What would be the process of overriding the attrs of a cross-compiling rustc (patches or whatever phase)? The derivation would be inside nixpkgs. I am trying in different modifications but not quite hitting the correct incantation:

  cross = import ../../../.. {
    system = hostPlatform.system;
    crossSystem = lib.systems.examples.arm-embedded // {
      rust.rustcTarget = buildTarget.targetPlatform;
    };
    overlays = [
      (final: prev: {
        rustc = prev.wrapRustc (
          prev.rustc.unwrapped.overrideAttrs (
            {
              patches ? [ ],
              ...
            }:
            {
              patches = patches ++ [ ./fix-rustc-bootstrap.patch ];
            }
          )
        );
      })
    ];
  };

of course, if I remove pkgCross and the platform, the rustc will be properly overridden, but the cross-one being untouched. I tried overlaying and setting pkgsBuildTarget instead, but then encountered the following error:

   error: attribute 'targetPackages' missing
09:34:08
@qyliss:fairydust.spaceAlyssa RossWe don't generally build a separate cross rustc09:37:02
@qyliss:fairydust.spaceAlyssa RossJust a cross std09:37:05
@qyliss:fairydust.spaceAlyssa Ross

(see fastCross in Nixpkgs)

09:37:12
@kiike:matrix.orgEnric Morales
In reply to @qyliss:fairydust.space

(see fastCross in Nixpkgs)

OK! I'll check fastCross then, thanks Alyssa Ross!
10:08:51
@kiike:matrix.orgEnric Morales having read that comment in rustc.nix and a bit more of the buildPhase, my patch would need to be applied to build the std: it applies to the configure script, as upstream has a [bug[(https://github.com/rust-lang/rust/issues/130602) that prevents setting, e.g. the linker options for targets which have a dot. It's what I tried to address last week by changing the configure method. 10:22:58
@kiike:matrix.orgEnric Morales * having read that comment in rustc.nix and a bit more of the buildPhase, my patch would need to be applied to build the std: it applies to the configure script, as upstream has a bug that prevents setting, e.g. the linker options for targets which have a dot. It's what I tried to address last week by changing the configure method. 10:23:21
@kiike:matrix.orgEnric Morales * having read that comment in rustc.nix and a bit more of the buildPhase, my patch would need to be applied to build the std: it applies to the configure script, as upstream has a bug that prevents setting options for targets which have a dot (like thumbv8m.main). It's what I tried to address last week by changing the configure method. 10:23:51
@qyliss:fairydust.spaceAlyssa Rosshmm, I'd expect your overlay there to be doing the right thing11:21:05
@qyliss:fairydust.spaceAlyssa Ross

Wait, did you say you're using pkgsCross, and importing nixpkgs while setting crossSystem?

11:21:58
@kiike:matrix.orgEnric Moralessorry, I tried several iterations. The first was with pkgsCross and that's what I wrote in the message, then tried with just the overlay, modifying rustc as in the code above, but mistakenly left the mention of pkgsCross, adding to the confusion18:59:40
21 Sep 2024
@luna-null:matrix.orgAutumn joined the room.05:43:46
@thescientiac:matrix.org@thescientiac:matrix.org left the room.06:44:31
22 Sep 2024
@rane:junkyard.systemsrane [they/them] joined the room.09:51:23

Show newer messages


Back to Room ListRoom Version: 6