!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

508 Members
Rust112 Servers

Load older messages


SenderMessageTime
29 Nov 2024
@m1-s:matrix.orgm1-s changed their profile picture.02:28:36
@m1-s:matrix.orgm1-s changed their profile picture.02:29:54
30 Nov 2024
@julius:mtx.liftm.de@julius:mtx.liftm.de left the room.12:14:45
1 Dec 2024
@shawn8901:matrix.orgshawn8901 joined the room.00:09:33
@mmkaram:matrix.orgmmkaram joined the room.21:32:39
2 Dec 2024
@imadalin:matrix.orgMadalin joined the room.11:33:59
@entheogenesis:matrix.orgentheogenesis

Hello. I am attempting to build a Rust application which uses a crate named xdelta3. Unfortunately, it does not build:

Found crate xdelta3 at /nix/store/kr2svmhylbmrysp5w488h22n2ynzv811-xdelta3-rs-50d63cd/Cargo.toml
'/nix/store/kr2svmhylbmrysp5w488h22n2ynzv811-xdelta3-rs-50d63cd/' -> '/nix/store/hfmis00l8q90v3nzxlgxfla1aks3sbnx-xdelta3-0.1.5'
...
cp: cannot stat '/nix/store/kr2svmhylbmrysp5w488h22n2ynzv811-xdelta3-rs-50d63cd/xdelta3/xdelta3/py-compile': No such file or directory
...

I noticed that this file is excluded in the Cargo.toml file: https://github.com/liushuyu/xdelta3-rs/blob/7bca8bc72548bd88a92a308dcd01225c3e842bc7/Cargo.toml#L10-L12

Does anyone know what I can to do fix this?

20:30:59
@tnias:stratum0.orgtnias

Do you have fetchSubmodules = true; inside the fetchFromGitHub?

20:35:29
@entheogenesis:matrix.orgentheogenesis tnias: Yes. It doesn't make a difference. 20:48:31
@tnias:stratum0.orgtnias

entheogenesis After adding fetchSubmodules the hash needs to be updated. If you don't update the hash, it will continue to use the old src (the one, that matches the old hash).

20:50:11
@tnias:stratum0.orgtniasNot sure, if that is something you forgot, but it's something slightly unexpected I ran into ^^20:51:14
@entheogenesis:matrix.orgentheogenesis

I invalidated the hash, but it remained the same in the end:

error: build of '/nix/store/6gvnbzyxwfi4f6zz6b5fvp6j0mr0yjqb-source.drv' on 'ssh-ng://nix-cp1' failed: hash mismatch in fixed-output derivation '/nix/store/6gvnbzyxwfi4f6zz6b5fvp6j0mr0yjqb-source.drv':
         specified: sha256-fN46Rr0v28LOMriApu17/nrFPkZjQ4nG5IhDsWbLduk=
            got:    sha256-FN46Rr0v28LOMriApu17/nrFPkZjQ4nG5IhDsWbLduk=
error: builder for '/nix/store/6gvnbzyxwfi4f6zz6b5fvp6j0mr0yjqb-source.drv' failed with exit code 1

Specifically, I invalidated it by changing the first character from F to f.

20:56:25
@tnias:stratum0.orgtnias

That's strange. I got differen hashes.

src = fetchFromGitHub {
    owner = "liushuyu";
    repo = "xdelta3-rs";
    rev = "7bca8bc72548bd88a92a308dcd01225c3e842bc7";
    hash = "sha256-ffcC1Uwyk7bSYDb0+Y/u7nLUrK9ZVGLMMeEncqcydk4=";
    fetchSubmodules = true;
  };

  cargoHash = "sha256-datZIWu2JA8UUu7Ck8WPQNJBrKH6to1Kq1wIdWB827M=";

But more importantly: the py-compile is a symlink to some automake thing. oof
lrwxrwxrwx 1 user users 41 Jan 1 1970 py-compile -> /usr/local/share/automake-1.11/py-compile

21:02:25
@tnias:stratum0.orgtnias *

That's strange. I got differen hashes.

src = fetchFromGitHub {
    owner = "liushuyu";
    repo = "xdelta3-rs";
    rev = "7bca8bc72548bd88a92a308dcd01225c3e842bc7";
    hash = "sha256-ffcC1Uwyk7bSYDb0+Y/u7nLUrK9ZVGLMMeEncqcydk4=";
    fetchSubmodules = true;
  };

  cargoHash = "sha256-datZIWu2JA8UUu7Ck8WPQNJBrKH6to1Kq1wIdWB827M=";

But more importantly: the py-compile is a symlink to some automake thing. oof

lrwxrwxrwx 1 user users     41 Jan  1  1970 py-compile -> /usr/local/share/automake-1.11/py-compile
21:02:40
@entheogenesis:matrix.orgentheogenesis Oh, good find! I am not trying to build xdelta3 directly, as it is a dependency of an application. Here is what I am attempting to do. 21:19:39
@entheogenesis:matrix.orgentheogenesis

I suppose what I want to know is, if the Cargo.toml file specifies this:

exclude = [
    "xdelta3/xdelta3/py-compile"
]

Why is nixpkgs trying to copy an excluded file?

21:37:49
@tnias:stratum0.orgtniasI am afaid I can't help with that.21:47:51
@entheogenesis:matrix.orgentheogenesisI appreciate you looking. Is there a better Matrix room in which to pose this question?21:56:36
@tnias:stratum0.orgtniasThat sounds like an issue specific to how buildRustPackage is implemented. I believe the room is correct. I am just not very experienced with the rust ecosystem in nix, yet. :)22:02:44
3 Dec 2024
@getchoo:matrix.orggetchoo changed their profile picture.06:06:31
4 Dec 2024
@orzklv:matrix.org@orzklv:matrix.org

I’m trying to build a tauri application on 24.11 and running into this issue:

/nix/store/3k5jd0aq55r4cysfz9j5g019lvmzbf6q-cargo-1.82.0/bin/cargo: /nix/store/790yignx6svw9kaxqdw02qzs7fh61psp-openssl-3.0.15/lib/libssl.so.3: version `OPENSSL_3.2.0' not found (required by /nix/store/fqwkalsvg898sgf969bqpaz4blypx5gd-curl-8.11.0/lib/libcurl.so.4)
08:26:39
@orzklv:matrix.org@orzklv:matrix.orgis there any chance that this is because of pkgs.lib.makeLibraryPath openssl_3?08:28:03
@orzklv:matrix.org@orzklv:matrix.orgyup, it is. thanks for ya’ll attention.08:32:08
@entheogenesis:matrix.orgentheogenesis

K900: Do you happen to know what I need to do fix the aforementioned build issue? You said this:

Probably replace that symlink in the vendor drv
But I do not know how to do that.

21:03:14
@entheogenesis:matrix.orgentheogenesis *

K900: Do you happen to know what I need to do fix the aforementioned build issue? You said this:

Probably replace that symlink in the vendor drv

But I do not know how to do that

21:03:20
@entheogenesis:matrix.orgentheogenesis *

K900: Do you happen to know what I need to do fix the aforementioned build issue? You said this:

Probably replace that symlink in the vendor drv

But I do not know how to do that.

21:03:29
5 Dec 2024
@djacu:matrix.orgdjacu What's the current best practice for using buildRustPackage with a private registry that requires authentication? I am working with a private Artifactory instance and have been able to get builds working using the cargoLock.lockFile by vendoring import-cargo-lock.nix and modifying the registry URL. This works though because of a secret in the netrc file that the sandbox has access to. It does not work when using cargoHash or cargoVendorDir because cargo gets involved and is looking for registry credentials either via the config.toml in CARGO_HOME or the environment variable that stores the token for a registry. 01:29:23
@qualytllc:matrix.orgDanny Gerhardt joined the room.09:58:19
@morj:morj.menMorjI've been lazily trying to solve this for two years now. For now the solution is to vendor all private deps as git submodules, and patch the project to use those instead. This separates checkout of private repos and build with everything publicly available, but honestly it's a silly solution11:47:14
@morj:morj.menMorj* I've been lazily trying to solve this for two years now. For now my solution is to vendor all private deps as git submodules, and patch the project to use those instead. This separates checkout of private repos and build with everything publicly available, but honestly it's a silly solution11:47:21

Show newer messages


Back to Room ListRoom Version: 6