Compare commits

...

3 Commits

Author SHA1 Message Date
Moritz Angermann d438cec674 Disable i686-linux-static build 2024-04-21 10:09:25 +00:00
Moritz Angermann e4c5dbdb08 Disable aarch64-linux-static build. 2024-04-21 10:09:04 +00:00
Moritz Angermann 5d1a393131 Disable windows builds 2024-04-21 10:08:09 +00:00
+118 -117
View File
@@ -140,128 +140,129 @@
# STATIC x86_64-linux # 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;
# STATIC i686-linux # STATIC i686-linux
"${pkgs.pkgsCross.musl32.hostPlatform.system}-static:exe:simplex-chat" = (drv' { # "${pkgs.pkgsCross.musl32.hostPlatform.system}-static:exe:simplex-chat" = (drv' {
pkgs' = pkgs.pkgsCross.musl32; # pkgs' = pkgs.pkgsCross.musl32;
extra-modules = [{ # extra-modules = [{
# 32 bit patches # # 32 bit patches
packages.basement.patches = [ # packages.basement.patches = [
./scripts/nix/basement-pr-573.patch # ./scripts/nix/basement-pr-573.patch
]; # ];
packages.memory.patches = [ # packages.memory.patches = [
./scripts/nix/memory-pr-99.patch # ./scripts/nix/memory-pr-99.patch
]; # ];
}]; # }];
}).simplex-chat.components.exes.simplex-chat; # }).simplex-chat.components.exes.simplex-chat;
# WINDOWS x86_64-mingwW64 # 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 = [{
packages.direct-sqlcipher.flags.openssl = true; # packages.direct-sqlcipher.flags.openssl = true;
packages.bitvec.flags.simd = false; # packages.bitvec.flags.simd = false;
packages.direct-sqlcipher.patches = [ # packages.direct-sqlcipher.patches = [
./scripts/nix/direct-sqlcipher-2.3.27-win.patch # ./scripts/nix/direct-sqlcipher-2.3.27-win.patch
]; # ];
packages.direct-sqlcipher.components.library.libs = pkgs.lib.mkForce [ # packages.direct-sqlcipher.components.library.libs = pkgs.lib.mkForce [
(pkgs.pkgsCross.mingwW64.openssl) #.override) # { static = true; enableKTLS = false; }) # (pkgs.pkgsCross.mingwW64.openssl) #.override) # { static = true; enableKTLS = false; })
]; # ];
packages.simplexmq.components.library.libs = pkgs.lib.mkForce [ # packages.simplexmq.components.library.libs = pkgs.lib.mkForce [
(pkgs.pkgsCross.mingwW64.openssl) #.override) # { static = true; enableKTLS = false; }) # (pkgs.pkgsCross.mingwW64.openssl) #.override) # { static = true; enableKTLS = false; })
]; # ];
packages.unix-time.postPatch = '' # packages.unix-time.postPatch = ''
sed -i 's/mingwex//g' unix-time.cabal # sed -i 's/mingwex//g' unix-time.cabal
''; # '';
}]; # }];
}).simplex-chat.components.exes.simplex-chat.override { # }).simplex-chat.components.exes.simplex-chat.override {
postInstall = '' # postInstall = ''
set -x # set -x
${pkgs.tree}/bin/tree $out # ${pkgs.tree}/bin/tree $out
mkdir -p $out/_pkg # mkdir -p $out/_pkg
cp $out/bin/* $out/_pkg # cp $out/bin/* $out/_pkg
${pkgs.tree}/bin/tree $out/_pkg # ${pkgs.tree}/bin/tree $out/_pkg
(cd $out/_pkg; ${pkgs.zip}/bin/zip -r -9 $out/${pkgs.pkgsCross.mingwW64.hostPlatform.system}-simplex-chat.zip *) # (cd $out/_pkg; ${pkgs.zip}/bin/zip -r -9 $out/${pkgs.pkgsCross.mingwW64.hostPlatform.system}-simplex-chat.zip *)
rm -fR $out/_pkg # rm -fR $out/_pkg
mkdir -p $out/nix-support # mkdir -p $out/nix-support
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
''; # '';
}; # };
"${pkgs.pkgsCross.mingwW64.hostPlatform.system}:lib:simplex-chat" = (drv' rec { # "${pkgs.pkgsCross.mingwW64.hostPlatform.system}:lib:simplex-chat" = (drv' rec {
pkgs' = pkgs.pkgsCross.mingwW64; # pkgs' = pkgs.pkgsCross.mingwW64;
extra-modules = [{ # extra-modules = [{
packages.direct-sqlcipher.flags.openssl = true; # packages.direct-sqlcipher.flags.openssl = true;
# simd will try to read __cpu_model, which we don't expose # # simd will try to read __cpu_model, which we don't expose
# from the rts (yet!). # # from the rts (yet!).
packages.bitvec.flags.simd = false; # packages.bitvec.flags.simd = false;
packages.direct-sqlcipher.patches = [ # packages.direct-sqlcipher.patches = [
./scripts/nix/direct-sqlcipher-2.3.27-win.patch # ./scripts/nix/direct-sqlcipher-2.3.27-win.patch
]; # ];
packages.direct-sqlcipher.components.library.libs = pkgs.lib.mkForce [ # packages.direct-sqlcipher.components.library.libs = pkgs.lib.mkForce [
pkgs.pkgsCross.mingwW64.openssl # pkgs.pkgsCross.mingwW64.openssl
]; # ];
packages.simplexmq.components.library.libs = pkgs.lib.mkForce [ # packages.simplexmq.components.library.libs = pkgs.lib.mkForce [
pkgs.pkgsCross.mingwW64.openssl # pkgs.pkgsCross.mingwW64.openssl
]; # ];
packages.unix-time.postPatch = '' # packages.unix-time.postPatch = ''
sed -i 's/mingwex//g' unix-time.cabal # sed -i 's/mingwex//g' unix-time.cabal
''; # '';
}]; # }];
}).simplex-chat.components.library # }).simplex-chat.components.library
.override (p: { # .override (p: {
# enableShared = false; # # enableShared = false;
setupBuildFlags = p.component.setupBuildFlags ++ map (x: "--ghc-option=${x}") [ # setupBuildFlags = p.component.setupBuildFlags ++ map (x: "--ghc-option=${x}") [
"-shared" # "-shared"
"-threaded" # "-threaded"
"-o" "libsimplex.dll" # "-o" "libsimplex.dll"
# "-optl-lHSrts_thr" # # "-optl-lHSrts_thr"
"-optl-lffi" # "-optl-lffi"
# "-optl-static-libgcc" # # "-optl-static-libgcc"
# We can't do -optl-static-libstdc++ with gcc. g++ might # # We can't do -optl-static-libstdc++ with gcc. g++ might
# but then we are chaning the compiler altogether. # # but then we are chaning the compiler altogether.
"${./libsimplex.dll.def}" # "${./libsimplex.dll.def}"
]; # ];
postInstall = '' # postInstall = ''
set -x # set -x
function deps() { # function deps() {
${pkgs.binutils}/bin/strings "$1" | grep '.\.dll'|grep -v -E 'Winsock|ADVAPI32|dbghelp|KERNEL32|msvcrt|ntdll|ole32|RPCRT4|SHELL32|USER32|WINMM|WS2_32|kernel32|GDI32'|grep -v "$1" # ${pkgs.binutils}/bin/strings "$1" | grep '.\.dll'|grep -v -E 'Winsock|ADVAPI32|dbghelp|KERNEL32|msvcrt|ntdll|ole32|RPCRT4|SHELL32|USER32|WINMM|WS2_32|kernel32|GDI32'|grep -v "$1"
} # }
${pkgs.tree}/bin/tree $out # ${pkgs.tree}/bin/tree $out
mkdir -p $out/_pkg # mkdir -p $out/_pkg
cp libsimplex.dll $out/_pkg # cp libsimplex.dll $out/_pkg
cp libsimplex.dll.a $out/_pkg # cp libsimplex.dll.a $out/_pkg
mkdir $out/libs # mkdir $out/libs
find ${pkgs.lib.getBin pkgs.pkgsCross.mingwW64.openssl} -name "*.dll" -exec cp {} $out/libs \; # find ${pkgs.lib.getBin pkgs.pkgsCross.mingwW64.openssl} -name "*.dll" -exec cp {} $out/libs \;
find ${pkgs.lib.getBin pkgs.pkgsCross.mingwW64.libffi} -name "*.dll" -exec cp {} $out/libs \; # find ${pkgs.lib.getBin pkgs.pkgsCross.mingwW64.libffi} -name "*.dll" -exec cp {} $out/libs \;
find ${pkgs.lib.getBin pkgs.pkgsCross.mingwW64.gmp} -name "*.dll" -exec cp {} $out/libs \; # find ${pkgs.lib.getBin pkgs.pkgsCross.mingwW64.gmp} -name "*.dll" -exec cp {} $out/libs \;
find ${pkgs.lib.getBin pkgs.pkgsCross.mingwW64.stdenv.cc.cc} -name "*.dll" -exec cp {} $out/libs \; # find ${pkgs.lib.getBin pkgs.pkgsCross.mingwW64.stdenv.cc.cc} -name "*.dll" -exec cp {} $out/libs \;
find ${pkgs.lib.getBin pkgs.pkgsCross.mingwW64.windows.mcfgthreads} -name "*.dll" -exec cp {} $out/libs \; # find ${pkgs.lib.getBin pkgs.pkgsCross.mingwW64.windows.mcfgthreads} -name "*.dll" -exec cp {} $out/libs \;
pushd $out/_pkg # pushd $out/_pkg
function copyDeps() { # function copyDeps() {
for dep in $(deps "$1"); do # for dep in $(deps "$1"); do
if [ ! -f "$dep" ]; then # if [ ! -f "$dep" ]; then
if [ ! -f ../libs/"$dep" ]; then # if [ ! -f ../libs/"$dep" ]; then
echo "WARN: $1 -> $dep not found!" # echo "WARN: $1 -> $dep not found!"
else # else
cp ../libs/"$dep" . # cp ../libs/"$dep" .
copyDeps "$dep" # copyDeps "$dep"
fi # fi
fi # fi
done # done
} # }
copyDeps libsimplex.dll # copyDeps libsimplex.dll
popd # popd
${pkgs.tree}/bin/tree $out/_pkg # ${pkgs.tree}/bin/tree $out/_pkg
(cd $out/_pkg; ${pkgs.zip}/bin/zip -r -9 $out/pkg-${pkgs.pkgsCross.mingwW64.hostPlatform.system}-libsimplex.zip *) # (cd $out/_pkg; ${pkgs.zip}/bin/zip -r -9 $out/pkg-${pkgs.pkgsCross.mingwW64.hostPlatform.system}-libsimplex.zip *)
rm -fR $out/_pkg # rm -fR $out/_pkg
mkdir -p $out/nix-support # mkdir -p $out/nix-support
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
''; # '';
}); # });
# "${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 # 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 (p: { "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)