mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2025-06-29 04:39:53 +00:00
nix: patches for armv7a, fix segfault issues, etc (#3383)
* bump mobile-core-tools
* Update deps
* 🤦
* patch
* needs p
* 32bit patches
* bump haskell.nix
* bump again
* fix broken flake.lock
* bump haskell.nix
* bump haskell.nix (to fix darwin)
---------
Co-authored-by: Moritz Angermann <moritz.angermann@gmail.com>
This commit is contained in:
parent
975f6d488e
commit
0d7a048988
2 changed files with 33 additions and 16 deletions
24
flake.lock
generated
24
flake.lock
generated
|
@ -190,11 +190,11 @@
|
||||||
"hackage": {
|
"hackage": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1698020746,
|
"lastModified": 1699834964,
|
||||||
"narHash": "sha256-/eFVtqLu4sGfjJiwmelfH2qK0ZGFOmyCxBTJ1ncOeSI=",
|
"narHash": "sha256-733KT+G0c1euCeb60/u1qbX22Kvu9lNnIDfAmk6Jxq0=",
|
||||||
"owner": "input-output-hk",
|
"owner": "input-output-hk",
|
||||||
"repo": "hackage.nix",
|
"repo": "hackage.nix",
|
||||||
"rev": "dc3cf3bbc0b1e9780e008f9cd6af4a9aeb344ad7",
|
"rev": "2e891e530400187ea1083ffef15adf259061be41",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -240,11 +240,11 @@
|
||||||
"stackage": "stackage"
|
"stackage": "stackage"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1698666250,
|
"lastModified": 1700119633,
|
||||||
"narHash": "sha256-nt8n0N//L7A6T9tgPVAp0Z2JurVDh/DveN2pAIsvIMI=",
|
"narHash": "sha256-nZY2eIo8TkRbXgJXEWMm9zor330GuUtcNzvUN9tN64U=",
|
||||||
"owner": "input-output-hk",
|
"owner": "input-output-hk",
|
||||||
"repo": "haskell.nix",
|
"repo": "haskell.nix",
|
||||||
"rev": "cc58b1a8e0faeb1a4968a91affe0bcc21632f138",
|
"rev": "1fe47a3d52e1ecd6247c8ab83811a21de2e2f074",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -417,11 +417,11 @@
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1698662474,
|
"lastModified": 1699767871,
|
||||||
"narHash": "sha256-VoMvl+N1K8LuWO8rjlm6ko//1/l35InxFTrtNSKRc20=",
|
"narHash": "sha256-kxeCUfwC/Vgh2FvVMlBUq0eVx1JvfHyN+5MPKUik9mE=",
|
||||||
"owner": "zw3rk",
|
"owner": "zw3rk",
|
||||||
"repo": "mobile-core-tools",
|
"repo": "mobile-core-tools",
|
||||||
"rev": "00d48cc5a929af4b047604805dd8aba9933b37e4",
|
"rev": "4dcb77d5ea896d749381806dfab5358851b08951",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -661,11 +661,11 @@
|
||||||
"stackage": {
|
"stackage": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1698278970,
|
"lastModified": 1699834215,
|
||||||
"narHash": "sha256-CogUKaZr3d4cJTeqk/u04Ct2fg1EHBCuN3SrWbNYsuM=",
|
"narHash": "sha256-g/JKy0BCvJaxPuYDl3QVc4OY8cFEomgG+hW/eEV470M=",
|
||||||
"owner": "input-output-hk",
|
"owner": "input-output-hk",
|
||||||
"repo": "stackage.nix",
|
"repo": "stackage.nix",
|
||||||
"rev": "d0599a4c08237202eb560aa2d2625b5daa818cc6",
|
"rev": "47aacd04abcce6bad57f43cbbbd133538380248e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
25
flake.nix
25
flake.nix
|
@ -127,8 +127,22 @@
|
||||||
hardeningDisable = [ "fortify" ];
|
hardeningDisable = [ "fortify" ];
|
||||||
}
|
}
|
||||||
);in {
|
);in {
|
||||||
|
# STATIC x86_64-linux
|
||||||
"${pkgs.pkgsCross.musl64.hostPlatform.system}-static:exe:simplex-chat" = (drv pkgs.pkgsCross.musl64).simplex-chat.components.exes.simplex-chat;
|
"${pkgs.pkgsCross.musl64.hostPlatform.system}-static:exe:simplex-chat" = (drv pkgs.pkgsCross.musl64).simplex-chat.components.exes.simplex-chat;
|
||||||
"${pkgs.pkgsCross.musl32.hostPlatform.system}-static:exe:simplex-chat" = (drv pkgs.pkgsCross.musl32).simplex-chat.components.exes.simplex-chat;
|
# STATIC i686-linux
|
||||||
|
"${pkgs.pkgsCross.musl32.hostPlatform.system}-static:exe:simplex-chat" = (drv' {
|
||||||
|
pkgs' = pkgs.pkgsCross.musl32;
|
||||||
|
extra-modules = [{
|
||||||
|
# 32 bit patches
|
||||||
|
packages.basement.patches = [
|
||||||
|
./scripts/nix/basement-pr-573.patch
|
||||||
|
];
|
||||||
|
packages.memory.patches = [
|
||||||
|
./scripts/nix/memory-pr-99.patch
|
||||||
|
];
|
||||||
|
}];
|
||||||
|
}).simplex-chat.components.exes.simplex-chat;
|
||||||
|
# WINDOWS x86_64-mingwW64
|
||||||
"${pkgs.pkgsCross.mingwW64.hostPlatform.system}:exe:simplex-chat" = (drv' {
|
"${pkgs.pkgsCross.mingwW64.hostPlatform.system}:exe:simplex-chat" = (drv' {
|
||||||
pkgs' = pkgs.pkgsCross.mingwW64;
|
pkgs' = pkgs.pkgsCross.mingwW64;
|
||||||
extra-modules = [{
|
extra-modules = [{
|
||||||
|
@ -229,15 +243,17 @@
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
# "${pkgs.pkgsCross.muslpi.hostPlatform.system}-static:exe:simplex-chat" = (drv pkgs.pkgsCross.muslpi).simplex-chat.components.exes.simplex-chat;
|
# "${pkgs.pkgsCross.muslpi.hostPlatform.system}-static:exe:simplex-chat" = (drv pkgs.pkgsCross.muslpi).simplex-chat.components.exes.simplex-chat;
|
||||||
|
|
||||||
|
# STATIC aarch64-linux
|
||||||
"${pkgs.pkgsCross.aarch64-multiplatform-musl.hostPlatform.system}-static:exe:simplex-chat" = (drv pkgs.pkgsCross.aarch64-multiplatform-musl).simplex-chat.components.exes.simplex-chat;
|
"${pkgs.pkgsCross.aarch64-multiplatform-musl.hostPlatform.system}-static:exe:simplex-chat" = (drv pkgs.pkgsCross.aarch64-multiplatform-musl).simplex-chat.components.exes.simplex-chat;
|
||||||
"armv7a-android:lib:support" = (drv android32Pkgs).android-support.components.library.override {
|
"armv7a-android:lib:support" = (drv android32Pkgs).android-support.components.library.override (p: {
|
||||||
smallAddressSpace = true;
|
smallAddressSpace = true;
|
||||||
# we won't want -dyamic (see aarch64-android:lib:simplex-chat)
|
# we won't want -dyamic (see aarch64-android:lib:simplex-chat)
|
||||||
enableShared = false;
|
enableShared = false;
|
||||||
# we also do not want to have any dependencies listed (especially no rts!)
|
# we also do not want to have any dependencies listed (especially no rts!)
|
||||||
enableStatic = false;
|
enableStatic = false;
|
||||||
|
|
||||||
setupBuildFlags = map (x: "--ghc-option=${x}") [ "-shared" "-o" "libsupport.so" ];
|
setupBuildFlags = p.component.setupBuildFlags ++ map (x: "--ghc-option=${x}") [ "-shared" "-o" "libsupport.so" ];
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
|
||||||
mkdir -p $out/_pkg
|
mkdir -p $out/_pkg
|
||||||
|
@ -250,7 +266,7 @@
|
||||||
echo "file binary-dist \"$(echo $out/*.zip)\"" \
|
echo "file binary-dist \"$(echo $out/*.zip)\"" \
|
||||||
> $out/nix-support/hydra-build-products
|
> $out/nix-support/hydra-build-products
|
||||||
'';
|
'';
|
||||||
};
|
});
|
||||||
# The android-support package is at
|
# The android-support package is at
|
||||||
# https://github.com/simplex-chat/android-support
|
# https://github.com/simplex-chat/android-support
|
||||||
"aarch64-android:lib:support" = (drv androidPkgs).android-support.components.library.override (p: {
|
"aarch64-android:lib:support" = (drv androidPkgs).android-support.components.library.override (p: {
|
||||||
|
@ -293,6 +309,7 @@
|
||||||
packages.direct-sqlcipher.patches = [
|
packages.direct-sqlcipher.patches = [
|
||||||
./scripts/nix/direct-sqlcipher-android-log.patch
|
./scripts/nix/direct-sqlcipher-android-log.patch
|
||||||
];
|
];
|
||||||
|
# 32 bit patches
|
||||||
packages.basement.patches = [
|
packages.basement.patches = [
|
||||||
./scripts/nix/basement-pr-573.patch
|
./scripts/nix/basement-pr-573.patch
|
||||||
];
|
];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue