flare-signal-nixified: cross-compile without emulation
This commit is contained in:
parent
9da604c0af
commit
abc0ac88d3
|
@ -690,17 +690,16 @@ in with final; {
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
flare-signal-nixified = prev.flare-signal-nixified.override {
|
flare-signal-nixified = cantBinfmt ((prev.flare-signal-nixified.override {
|
||||||
# N.B. blueprint-compiler is in nativeBuildInputs.
|
crateOverrideFn = cantBinfmt;
|
||||||
# the trick here is to force the aarch64 versions to be used during build (via emulation).
|
}).overrideAttrs (upstream: {
|
||||||
# blueprint-compiler override shared with tangram.
|
# blueprint-compiler runs on the build machine, but tries to load gobject-introspection types meant for the host.
|
||||||
blueprint-compiler = buildInQemu {} (blueprint-compiler.overrideAttrs (_: {
|
postPatch = (upstream.postPatch or "") + ''
|
||||||
# default is to propagate gobject-introspection *as a buildInput*, when it's supposed to be native.
|
substituteInPlace data/resources/meson.build --replace \
|
||||||
propagatedBuildInputs = [];
|
"find_program('blueprint-compiler')" \
|
||||||
# "Namespace Gtk not available"
|
"'env', 'GI_TYPELIB_PATH=${buildPackages.gdk-pixbuf.out}/lib/girepository-1.0:${buildPackages.harfbuzz.out}/lib/girepository-1.0:${buildPackages.gtk4.out}/lib/girepository-1.0:${buildPackages.graphene}/lib/girepository-1.0:${buildPackages.libadwaita}/lib/girepository-1.0:${buildPackages.pango.out}/lib/girepository-1.0', find_program('blueprint-compiler')"
|
||||||
doCheck = false;
|
'';
|
||||||
}));
|
}));
|
||||||
};
|
|
||||||
|
|
||||||
# 2023/07/31: upstreaming is blocked on ostree dep
|
# 2023/07/31: upstreaming is blocked on ostree dep
|
||||||
# needs binfmt: "./configure: line 17437: /nix/store/j2afjl8psjlk5cz23n45w5x8wkks2rkl-bubblewrap-aarch64-unknown-linux-gnu-0.8.0/bin/bwrap: cannot execute binary file: Exec format error"
|
# needs binfmt: "./configure: line 17437: /nix/store/j2afjl8psjlk5cz23n45w5x8wkks2rkl-bubblewrap-aarch64-unknown-linux-gnu-0.8.0/bin/bwrap: cannot execute binary file: Exec format error"
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,13 +1,14 @@
|
||||||
{
|
{
|
||||||
"blurhash 0.1.1 (git+https://github.com/marc0x1/blurhash-rs?branch=pixbuf-patch#c07c0cbcd29b2277e8c1d0f6ae07b2e0fad1ed52)": "082jv82hsyjpng4idwn120hd7hcyln92n47m056fl2pn6b6nrfj8",
|
"curve25519-dalek 4.0.0 (git+https://github.com/signalapp/curve25519-dalek?tag=signal-curve25519-4.0.0#463e5c7cba32561ffee8a281c4455ff3c25660d4)": "0baapyz09niwn0l64sy5cq1nc9jqsyn78wp7zw893g4mfxhyyi99",
|
||||||
"curve25519-dalek 3.2.1 (git+https://github.com/Schmiddiii/curve25519-dalek?rev=1b9f81352bb659999a46af961f069d635ca432d3#1b9f81352bb659999a46af961f069d635ca432d3)": "0bdwcgski8gv1qig2qqpfcq572qdg8lk96cflv0x5lkngy3524fj",
|
"curve25519-dalek-derive 0.1.0 (git+https://github.com/signalapp/curve25519-dalek?tag=signal-curve25519-4.0.0#463e5c7cba32561ffee8a281c4455ff3c25660d4)": "0baapyz09niwn0l64sy5cq1nc9jqsyn78wp7zw893g4mfxhyyi99",
|
||||||
"libsignal-protocol 0.1.0 (git+https://github.com/signalapp/libsignal?tag=v0.28.1#86b2fcc427bf32530866f4e30b18707c1f3682f7)": "1las4cjr94ghvwyif7sk4l7g7mk237h9a6czwv5517jr6ccjn32m",
|
"libsignal-protocol 0.1.0 (git+https://github.com/signalapp/libsignal?tag=v0.32.0#72f046fe19a5eac22c7abcf9917956f240759364)": "00w7wbw7rw1lvjzpsw3v0fv7ixshpg7dj6dw2qwmdbk8p8xwjahl",
|
||||||
"libsignal-service 0.1.0 (git+https://github.com/whisperfish/libsignal-service-rs?rev=8789920#87899201123b8095cd0f30317620a6d5b7fd652b)": "0cc1wz9j39faqz92brdydi4lv7dhds4j5fn0nrv1c6mgyhhg9rnn",
|
"libsignal-service 0.1.0 (git+https://github.com/whisperfish/libsignal-service-rs?rev=6fc62c8#6fc62c8c67817886560dd2eb99ab5e90f451bd67)": "12ycij5a92y152hnw8l7isxw64hlfbpwk4sj7ih0247m0k96bx77",
|
||||||
"libsignal-service-hyper 0.1.0 (git+https://github.com/whisperfish/libsignal-service-rs?rev=8789920#87899201123b8095cd0f30317620a6d5b7fd652b)": "0cc1wz9j39faqz92brdydi4lv7dhds4j5fn0nrv1c6mgyhhg9rnn",
|
"libsignal-service-hyper 0.1.0 (git+https://github.com/whisperfish/libsignal-service-rs?rev=6fc62c8#6fc62c8c67817886560dd2eb99ab5e90f451bd67)": "12ycij5a92y152hnw8l7isxw64hlfbpwk4sj7ih0247m0k96bx77",
|
||||||
"poksho 0.7.0 (git+https://github.com/signalapp/libsignal?tag=v0.28.1#86b2fcc427bf32530866f4e30b18707c1f3682f7)": "1las4cjr94ghvwyif7sk4l7g7mk237h9a6czwv5517jr6ccjn32m",
|
"poksho 0.7.0 (git+https://github.com/signalapp/libsignal?tag=v0.32.0#72f046fe19a5eac22c7abcf9917956f240759364)": "00w7wbw7rw1lvjzpsw3v0fv7ixshpg7dj6dw2qwmdbk8p8xwjahl",
|
||||||
"presage 0.6.0-dev (git+https://github.com/MarcusGrass/presage?rev=d6d8fff#d6d8fff5f5e6429e6fe9d3c6d388323d094fdab6)": "029n526y3i7vz3nlwwcycrkdxyrb1csha6y6c807mj7qgw30laz2",
|
"presage 0.6.0-dev (git+https://github.com/Schmiddiii/presage?rev=af72b474099361c68f09aff38182eb26d7c8ca86#af72b474099361c68f09aff38182eb26d7c8ca86)": "1000034fv2cg8dvhzsmxx61lvc7llqi73832vrf7wfc79yj47q8z",
|
||||||
"presage-store-sled 0.6.0-dev (git+https://github.com/MarcusGrass/presage?rev=d6d8fff#d6d8fff5f5e6429e6fe9d3c6d388323d094fdab6)": "029n526y3i7vz3nlwwcycrkdxyrb1csha6y6c807mj7qgw30laz2",
|
"presage-store-cipher 0.1.0 (git+https://github.com/Schmiddiii/presage?rev=af72b474099361c68f09aff38182eb26d7c8ca86#af72b474099361c68f09aff38182eb26d7c8ca86)": "1000034fv2cg8dvhzsmxx61lvc7llqi73832vrf7wfc79yj47q8z",
|
||||||
"signal-crypto 0.1.0 (git+https://github.com/signalapp/libsignal?tag=v0.28.1#86b2fcc427bf32530866f4e30b18707c1f3682f7)": "1las4cjr94ghvwyif7sk4l7g7mk237h9a6czwv5517jr6ccjn32m",
|
"presage-store-sled 0.6.0-dev (git+https://github.com/Schmiddiii/presage?rev=af72b474099361c68f09aff38182eb26d7c8ca86#af72b474099361c68f09aff38182eb26d7c8ca86)": "1000034fv2cg8dvhzsmxx61lvc7llqi73832vrf7wfc79yj47q8z",
|
||||||
"zkcredential 0.1.0 (git+https://github.com/signalapp/libsignal?tag=v0.28.1#86b2fcc427bf32530866f4e30b18707c1f3682f7)": "1las4cjr94ghvwyif7sk4l7g7mk237h9a6czwv5517jr6ccjn32m",
|
"signal-crypto 0.1.0 (git+https://github.com/signalapp/libsignal?tag=v0.32.0#72f046fe19a5eac22c7abcf9917956f240759364)": "00w7wbw7rw1lvjzpsw3v0fv7ixshpg7dj6dw2qwmdbk8p8xwjahl",
|
||||||
"zkgroup 0.9.0 (git+https://github.com/signalapp/libsignal?tag=v0.28.1#86b2fcc427bf32530866f4e30b18707c1f3682f7)": "1las4cjr94ghvwyif7sk4l7g7mk237h9a6czwv5517jr6ccjn32m"
|
"zkcredential 0.1.0 (git+https://github.com/signalapp/libsignal?tag=v0.32.0#72f046fe19a5eac22c7abcf9917956f240759364)": "00w7wbw7rw1lvjzpsw3v0fv7ixshpg7dj6dw2qwmdbk8p8xwjahl",
|
||||||
|
"zkgroup 0.9.0 (git+https://github.com/signalapp/libsignal?tag=v0.32.0#72f046fe19a5eac22c7abcf9917956f240759364)": "00w7wbw7rw1lvjzpsw3v0fv7ixshpg7dj6dw2qwmdbk8p8xwjahl"
|
||||||
}
|
}
|
|
@ -6,6 +6,7 @@
|
||||||
{ lib
|
{ lib
|
||||||
, appstream-glib
|
, appstream-glib
|
||||||
, blueprint-compiler
|
, blueprint-compiler
|
||||||
|
, buildPackages
|
||||||
, defaultCrateOverrides
|
, defaultCrateOverrides
|
||||||
, desktop-file-utils
|
, desktop-file-utils
|
||||||
, fetchFromGitLab
|
, fetchFromGitLab
|
||||||
|
@ -28,6 +29,7 @@
|
||||||
, stdenv
|
, stdenv
|
||||||
, wrapGAppsHook4
|
, wrapGAppsHook4
|
||||||
, writeText
|
, writeText
|
||||||
|
, crateOverrideFn ? x: x
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
extraCrateOverrides = {
|
extraCrateOverrides = {
|
||||||
|
@ -37,7 +39,11 @@ let
|
||||||
domain = "gitlab.com";
|
domain = "gitlab.com";
|
||||||
owner = "schmiddi-on-mobile";
|
owner = "schmiddi-on-mobile";
|
||||||
repo = "flare";
|
repo = "flare";
|
||||||
|
rev = "0.10.1-beta.4";
|
||||||
|
hash = "sha256-SkHARJ4V8t4dXITH+V36RIfPrWL5Bdju1gahCS2aiWo=";
|
||||||
|
|
||||||
# flare/Cargo.nix version compatibility:
|
# flare/Cargo.nix version compatibility:
|
||||||
|
# - flare 0.10.1-beta.5: errors with curve25519_dalek_backend stuff
|
||||||
# - flare tip (49060eee): same errors as 0.10.1-beta.2
|
# - flare tip (49060eee): same errors as 0.10.1-beta.2
|
||||||
# - flare 0.10.1-beta.2: requires gtk 4.11, not yet in nixpkgs
|
# - flare 0.10.1-beta.2: requires gtk 4.11, not yet in nixpkgs
|
||||||
# - <https://github.com/NixOS/nixpkgs/pull/247766>
|
# - <https://github.com/NixOS/nixpkgs/pull/247766>
|
||||||
|
@ -68,8 +74,8 @@ let
|
||||||
# hash = "sha256-xkTM8Jeyb89ZUo2lFKNm8HlTe8BTlO/flZmENRfDEm4=";
|
# hash = "sha256-xkTM8Jeyb89ZUo2lFKNm8HlTe8BTlO/flZmENRfDEm4=";
|
||||||
# rev = "0.10.1-beta.1";
|
# rev = "0.10.1-beta.1";
|
||||||
# hash = "sha256-nUR3jnbjMJvI3XbguFLz5yQL3SAXzLkdVwXyhcMeZoc=";
|
# hash = "sha256-nUR3jnbjMJvI3XbguFLz5yQL3SAXzLkdVwXyhcMeZoc=";
|
||||||
rev = "0.10.0";
|
# rev = "0.10.0";
|
||||||
hash = "sha256-+9zpYW9xjLe78c2GRL6raFDR5g+R/JWxQzU/ZS+5JtY=";
|
# hash = "sha256-+9zpYW9xjLe78c2GRL6raFDR5g+R/JWxQzU/ZS+5JtY=";
|
||||||
# rev = "0.9.3";
|
# rev = "0.9.3";
|
||||||
# hash = "sha256-bTR3Jzzy8dVdBJ4Mo2PYstEnNzBVwiWE8hRBnJ7pJSs=";
|
# hash = "sha256-bTR3Jzzy8dVdBJ4Mo2PYstEnNzBVwiWE8hRBnJ7pJSs=";
|
||||||
# rev = "0.9.2";
|
# rev = "0.9.2";
|
||||||
|
@ -191,19 +197,19 @@ let
|
||||||
'';
|
'';
|
||||||
installPhase = "ninjaInstallPhase";
|
installPhase = "ninjaInstallPhase";
|
||||||
};
|
};
|
||||||
|
|
||||||
gdk-pixbuf-sys = attrs: attrs // {
|
gdk-pixbuf-sys = attrs: attrs // {
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
buildInputs = [ gdk-pixbuf ];
|
buildInputs = [ gdk-pixbuf ];
|
||||||
};
|
};
|
||||||
gdk4-x11-sys = attrs: attrs // {
|
|
||||||
nativeBuildInputs = [ pkg-config ];
|
|
||||||
buildInputs = [ gtk4 ]; # depends on "gtk4_x11"
|
|
||||||
};
|
|
||||||
|
|
||||||
gdk4-wayland-sys = attrs: attrs // {
|
gdk4-wayland-sys = attrs: attrs // {
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
buildInputs = [ gtk4 ]; # depends on "gtk4_wayland"
|
buildInputs = [ gtk4 ]; # depends on "gtk4_wayland"
|
||||||
};
|
};
|
||||||
|
gdk4-x11-sys = attrs: attrs // {
|
||||||
|
nativeBuildInputs = [ pkg-config ];
|
||||||
|
buildInputs = [ gtk4 ]; # depends on "gtk4_x11"
|
||||||
|
};
|
||||||
gio-sys = attrs: attrs // {
|
gio-sys = attrs: attrs // {
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
buildInputs = [ glib ];
|
buildInputs = [ glib ];
|
||||||
|
@ -216,6 +222,13 @@ let
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
buildInputs = [ libadwaita ];
|
buildInputs = [ libadwaita ];
|
||||||
};
|
};
|
||||||
|
ring = attrs: attrs // {
|
||||||
|
# CARGO_MANIFEST_LINKS = "ring_core_0_17_5";
|
||||||
|
postPatch = (attrs.postPatch or "") + ''
|
||||||
|
substituteInPlace build.rs --replace \
|
||||||
|
'links = std::env::var("CARGO_MANIFEST_LINKS").unwrap();' 'links = "ring_core_0_17_5".to_string();'
|
||||||
|
'';
|
||||||
|
};
|
||||||
sourceview5-sys = attrs: attrs // {
|
sourceview5-sys = attrs: attrs // {
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
buildInputs = [ gtksourceview5 ];
|
buildInputs = [ gtksourceview5 ];
|
||||||
|
@ -240,8 +253,24 @@ let
|
||||||
|
|
||||||
cargoNix = import ./Cargo.nix {
|
cargoNix = import ./Cargo.nix {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
release = false;
|
||||||
rootFeatures = [ ]; #< avoids --cfg feature="default", simplifying the rustc CLI so that i can pass it around easier
|
rootFeatures = [ ]; #< avoids --cfg feature="default", simplifying the rustc CLI so that i can pass it around easier
|
||||||
defaultCrateOverrides = defaultCrateOverrides';
|
defaultCrateOverrides = defaultCrateOverrides';
|
||||||
};
|
};
|
||||||
in cargoNix.workspaceMembers.flare.build
|
builtCrates = cargoNix.internal.builtRustCratesWithFeatures {
|
||||||
|
packageId = "flare";
|
||||||
|
features = [];
|
||||||
|
buildRustCrateForPkgsFunc = pkgs: crateArgs: let
|
||||||
|
crateDeriv = (pkgs.buildRustCrate.override {
|
||||||
|
defaultCrateOverrides = defaultCrateOverrides';
|
||||||
|
}) crateArgs;
|
||||||
|
in
|
||||||
|
crateOverrideFn crateDeriv;
|
||||||
|
crateConfigs = cargoNix.internal.crates;
|
||||||
|
runTests = false;
|
||||||
|
};
|
||||||
|
in builtCrates.crates.flare.overrideAttrs (super: {
|
||||||
|
passthru = (super.passthru or {}) // {
|
||||||
|
inherit (builtCrates) crates;
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user