mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 13:57:10 +03:00
Revert "[WIP] flashtool: 0.9.14.0 -> 0.9.23.3"
This reverts commit 0e5c802120
.
It was pulled accidentially -- this is not ready yet.
This commit is contained in:
parent
29ae5a10fb
commit
5bed7df058
@ -1,6 +1,6 @@
|
|||||||
{ stdenv, requireFile, p7zip, jre, libusb1, platformTools, gtk2, glib, libXtst, swt, makeWrapper, mono }:
|
{ stdenv, requireFile, p7zip, jre, libusb1, platformTools, gtk2, glib, libXtst }:
|
||||||
|
|
||||||
assert stdenv.isLinux;
|
assert stdenv.system == "i686-linux";
|
||||||
|
|
||||||
# TODO:
|
# TODO:
|
||||||
#
|
#
|
||||||
@ -13,49 +13,39 @@ assert stdenv.isLinux;
|
|||||||
# mounted read-only. This doesn't matter, though, because the build
|
# mounted read-only. This doesn't matter, though, because the build
|
||||||
# instructions fix the executable bits already.
|
# instructions fix the executable bits already.
|
||||||
|
|
||||||
let
|
|
||||||
|
|
||||||
CP = "$(ls ./x10flasher_lib/*.jar|xargs|tr ' ' ':')";
|
|
||||||
SWT = "${swt}/jars/swt.jar";
|
|
||||||
|
|
||||||
ARCH = if stdenv.system == "i686-linux" then "32" else "64";
|
|
||||||
|
|
||||||
in
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "flashtool";
|
name = "flashtool-0.9.14.0";
|
||||||
version = "0.9.22.3";
|
|
||||||
|
|
||||||
src = requireFile {
|
src = requireFile {
|
||||||
url = "http://uploaded.net/file/fyc683jo";
|
url = "http://dfiles.eu/files/n8c1c3pgc";
|
||||||
name = "${name}-${version}-linux.tar.7z";
|
name = "flashtool-0.9.14.0-linux.tar.7z";
|
||||||
sha256 = "00sncfxi32y745cjf2zhaazs9p6zhpwqcrm91byja7d7pksf29ca";
|
sha256 = "0mfjdjj7clz2dhkg7lzy1m8hk8ngla7zgcryf51aki1gnpbb2zc1";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ p7zip jre swt makeWrapper mono ];
|
buildInputs = [ p7zip jre ];
|
||||||
|
|
||||||
unpackPhase = ''
|
unpackPhase = ''
|
||||||
7z e ${src}
|
7z e ${src}
|
||||||
tar xf ${name}-${version}-linux.tar
|
tar xf ${name}-linux.tar
|
||||||
sourceRoot=FlashTool
|
sourceRoot=FlashTool
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
rm x10flasher_lib/adb.linux.${ARCH}
|
ln -s ${platformTools}/platform-tools/adb x10flasher_lib/adb.linux
|
||||||
rm x10flasher_lib/fastboot.linux.${ARCH}
|
ln -s ${platformTools}/platform-tools/fastboot x10flasher_lib/fastboot.linux
|
||||||
ln -s ${platformTools}/platform-tools/adb x10flasher_lib/adb.linux.${ARCH}
|
ln -s ${libusb1.out}/lib/libusb-1.0.so.0 ./x10flasher_lib/linux/lib32/libusbx-1.0.so
|
||||||
ln -s ${platformTools}/platform-tools/fastboot x10flasher_lib/fastboot.linux.${ARCH}
|
|
||||||
|
|
||||||
ln -s ${libusb1.out}/lib/libusb-1.0.so.0 ./x10flasher_lib/linux/lib${ARCH}/libusbx-1.0.so
|
chmod +x x10flasher_lib/unyaffs.linux.x86 x10flasher_lib/bin2elf x10flasher_lib/bin2sin
|
||||||
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" x10flasher_lib/unyaffs.linux.x86
|
||||||
|
ln -sf unyaffs.linux.x86 x10flasher_lib/unyaffs.linux
|
||||||
|
|
||||||
rm FlashTool
|
ln -s swt32.jar x10flasher_lib/swtlin/swt.jar
|
||||||
makeWrapper ${jre}/bin/java $out/FlashTool \
|
|
||||||
--set JAVA_HOME "${jre}" \
|
sed -i \
|
||||||
--set PATH "$out:$PATH" \
|
-e 's|$(uname -m)|i686|' \
|
||||||
--set LD_LIBRARY_PATH "${libXtst}/lib:${glib}/lib:${gtk2}/lib:${libusb1}/lib:${swt}/lib:x10flasher_lib/linux/lib${ARCH}:\$LD_LIBRARY_PATH" \
|
-e 's|export JAVA_HOME=.*|export JAVA_HOME=${jre}|' \
|
||||||
--add-flags "-classpath $out/x10flasher.jar:${CP}:${SWT} -Xms128m -Xmx512m -Duser.country=US -Duser.language=en -Djsse.enableSNIExtension=false gui.Main"
|
-e 's|export LD_LIBRARY_PATH=.*|export LD_LIBRARY_PATH=${libXtst}/lib:${glib}/lib:${gtk2}/lib:./x10flasher_lib/linux/lib32|' \
|
||||||
sed -i -e 's|Main.*$|Main|' $out/FlashTool
|
FlashTool FlashToolConsole
|
||||||
sed -i -e 's|./x10flasher_lib|$out/x10flasher_lib|' $out/FlashTool
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
@ -1529,7 +1529,7 @@ in
|
|||||||
|
|
||||||
flamerobin = callPackage ../applications/misc/flamerobin { };
|
flamerobin = callPackage ../applications/misc/flamerobin { };
|
||||||
|
|
||||||
flashtool = callPackage ../development/mobile/flashtool {
|
flashtool = callPackage_i686 ../development/mobile/flashtool {
|
||||||
platformTools = androidenv.platformTools;
|
platformTools = androidenv.platformTools;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user