tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
snapshot: fix cross compilation
Colin
5 months ago
9bf01eef
2882c071
+11
1 changed file
expand all
collapse all
unified
split
pkgs
by-name
sn
snapshot
package.nix
+11
pkgs/by-name/sn/snapshot/package.nix
···
11
11
ninja,
12
12
pkg-config,
13
13
rustc,
14
14
+
rustPlatform,
14
15
wrapGAppsHook4,
15
16
glib,
16
17
gst_all_1,
···
35
36
# Fix paths in glycin library
36
37
glycin-loaders.passthru.glycinPathsPatch
37
38
];
39
39
+
40
40
+
cargoVendorDir = "vendor";
38
41
39
42
nativeBuildInputs = [
40
43
cargo
···
45
48
ninja
46
49
pkg-config
47
50
rustc
51
51
+
rustPlatform.cargoSetupHook
48
52
wrapGAppsHook4
49
53
];
50
54
···
69
73
'.files."src/sandbox.rs" = $hash' \
70
74
vendor/glycin/.cargo-checksum.json \
71
75
| sponge vendor/glycin/.cargo-checksum.json
76
76
+
77
77
+
substituteInPlace src/meson.build --replace-fail \
78
78
+
"'src' / rust_target / meson.project_name()" \
79
79
+
"'src' / '${stdenv.hostPlatform.rust.cargoShortTarget}' / rust_target / meson.project_name()"
72
80
'';
73
81
74
82
preFixup = ''
···
79
87
--prefix XDG_DATA_DIRS : "${glycin-loaders}/share"
80
88
)
81
89
'';
90
90
+
91
91
+
# For https://gitlab.gnome.org/GNOME/snapshot/-/blob/34236a6dded23b66fdc4e4ed613e5b09eec3872c/src/meson.build#L57
92
92
+
env.CARGO_BUILD_TARGET = stdenv.hostPlatform.rust.rustcTargetSpec;
82
93
83
94
passthru.updateScript = gnome.updateScript {
84
95
packageName = "snapshot";