!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

464 Members
Rust111 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
10 Aug 2024
@emilazy:matrix.orgemily like, that doesn't work for Nix, but the functionality is there. 20:23:01
@emilazy:matrix.orgemilymaybe we could just construct Cargo cache directories šŸ™ƒ20:23:15
@emilazy:matrix.orgemilyimage.png
Download image.png
20:25:00
@emilazy:matrix.orgemily haha, the Discourse forum thread I clicked on also immediately references Nix. we're the only people in the world who want this 20:26:04
@emilazy:matrix.orgemilyanyway, I guess mixing incompatible feature sets does complicate this significantly šŸ« 20:29:34
@emilazy:matrix.orgemilyso the source-based approach is probably better. (but we're still going to need to be careful about constructing lock files for transitive dependency versions, I think.)20:29:53
11 Aug 2024
@emilazy:matrix.orgemilyhttps://github.com/NixOS/nixpkgs/pull/332809 could maybe use a little testing before it goes in if anyone wants to take a look09:49:46
@emilazy:matrix.orgemilyI'm guessing a fair number of people use rustup on NixOS and we're bumping through like 1.5 years of changes09:50:22
@glepage:matrix.orgGaƩtan Lepage 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
12:12:01
@glepage:matrix.orgGaƩtan Lepage
Running phase: buildPhase

ERROR: The Cargo.lock file doesn't exist

Cargo.lock is needed to make sure that cargoHash/cargoSha256 doesn't change
when the registry is updated.
12:12:20
@glepage:matrix.orgGaƩtan Lepage Isn't postPatch suppose to happen... after the patchPhase ? 12:13:44
@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

Show newer messages


Back to Room ListRoom Version: 6