pkgs: update proot and talloc

This commit is contained in:
Alexander Sosedkin 2020-11-03 05:45:48 +07:00
parent af8d9623e0
commit 239381d4f1
3 changed files with 22 additions and 36 deletions

View file

@ -8,13 +8,13 @@ in
pkgs.crossStatic.stdenv.mkDerivation {
pname = "proot-termux";
version = "unstable-2020-04-25";
version = "unstable-2020-10-25";
src = fetchFromGitHub {
repo = "proot";
owner = "termux";
rev = "b9588b1edff5069118c50f2f9b19397fce39f5c7";
sha256 = "0izs2vqbn7zaa0fxwr78p1kaa4f3k9rhv4g94zsmw38cqlmidv56";
rev = "66b34c6fb38983b09da3400b8bcf86005ebe8dd1";
sha256 = "0isrjcblkdkikw6l6f7a2p326vsy3plbs9ga48r20lpa8rsz4jnf";
};
buildInputs = [ tallocStatic ];

View file

@ -1,46 +1,32 @@
# Copyright (c) 2019-2020, see AUTHORS. Licensed under MIT License, see LICENSE.
{ callPackage, fetchurl, python2, zlib }:
{ callPackage, fetchurl, python3, wafHook }:
let
pkgs = callPackage ./pkgs.nix { };
in
pkgs.cross.stdenv.mkDerivation rec {
name = "talloc-static-2.1.14";
pkgs.cross.talloc.overrideAttrs (old: rec {
pname = "talloc-static";
version = "2.1.14";
name = "${pname}-${version}";
src = fetchurl {
url = "mirror://samba/talloc/${name}.tar.gz";
sha256 = "1kk76dyav41ip7ddbbf04yfydb4jvywzi2ps0z2vla56aqkn11di";
};
nativeBuildInputs = [ python3 wafHook ];
buildInputs = [];
depsBuildBuild = [ python2 zlib ];
wafPath = "./buildtools/bin/waf";
wafConfigureFlags = [
"--disable-rpath"
"--disable-python"
"--cross-compile"
"--cross-answers=cross-answers.txt"
];
buildDeps = [ pkgs.cross.zlib ];
configurePhase = ''
substituteInPlace buildtools/bin/waf \
--replace "/usr/bin/env python" "${python2}/bin/python"
./configure --prefix=$out \
--disable-rpath \
--disable-python \
--cross-compile \
--cross-answers=cross-answers.txt
'';
buildPhase = ''
make
'';
installPhase = ''
mkdir -p $out/lib
make install
${pkgs.cross.stdenv.cc.targetPrefix}ar q $out/lib/libtalloc.a bin/default/talloc_[0-9]*.o
postInstall = ''
${pkgs.cross.stdenv.cc.targetPrefix}ar q $out/lib/libtalloc.a bin/default/talloc.c.[0-9]*.o
rm -f $out/lib/libtalloc.so*
'';
fixupPhase = "";
prePatch = ''
cat <<EOF > cross-answers.txt
Checking uname sysname type: "Linux"
@ -70,4 +56,4 @@ pkgs.cross.stdenv.mkDerivation rec {
Checking getconf large file support flags work: OK
EOF
'';
}
})