!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

464 Members
Rust111 Servers

Load older messages


SenderMessageTime
26 Aug 2024
@qyliss:fairydust.spaceAlyssa Rossoh no11:03:41
@blitz:chat.x86.lolblitzbtw, is rust-hypervisor-firmware currently broken on unstable?13:25:55
@emilazy:matrix.orgemily
In reply to @9hp71n:matrix.org
Saw this backlinked in tracking 1.80 issue:
https://github.com/rust-lang/cargo/pull/14452#issuecomment-2309726000
(not sure what will happen if it gets merged, but probably nothing very good)
oh this is a terrifying precedent to set
14:31:14
@emilazy:matrix.orgemilymore motivation for the Rust rework, which would mitigate the damage14:31:40
@emilazy:matrix.orgemilythey should really really really just do some hack in the compiler14:32:19
@emilazy:matrix.orgemilyI really don't understand why Rust settled on defaulting to the only impl of a trait if one exists16:11:16
@emilazy:matrix.orgemilyit's such a compat hazard. Haskell doesn't do it16:11:26
@emilazy:matrix.orgemilyI mean I assume "ergonomics" but…16:11:34
@aloisw:kde.org@aloisw:kde.org
In reply to @emilazy:matrix.org
I really don't understand why Rust settled on defaulting to the only impl of a trait if one exists
Same, and I guess they could even change it under the same policy that allows all these breaking changes, so that the entire cost can be paid at once.
16:53:49
@emilazy:matrix.orgemily apparently it would break .as_ref() on Cow and stuff 16:56:46
@emilazy:matrix.orgemilywhich seems like maybe bad trait design (maybe Rust needs to add functional dependencies!)16:56:57
@lennylizowzskiy:eientei.orgl.liz joined the room.19:27:37
27 Aug 2024
@artturin:matrix.orgArtturinhttps://github.com/NixOS/nixpkgs/pull/33753814:39:10
@aloisw:kde.org@aloisw:kde.org left the room.18:02:17
@dre:imad.nycdre joined the room.23:52:43
28 Aug 2024
@dre:imad.nycdre Hey, I'm running into a problem with trying to get this rust package into nixpkgs. I have the derivation right here, using rust-overlay just fine, but it requires me to have a custom rust version. When I use the nixpkgs's default buildRustPackage, it can't seem to find ldd, which it says to install llvm-tools-preview, but I don't see a way to do that. I've been stuck on this for a while -- is there a way to declaratively add rust modules to the default environment in nixpkgs? all the documenation is for flakes 00:04:07
@dre:imad.nycdre
cargo --version
warning: `/build/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
warning: `/build/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
cargo 1.80.0 (376290515 2024-07-16)
# NRF52/test -> "release-thin-lto", use "release" otherwise
cargo build --target thumbv7em-none-eabihf \
        --features board-nk3am,,no-delog, \
         \
        --quiet --profile release
warning: `/build/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
warning: `/build/.cargo/config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
warning: unexpected `cfg` condition value: `test`
   --> components/apps/src/lib.rs:855:35
    |
855 |         let large_blobs = if cfg!(feature = "test") && runner.is_efs_available() {
    |                                   ^^^^^^^^^^^^^^^^
    |
    = note: expected values for `feature` are: `backend-auth`, `backend-rsa`, `factory-reset`, `fido-authenticator`, `log-all`, `ndef-app`, `nk3`, `nk3-provisioner`, `nk3-test`, `nkpk`, `nkpk-provisioner`, `no-reset-time-window`, `opcard`, `piv-authenticator`, `provisioner-app`, `se050`, `secrets-app`, `trussed-auth`, `trussed-rsa-alloc`, `trussed-se050-backend`, `trussed-se050-manage`, `trussed-usbip`, `trussed-usbip-ccid`, `usbd-ctaphid`, and `webcrypt`
    = help: consider adding `test` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default

error: linking with `flip-link` failed: exit status: 102
  |
  = note: LC_ALL="C" PATH="/nix/store/vicqnpjrn25qq4p4jzapj55q00p64iy0-arm-none-eabi-rustc-1.80.1/lib/rustlib/aarch64-unknown-linux-gnu/bin:/nix/store/pzbhqvfp6lxjpb816f3p4gp2nipavv75-rustc-1.80.1/lib/rustlib/aarch64-unknown-linux-gnu/bin:/nix/store/pzbhqvfp6lxjpb816f3p4gp2nipavv75-rustc-1.80.1/lib/rustlib/aarch64-unknown-linux-gnu/bin:/nix/store/nbcwqk3svc3vjqlq27wrninhgqd2wcjk-arm-none-eabi-rustc-wrapper-1.80.1/bin:/nix/store/wcwkcfsnli56grhpsxf7mcagkwan3qfg-arm-none-eabi-cargo-1.80.1/bin:/nix/store/g66rmrin8si72jgfbqzf04k7pl604ak3-cargo-auditable-0.6.2/bin:/nix/store/m1kmmafn7yfgah5klhgjv10kghjzcxpm-cargo-binutils-0.3.6/bin:/nix/store/6zvzv19bqi0cp4pr1a7w6vjgjahdxnag-flip-link-0.1.9/bin:/nix/store/5nq17fwym0lx6m8cjprhd9qaq9iy6v6q-llvm-binutils-wrapper-18.1.8/bin:/nix/store/j4nnxqjdzk4vxky6g3q176hvkf1cgin4-llvm-binutils-18.1.8/bin:/nix/store/ilhr0m9ari0nh8xmzgbvkdqpjzrsylzx-glibc-2.39-52-bin/bin:/nix/store/gdj3wqa788wm5aghx4sh6dnz3jcdmbn9-coreutils-9.5/bin:/nix/store/wviq85xs5awfp75mj5sjq9mn1nkqhq12-python3-3.12.4/bin:/nix/store/sf9ljb1ahsfhgp0x171rnkld8n683alw-auditable-arm-none-eabi-cargo-1.80.1/bin:/nix/store/wcwkcfsnli56grhpsxf7mcagkwan3qfg-arm-none-eabi-cargo-1.80.1/bin:/nix/store/imbw8h46yjayh4zds7a5bl394axhwan5-patchelf-0.15.0/bin:/nix/store/cx4lsk1686yj2hkfj8ppnqhd5ba7g4nc-arm-none-eabi-gcc-wrapper-13.3.0/bin:/nix/store/wdlj8gqvfwdmqhmiy4pmi8zzralq897h-arm-none-eabi-gcc-13.3.0/bin:/nix/store/ljdzm6w09g3lrjn9d1xhn0rjwr1khnrp-arm-none-eabi-binutils-wrapper-2.42/bin:/nix/store/cmdz49fra9ns5c1an20wd18lj5q0d0x2-arm-none-eabi-binutils-2.42/bin:/nix/store/gdj3wqa788wm5aghx4sh6dnz3jcdmbn9-coreutils-9.5/bin:/nix/store/qxmcmky0sgsbb33igmmdc2j3137cfz8h-findutils-4.10.0/bin:/nix/store/aamcxwi0m5z3hzdwysi37qlpfk3rxhfs-diffutils-3.10/bin:/nix/store/82v9hz5nav5swvdmz4cq53f2m671njcc-gnused-4.9/bin:/nix/store/7zx7siwr6hpgkiygi52avqkkjzp7dc7l-gnugrep-3.11/bin:/nix/store/ym0mjp5a03x56ji9kzcb1wizcc060bhj-gawk-5.2.2/bin:/nix/store/3473rfk96nrgggxzp49mjzmih29yw6dw-gnutar-1.35/bin:/nix/store/wm5rpvks3nm7zdq9gzj2b59qv680pp8c-gzip-1.13/bin:/nix/store/hiq1j2g7l1ma0hkpiidbkkli1wyhadxi-bzip2-1.0.8-bin/bin:/nix/store/wpcc7b5gx7w2axb6dyrnk2rc95pic0gs-gnumake-4.4.1/bin:/nix/store/q2xy9y7zsqx2a1harmj0c021chdyfxbw-bash-5.2p32/bin:/nix/store/dp4h0k3nlpiq8rw2ysdwy7kp0psmazkp-patch-2.7.6/bin:/nix/store/3ggxxxgnpizqx4dnlkfq9dag17l05bhn-xz-5.6.2-bin/bin:/nix/store/a5ny6m468fazqkvxkpghmfn6b9ghk0v3-file-5.45/bin:/nix/store/ch5mgr7p0i47d8f7xbga2r1qdzhxqcnb-rustc-wrapper-1.80.1/bin" VSLANG="1033" "flip-link" "-flavor" "gnu" "/build/rustcxgludx/symbols.o" "/build/source/target/thumbv7em-none-eabihf/release/deps/nrf52_runner-9a111bdd1de06a1a.nrf52_runner.466111773b5d41a6-cgu.0.rcgu.o" "--as-needed" "-L" "/build/source/target/thumbv7em-none-eabihf/release/deps" "-L" "/build/source/target/release/deps" "-L" "/build/source/runners/embedded/../ld" "-L" "/build/source/runners/embedded/ld/nrf52" "-L" "/build/source/target/thumbv7em-none-eabihf/release/build/cortex-m-980288800f12b2d0/out" "-L" "/build/source/target/thumbv7em-none-eabihf/release/build/littlefs2-sys-9cbe0f27a95de02b/out" "-L" "/build/source/target/thumbv7em-none-eabihf/release/build/p256-cortex-m4-sys-bd4651f42e4f5d6d/out" "-L" "/build/source/target/thumbv7em-none-eabihf/release/build/salty-33e8a54f37ab3b27/out" "-L" "/build/source/target/thumbv7em-none-eabihf/release/build/nrf52840-pac-470e36dc7b79478e/out" "-L" "/build/source/target/thumbv7em-none-eabihf/release/build/cortex-m-rt-5bd9257045e3f331/out" "-L" "/build/source/target/thumbv7em-none-eabihf/release/build/nrf52840-hal-70c5660b62733f64/out" "-L" "/nix/store/vicqnpjrn25qq4p4jzapj55q00p64iy0-arm-none-eabi-rustc-1.80.1/lib/rustlib/thumbv7em-none-eabihf/lib" "-Bstatic" "/build/rustcxgludx/libp256_cortex_m4_sys-fe7eb43125097126.rlib" "/build/rustcxgludx/libsalty-4cd7b0075ba2824b.rlib" "/build/rustcxgludx/liblittlefs2_sys-9acfc7eeda019586.rlib" "/build/rustcxgludx/libcortex_m-f9e47de66a6a9b1f.rlib" "/build/rustcxgludx/libcortex_m_rt-2986dab70cfc78d4.rlib" "/nix/store/vicqnpjrn25qq4p4jzapj55q00p64iy0-arm-none-eabi-rustc-1.80.1/lib/rustlib/thumbv7em-none-eabihf/lib/libcompiler_builtins-93e7e7ddb53cc4e8.rlib" "-Bdynamic" "--eh-frame-hdr" "-z" "noexecstack" "-L" "/nix/store/vicqnpjrn25qq4p4jzapj55q00p64iy0-arm-none-eabi-rustc-1.80.1/lib/rustlib/thumbv7em-none-eabihf/lib" "-o" "/build/source/target/thumbv7em-none-eabihf/release/deps/nrf52_runner-9a111bdd1de06a1a" "--gc-sections" "-error-limit=0" "-Tcortex-m-rt_0.6.15_link.x" "/build/source/target/thumbv7em-none-eabihf/release/deps/nrf52_runner_audit_data.o" "-Wl,--undefined=AUDITABLE_VERSION_INFO"
  = note: Could not find tool: lld
          at: /nix/store/vicqnpjrn25qq4p4jzapj55q00p64iy0-arm-none-eabi-rustc-1.80.1/lib/rustlib/aarch64-unknown-linux-gnu/bin/rust-lld
          Consider `rustup component add llvm-tools-preview`
          
          flip-link: the native linker failed to link the program normally; please check your project configuration and linker scripts
          

error: could not compile `embedded-runner-lib` (bin "nrf52_runner") due to 1 previous error
make[1]: *** [Makefile:115: build] Error 101
make[1]: Leaving directory '/build/source/runners/embedded'
make: *** [Makefile:78: build-nk3am.bl] Error 2
make: Leaving directory '/build/source/runners/embedded'

00:04:27
@armeen:matrix.orgarmeen joined the room.03:32:09
@ereslibre:matrix.org@ereslibre:matrix.org left the room.07:37:49
@fastfailure:matrix.org@fastfailure:matrix.org left the room.13:44:27
@rosssmyth:matrix.orgrosssmyth joined the room.14:43:05
@rosssmyth:matrix.orgrosssmyth

Hello, I am new to nix and have been trying to get my config setup so that it mostly matches my Windows dev machine. I'm 95% there, but there are a couple things missing, mainly compiling some of my most commonly used programs from source. To start, I'm wondering if it is possible to override how the Helix package is built. I'm having a hard time understanding the flake, so it is unclear to me. Basically I would like to do three things:

  1. Compile with nightly
  2. Enable the "unicode-lines" feature
  3. Use a custom build profile/flags

Thanks.

15:03:32
@9hp71n:matrix.orgghpzin
In reply to @rosssmyth:matrix.org

Hello, I am new to nix and have been trying to get my config setup so that it mostly matches my Windows dev machine. I'm 95% there, but there are a couple things missing, mainly compiling some of my most commonly used programs from source. To start, I'm wondering if it is possible to override how the Helix package is built. I'm having a hard time understanding the flake, so it is unclear to me. Basically I would like to do three things:

  1. Compile with nightly
  2. Enable the "unicode-lines" feature
  3. Use a custom build profile/flags

Thanks.

All of them could be possible, but seem like a major pain if you want to do it "properly" (without patching).
There might be some hint in crane docs: https://crane.dev/index.html
Third one may not be possible without patching if "use custom build" means you want to add new one / change current ones defined in Cargo.toml
16:48:56
@9hp71n:matrix.orgghpzin
In reply to @rosssmyth:matrix.org

Hello, I am new to nix and have been trying to get my config setup so that it mostly matches my Windows dev machine. I'm 95% there, but there are a couple things missing, mainly compiling some of my most commonly used programs from source. To start, I'm wondering if it is possible to override how the Helix package is built. I'm having a hard time understanding the flake, so it is unclear to me. Basically I would like to do three things:

  1. Compile with nightly
  2. Enable the "unicode-lines" feature
  3. Use a custom build profile/flags

Thanks.

* All of them could be possible, but seem like a major pain if you want to do it "properly" (without patching).
There might be some hints in crane docs: https://crane.dev/index.html
Third one may not be possible without patching if "use custom build" means you want to add new one / change current ones defined in Cargo.toml
16:49:16
@9hp71n:matrix.orgghpzin * All of them could be possible, but seem like a major pain if you want to do it "properly" (without patching).
There might be some hints in crane docs: https://crane.dev/index.html
Third one may not be possible without patching if "use custom profile" means you want to add new one / change current ones defined in Cargo.toml
16:50:33
@rosssmyth:matrix.orgrosssmythUsing a custom profile is essentially just a funny way of passing flags to rustc, so if I can do that it would work as well.18:46:29
@rosssmyth:matrix.orgrosssmythI spent a bunch of time looking at the crane docs and was not able to figure it out. Maybe something with the flake overlay output? But I'm not quite sure. I spent some time poking at it during the weekend and didn't make any progress. 18:49:29
@9hp71n:matrix.orgghpzin

This could be some way of doing second thing:

helix-unwrapped = inputs.helix.packages.x86_64-linux.helix-unwrapped.overrideAttrs(old: {
    cargoArtifacts = old.cargoArtifacts // { cargoExtraArgs = "--features unicode-lines"; };
    cargoExtraArgs = "--features unicode-lines";
} );

probably third too or using cargoBuildCommand instead.
Not sure if works, did not build myself and not sure how you would check if feature is there.
And also after that you would need to find a way to wrap resulting helix-unwrapped

18:58:13
@9hp71n:matrix.orgghpzin *

This could be some way of doing second thing:

helix-unwrapped = inputs.helix.packages.x86_64-linux.helix-unwrapped.overrideAttrs(old: {
    cargoArtifacts = old.cargoArtifacts // { cargoExtraArgs = "--locked --features unicode-lines"; };
    cargoExtraArgs = "--locked --features unicode-lines";
} );

probably third too or using cargoBuildCommand instead.
Not sure if works, did not build myself and not sure how you would check if feature is there.
And also after that you would need to find a way to wrap resulting helix-unwrapped

18:59:45
@rosssmyth:matrix.orgrosssmythI did something similar to that before just I did not have "cargoArtifacts" attr. I'll try it when I get home. 19:35:39

Show newer messages


Back to Room ListRoom Version: 6