| 19 Aug 2025 |
Artturin | cargoVendorDir = "vendor" is enough to fix it :P | 00:53:39 |
Artturin | diff --git a/pkgs/by-name/gl/glycin-loaders/package.nix b/pkgs/by-name/gl/glycin-loaders/package.nix
index 06bc12716d63..c0a237512fec 100644
--- a/pkgs/by-name/gl/glycin-loaders/package.nix
+++ b/pkgs/by-name/gl/glycin-loaders/package.nix
@@ -20,6 +20,7 @@
ninja,
pkg-config,
rustc,
+ rustPlatform,
}:
stdenv.mkDerivation (finalAttrs: {
@@ -47,8 +48,11 @@ stdenv.mkDerivation (finalAttrs: {
ninja
pkg-config
rustc
+ rustPlatform.cargoSetupHook
];
+ cargoVendorDir = "vendor";
+
buildInputs = [
gtk4 # for GdkTexture
cairo
@@ -68,6 +72,13 @@ stdenv.mkDerivation (finalAttrs: {
strictDeps = true;
+ postPatch = ''
+ substituteInPlace loaders/meson.build \
+ --replace-fail "cargo_target_dir / rust_target / loader," "cargo_target_dir / '${stdenv.hostPlatform.rust.cargoShortTarget}' / rust_target / loader,"
+ '';
+
+ env.CARGO_BUILD_TARGET = stdenv.hostPlatform.rust.rustcTargetSpec;
+
passthru = {
updateScript = gnome.updateScript {
attrPath = "glycin-loaders";
| 00:53:42 |
Artturin | * cargoVendorDir = "vendor" with the hook is enough to fix it :P | 00:54:13 |
QuadRadical (Ping) | oh awesome! | 00:54:32 |
QuadRadical (Ping) | thank you so so much for the help! | 00:54:48 |
Artturin |  Download image.png | 00:56:59 |
QuadRadical (Ping) | im almost there i think :) | 00:57:05 |
Artturin | https://github.com/NixOS/nixpkgs/pull/434878 | 00:59:09 |
QuadRadical (Ping) | hmm so i added an overlay:
glycin-loaders = super.glycin-loaders.overrideAttrs (old: {
postPatch = lib.optionalString (super.stdenv.buildPlatform != super.stdenv.hostPlatform) ''
substituteInPlace loaders/meson.build \
--replace-fail "cargo_target_dir / rust_target / loader," "cargo_target_dir / '${super.stdenv.hostPlatform.rust.cargoShortTarget}' / rust_target / loader,"
'';
nativeBuildInputs = (old.nativeBuildInputs or []) ++ [super.rustPlatform.cargoSetupHook];
cargoVendorDir = "vendor";
env.CARGO_BUILD_TARGET = super.stdenv.hostPlatform.rust.rustcTargetSpec;
});
But it still fails with the old error | 01:02:45 |
Artturin | --keep-failed and see if /build/.cargo/config.toml matches what I sent in the SS | 01:08:53 |
Artturin | * --keep-failed and see if /build/.cargo/config.toml matches what I sent in the screenshot | 01:08:58 |
QuadRadical (Ping) | /build/.cargo doesnt exist | 01:10:49 |
Artturin | Does the build log have the cargoSetupHooks at the start | 01:11:35 |
Artturin | Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/ics3xr1jgfmagn18jax3h5nva7g5smys-glycin-1.2.3.tar.xz
source root is glycin-1.2.3
Executing cargoSetupPostUnpackHook
Finished cargoSetupPostUnpackHook
| 01:11:37 |
QuadRadical (Ping) | in my build i just have these | 01:11:40 |
QuadRadical (Ping) |  Download Screenshot From 2025-08-18 21-11-26.png | 01:11:40 |
QuadRadical (Ping) | i think the .cargo here has your stuff | 01:12:02 |
QuadRadical (Ping) | yeah | 01:12:07 |
Artturin | Thats /build/.cargo | 01:12:19 |
QuadRadical (Ping) | oh is nix-build-glycin-loaders-aarch64-unknown-linux-gnu-1.2.3.drv-26 the same as /build | 01:12:46 |
Artturin | /build/.cargo is a full path in the sandbox | 01:12:57 |
Artturin | So I'm talking about sandbox paths | 01:13:03 |
Artturin | so yeah | 01:13:19 |
QuadRadical (Ping) | oh sorry | 01:13:22 |
QuadRadical (Ping) | then yes, i think i have the same | 01:13:33 |
QuadRadical (Ping) | [source."crates-io"]
"replace-with" = "vendored-sources"
[source."vendored-sources"]
"directory" = "/build/glycin-1.2.3/vendor"
[target."aarch64-unknown-linux-gnu"]
"linker" = "/nix/store/73kvxgyddj06nlvkd3wsl6vq2jr2dm1m-aarch64-unknown-linux-gnu-gcc-wrapper-14.3.0/bin/aarch64-unknown-linux-gnu-cc"
"rustflags" = [ "-Cforce-frame-pointers=yes" ]
| 01:13:42 |
QuadRadical (Ping) | a bit different actually? | 01:13:51 |
Artturin | For me the path is /comp-temp/nix-build-glycin-loaders-aarch64-unknown-linux-gnu-1.2.3.drv-5/build/.cargo tho | 01:13:58 |
QuadRadical (Ping) | you have an x86_64 thing in there | 01:14:09 |
QuadRadical (Ping) | i dont | 01:14:13 |