!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

465 Members
Rust111 Servers

Load older messages


SenderMessageTime
11 Aug 2024
@glepage:matrix.orgGaétan Lepage
  src = fetchFromGitHub {
    owner = "SUPERCILEX";
    repo = "clipboard-history";
    rev = "refs/tags/${version}";
    hash = "sha256-rBU365pqGitMAOWhIJi3RUGJYxEh7wOmhC+Re0XUN2M=";
  };

  postPatch = ''
    OBVIOUSLY_FAILING
  '';
Running phase: unpackPhase
unpacking source archive /nix/store/wxpy3mavklvryl263ryrikh27ynxv2dq-source
calling 'unpackCmd' function hook '_defaultUnpack' /nix/store/wxpy3mavklvryl263ryrikh27ynxv2dq-source
source root is source/server
calling 'postUnpack' function hook '_updateSourceDateEpochFromSourceRoot'
Running phase: patchPhase
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
calling 'preConfigure' function hook '_multioutConfig'
no configure script, doing nothing
Running phase: buildPhase
12:16:22
@emilazy:matrix.orgemily do you override patchPhase? 13:21:59
@9hp71n:matrix.orgghpzin
In reply to @glepage:matrix.org
If I have set sourceRoot to some subfolder of the main source tree, but there is a single Cargo.lock file at the root, how should I do ?
I tried mv ../Cargo.lock . in postPatch, but the build fails even before
I think buildAndTestSubdir = "server"; with nothing else should work.
If it's a workspace lock and you just want to build one crate from it.
13:22:34
@9hp71n:matrix.orgghpzin
In reply to @glepage:matrix.org
If I have set sourceRoot to some subfolder of the main source tree, but there is a single Cargo.lock file at the root, how should I do ?
I tried mv ../Cargo.lock . in postPatch, but the build fails even before
* I think buildAndTestSubdir = "server"; with nothing else should work.
If it's a workspace lock and you just want to build one crate from it.
https://github.com/NixOS/nixpkgs/blob/04f4be3e4385d7962347505807a0e55720c414aa/doc/languages-frameworks/rust.section.md?plain=1#L510-L515
13:23:43
@glepage:matrix.orgGaétan LepageThanks ! I'll try this :)13:24:05
12 Aug 2024
@amiablechief:matrix.org@amiablechief:matrix.org left the room.11:34:32
@emilazy:matrix.orgemily2024 rust goals:18:36:15
@emilazy:matrix.orgemilyimage.png
Download image.png
18:36:19
@emilazy:matrix.orgemily(https://rust-lang.github.io/rust-project-goals/2024h2/accepted.html)18:36:20
@emilazy:matrix.orgemily maybe we can dylib it up by 2025 :) 18:36:30
@r522:matrix.org522yeah i have CARGO_TARGET_DIR set for this, but it definitely is a bit hacky18:37:20
@emilazy:matrix.orgemilywe were talking about actually building crates once in separate derivations without having to replace Cargo entirely the other day18:38:05
@r522:matrix.org522(2 binaries with the same name in different places will alias, so running one may actually run the other, depending on which was built first)18:38:11
@emilazy:matrix.orgemilyand it seemed like Cargo just really didn't want us to do it. but maybe with this we can make it happen18:38:20
13 Aug 2024
@reckenrode:matrix.orgRandy Eckenrode
In reply to @emilazy:matrix.org
anyway, I guess mixing incompatible feature sets does complicate this significantly 🫠
Can feature flags be included in the name? This seems like a problem the Nix approach is well-equipped to handle.
13:55:31
@emilazy:matrix.orgemilyAIUI, if you have dependencies on crate A that depends on C with feature X and crate B that depends on C with feature Y, Cargo will build crate C with features {X,Y}13:56:36
@emilazy:matrix.orgemilythat's full version resolver territory13:56:46
@emilazy:matrix.orgemilywe could potentially get away with just doing our own dumb Nix-like resolution and having more duplicates, but as of now there's no way to convince Cargo to let us do that13:57:03
@k900:0upti.meK900Correct, Cargo features are strictly additive13:57:18
@emilazy:matrix.orgemilywith the user-wide cache thing I think we'd end up just getting a cache miss on crate C with this, which wouldn't be so bad13:57:36
@emilazy:matrix.orgemily actually resolving all the features would be cool, but like, the idea is to avoid reimplementing Cargo 13:57:50
@emilazy:matrix.orgemilysince people have already tried that with Nix and AIUI not been successful enough for us to adopt at a wide scale13:58:04
@emilazy:matrix.orgemily(though if someone is brave enough to truly try…)13:58:14
@emilazy:matrix.orgemilyanyway we will actually have to handle features to some extent for transitive dependencies and stuff… so it's possible I'll end up needing most of this complexity anyway14:01:15
@emilazy:matrix.orgemilybut I suspect not because stuff will just propagate14:01:22
@emilazy:matrix.orgemilythe nice thing about treating packages as source is that the source is invariant between build configurations14:01:32
@emilazy:matrix.orgemilyI've written about 60% of the program in my head so there's only 90% of it left to do when I actually start typing14:02:02
@reckenrode:matrix.orgRandy Eckenrode
In reply to @emilazy:matrix.org
AIUI, if you have dependencies on crate A that depends on C with feature X and crate B that depends on C with feature Y, Cargo will build crate C with features {X,Y}
Oh. It doesn’t keep them separate like it does different’t versions? What if crate features are incompatible? (Don’t do that?)
14:04:56
@emilazy:matrix.orgemilyyeah, incompatible crate features are officially not supported. so of course people do them anyway, and it breaks14:05:30
@emilazy:matrix.orgemilyit doesn't separate out different versions, or at least, it doesn't completely separate them like Node does14:05:40

Show newer messages


Back to Room ListRoom Version: 6