mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-08 19:46:07 +01:00
pkgs/cross-compiling/talloc-static: update, build differently
This commit is contained in:
parent
b286ac1aac
commit
0de95f9e9f
2 changed files with 32 additions and 18 deletions
|
|
@ -82,7 +82,7 @@ in
|
||||||
environment.files = {
|
environment.files = {
|
||||||
inherit login loginInner;
|
inherit login loginInner;
|
||||||
|
|
||||||
prootStatic = "/nix/store/r8jasn8fdiwvp26b1bxia0r6nhp4cqfx-proot-termux-aarch64-unknown-linux-android-unstable-2022-05-03";
|
prootStatic = "/nix/store/scj2cqyvcra7dcan4y73n0459ac7fms7-proot-termux-aarch64-unknown-linux-android-unstable-2022-05-03";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,26 @@
|
||||||
# Copyright (c) 2019-2021, see AUTHORS. Licensed under MIT License, see LICENSE.
|
# Copyright (c) 2019-2022, see AUTHORS. Licensed under MIT License, see LICENSE.
|
||||||
|
|
||||||
{ callPackage, python3, wafHook }:
|
{ callPackage
|
||||||
|
, fetchurl
|
||||||
|
, python3
|
||||||
|
, pkg-config
|
||||||
|
, wafHook
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
pkgsCross = callPackage ./cross-pkgs.nix { };
|
pkgsCross = callPackage ./cross-pkgs.nix { };
|
||||||
in
|
in
|
||||||
|
|
||||||
pkgsCross.talloc.overrideAttrs (_: rec {
|
pkgsCross.stdenv.mkDerivation rec {
|
||||||
pname = "talloc-static";
|
pname = "talloc";
|
||||||
version = "2.3.2";
|
version = "2.3.4";
|
||||||
name = "${pname}-${version}";
|
|
||||||
|
|
||||||
nativeBuildInputs = [ python3 wafHook ];
|
src = fetchurl {
|
||||||
|
url = "mirror://samba/talloc/${pname}-${version}.tar.gz";
|
||||||
|
sha256 = "sha256-F5+eviZeZ+SrLCbK0rfeS2p3xsIS+WaQM4KGnwa+ZQU=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ pkg-config python3 wafHook ];
|
||||||
buildInputs = [];
|
buildInputs = [];
|
||||||
|
|
||||||
wafPath = "./buildtools/bin/waf";
|
wafPath = "./buildtools/bin/waf";
|
||||||
|
|
@ -22,12 +31,8 @@ pkgsCross.talloc.overrideAttrs (_: rec {
|
||||||
"--cross-answers=cross-answers.txt"
|
"--cross-answers=cross-answers.txt"
|
||||||
];
|
];
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
${pkgsCross.stdenv.cc.targetPrefix}ar q $out/lib/libtalloc.a bin/default/talloc.c.[0-9]*.o
|
|
||||||
rm -f $out/lib/libtalloc.so*
|
|
||||||
'';
|
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
|
export PYTHONHASHSEED=1
|
||||||
cat <<EOF > cross-answers.txt
|
cat <<EOF > cross-answers.txt
|
||||||
Checking uname sysname type: "Linux"
|
Checking uname sysname type: "Linux"
|
||||||
Checking uname machine type: "dontcare"
|
Checking uname machine type: "dontcare"
|
||||||
|
|
@ -56,4 +61,13 @@ pkgsCross.talloc.overrideAttrs (_: rec {
|
||||||
Checking getconf large file support flags work: OK
|
Checking getconf large file support flags work: OK
|
||||||
EOF
|
EOF
|
||||||
'';
|
'';
|
||||||
})
|
|
||||||
|
# can't link unneeded .so, we'll link a static one by hand
|
||||||
|
buildPhase = "python ./buildtools/bin/waf build || true";
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/lib $out/include
|
||||||
|
${pkgsCross.stdenv.cc.targetPrefix}ar q $out/lib/libtalloc.a \
|
||||||
|
bin/default/talloc.c.[0-9]*.o
|
||||||
|
cp talloc.h $out/include/
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue