mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-03-30 16:25:57 +00:00
nix: add the second x86 ios sim build with swift JSON
This commit is contained in:
31
flake.nix
31
flake.nix
@@ -245,7 +245,7 @@
|
||||
# we need threaded here, otherwise all the queing logic doesn't work properly.
|
||||
# for iOS we also use -staticlib, to get one rolled up library.
|
||||
# still needs mac2ios patching of the archives.
|
||||
ghcOptions = [ "-staticlib" "-threaded" ];
|
||||
ghcOptions = [ "-staticlib" "-threaded" "-DIOS" ];
|
||||
postInstall = ''
|
||||
${pkgs.tree}/bin/tree $out
|
||||
mkdir -p $out/_pkg
|
||||
@@ -267,6 +267,33 @@
|
||||
};
|
||||
};
|
||||
"x86_64-darwin" = {
|
||||
# this is the aarch64-darwin iOS build (to be patched with mac2ios)
|
||||
"x86_64-darwin-ios:lib:simplex-chat" = (drv' { pkgs' = pkgs; extra-modules = [{ packages.simplexmq.flags.swift = true; }]; } ).simplex-chat.components.library.override {
|
||||
smallAddressSpace = true; enableShared = false;
|
||||
# we need threaded here, otherwise all the queing logic doesn't work properly.
|
||||
# for iOS we also use -staticlib, to get one rolled up library.
|
||||
# still needs mac2ios patching of the archives.
|
||||
ghcOptions = [ "-staticlib" "-threaded" "-DIOS" ];
|
||||
postInstall = ''
|
||||
${pkgs.tree}/bin/tree $out
|
||||
mkdir -p $out/_pkg
|
||||
# copy over includes, we might want those, but maybe not.
|
||||
# cp -r $out/lib/*/*/include $out/_pkg/
|
||||
# find the libHS...ghc-X.Y.Z.a static library; this is the
|
||||
# rolled up one with all dependencies included.
|
||||
find ./dist -name "libHS*.a" -exec cp {} $out/_pkg \;
|
||||
find ${pkgs.libffi.overrideAttrs (old: { dontDisableStatic = true; })}/lib -name "*.a" -exec cp {} $out/_pkg \;
|
||||
find ${pkgs.gmp6.override { withStatic = true; }}/lib -name "*.a" -exec cp {} $out/_pkg \;
|
||||
# There is no static libc
|
||||
${pkgs.tree}/bin/tree $out/_pkg
|
||||
(cd $out/_pkg; ${pkgs.zip}/bin/zip -r -9 $out/pkg-ios-x86_64-swift-json.zip *)
|
||||
rm -fR $out/_pkg
|
||||
mkdir -p $out/nix-support
|
||||
echo "file binary-dist \"$(echo $out/*.zip)\"" \
|
||||
> $out/nix-support/hydra-build-products
|
||||
'';
|
||||
};
|
||||
# This is the aarch64-darwin build with tagged JSON format (for Mac & Flutter)
|
||||
"x86_64-darwin:lib:simplex-chat" = (drv pkgs).simplex-chat.components.library.override {
|
||||
smallAddressSpace = true; enableShared = false;
|
||||
# we need threaded here, otherwise all the queing logic doesn't work properly.
|
||||
@@ -285,7 +312,7 @@
|
||||
find ${pkgs.gmp6.override { withStatic = true; }}/lib -name "*.a" -exec cp {} $out/_pkg \;
|
||||
# There is no static libc
|
||||
${pkgs.tree}/bin/tree $out/_pkg
|
||||
(cd $out/_pkg; ${pkgs.zip}/bin/zip -r -9 $out/pkg-ios-x86_64.zip *)
|
||||
(cd $out/_pkg; ${pkgs.zip}/bin/zip -r -9 $out/pkg-ios-x86_64-tagged-json.zip *)
|
||||
rm -fR $out/_pkg
|
||||
mkdir -p $out/nix-support
|
||||
echo "file binary-dist \"$(echo $out/*.zip)\"" \
|
||||
|
||||
Reference in New Issue
Block a user