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 |
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 |