Sender | Message | Time |
---|---|---|
28 Aug 2024 | ||
armeen joined the room. | 03:32:09 | |
@ereslibre:matrix.org left the room. | 07:37:49 | |
@fastfailure:matrix.org left the room. | 13:44:27 | |
rosssmyth joined the room. | 14:43:05 | |
rosssmyth | 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:
Thanks. | 15:03:32 |
ghpzin | In reply to @rosssmyth:matrix.orgAll 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 |
ghpzin | In reply to @rosssmyth:matrix.org* 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 |
ghpzin | * 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 | Using 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 | I 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 |
ghpzin | This could be some way of doing second thing:
probably third too or using | 18:58:13 |
ghpzin | * This could be some way of doing second thing:
probably third too or using | 18:59:45 |
rosssmyth | I did something similar to that before just I did not have "cargoArtifacts" attr. I'll try it when I get home. | 19:35:39 |
29 Aug 2024 | ||
rosssmyth | In reply to @9hp71n:matrix.orgIt did work. Just with the caveat that you said, it is not wrapped. | 02:41:07 |
rosssmyth | Maybe it would be worth reworking it? Are there any good examples of flakes with good configuration/override support? | 02:41:34 |
aos | Is it not possible to overrideAttrs the already wrapped helix package available in the flake? | 03:55:38 |
(artur 'manuel) joined the room. | 05:55:56 | |
@feathecutie:tchncs.de left the room. | 12:40:42 | |
marijan | Hey, I'm packaging https://github.com/golemcloud/golem using with the following error:
I don't understand why it would resolve to the path:
| 19:58:39 |
30 Aug 2024 | ||
(artur 'manuel) changed their display name from Artur Manuel (old email was lost, migrating) to (lambda (u) (format nil "~A lost their email!" u)) "Artur Manuel". | 03:53:07 | |
ghpzin | In reply to @marijan:matrix.orgIf you mean why it includes /build/cargo-vendor-dir/cargo-vendor-dir , it is because of how buildRustPackage works.There is probably a way to patch it with placeholder on cargoDeps somehow. | 06:45:40 |
ˈt͡sɛːzaɐ̯ | Download auditable.txt | 09:34:20 |
ˈt͡sɛːzaɐ̯ | Anyone remember putting a forkbomb into rust-analyzer/cargo-auditable? | 09:34:41 |
ˈt͡sɛːzaɐ̯ | I'm running rust-analyzer from nixos-unstable on a rust project that is mostly a blank project with cargo add matrix-sdk . And I get 100eds of cargo-auditable processes. | 09:36:17 |
marijan | Can you point me to the relevant code? what do you mean with patching it with placeholder on cargoDeps? | 09:52:17 |
cafkafk | it seems to use olm so makes sense? | 10:46:02 |
cafkafk | or... https://github.com/matrix-org/matrix-rust-sdk/blob/224292ab3e3425600a6ee25aa5df17eb197c3831/crates/matrix-sdk-crypto/Cargo.toml#L85 | 10:47:00 |
cafkafk | In reply to @julius:mtx.liftm.dealso lol wtf | 10:47:38 |
ghpzin | In reply to @marijan:matrix.orgI do not know about it much myself, but buildRustPackage has hooks inside them.One of them vendors dependencies, so I thought for your case it could be possible to somehow postPatch placeholder value that would expand into store path of that vendor dir.https://github.com/NixOS/nixpkgs/blob/e5a5a40ef65f73afb94e63faa046f5e77afb294a/pkgs/build-support/rust/hooks/cargo-setup-hook.sh https://github.com/NixOS/nixpkgs/blob/bb26612729b2e1a54de781572eaef5b5ba04f3e6/pkgs/build-support/rust/fetch-cargo-tarball/default.nix But reading around it, not sure if it is possible. Maybe you can just patch it into relative path ie ../golem-wasm-ast , which may work, because all of the crates should be in that same cargo-vendor-dir | 11:49:54 |
ghpzin | In reply to @julius:mtx.liftm.deIs it just from starting rust-analyzer ?It was the first point here about potential of recursing, maybe something else does it too (that one was resolved with wrapper): https://github.com/rust-secure-code/cargo-auditable/issues/89 | 12:25:27 |