File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
pkgs/by-name/gl/glycin-loaders Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 2020 ninja ,
2121 pkg-config ,
2222 rustc ,
23+ rustPlatform ,
2324} :
2425
2526stdenv . mkDerivation ( finalAttrs : {
@@ -39,6 +40,8 @@ stdenv.mkDerivation (finalAttrs: {
3940 finalAttrs . passthru . glycinPathsPatch
4041 ] ;
4142
43+ cargoVendorDir = "vendor" ;
44+
4245 nativeBuildInputs = [
4346 cargo
4447 gettext # for msgfmt
@@ -47,6 +50,7 @@ stdenv.mkDerivation (finalAttrs: {
4750 ninja
4851 pkg-config
4952 rustc
53+ rustPlatform . cargoSetupHook
5054 ] ;
5155
5256 buildInputs = [
@@ -68,6 +72,13 @@ stdenv.mkDerivation (finalAttrs: {
6872
6973 strictDeps = true ;
7074
75+ postPatch = ''
76+ substituteInPlace loaders/meson.build \
77+ --replace-fail "cargo_target_dir / rust_target / loader," "cargo_target_dir / '${ stdenv . hostPlatform . rust . cargoShortTarget } ' / rust_target / loader,"
78+ '' ;
79+
80+ env . CARGO_BUILD_TARGET = stdenv . hostPlatform . rust . rustcTargetSpec ;
81+
7182 passthru = {
7283 updateScript = gnome . updateScript {
7384 attrPath = "glycin-loaders" ;
You can’t perform that action at this time.
0 commit comments