From 27f8b6b89e431ba7c1c98231ff297022d928e2ef Mon Sep 17 00:00:00 2001 From: Sander van der Burg Date: Sat, 17 Nov 2018 23:13:44 +0100 Subject: Replace titaniumenv with new implementation --- pkgs/development/mobile/titaniumenv/build-app.nix | 311 ++++++++++----------- pkgs/development/mobile/titaniumenv/default.nix | 24 +- .../mobile/titaniumenv/examples/default.nix | 91 ------ .../examples/emulate-kitchensink/default.nix | 10 - .../titaniumenv/examples/kitchensink/default.nix | 44 --- .../examples/kitchensink/generatekeystore.sh | 10 - .../titaniumenv/examples/kitchensink/keystore | Bin 1315 -> 0 bytes .../examples/simulate-kitchensink/default.nix | 7 - .../mobile/titaniumenv/titaniumsdk-6.3.nix | 43 --- .../mobile/titaniumenv/titaniumsdk-7.1.nix | 12 +- pkgs/top-level/all-packages.nix | 4 +- 11 files changed, 163 insertions(+), 393 deletions(-) delete mode 100644 pkgs/development/mobile/titaniumenv/examples/default.nix delete mode 100644 pkgs/development/mobile/titaniumenv/examples/emulate-kitchensink/default.nix delete mode 100644 pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix delete mode 100755 pkgs/development/mobile/titaniumenv/examples/kitchensink/generatekeystore.sh delete mode 100644 pkgs/development/mobile/titaniumenv/examples/kitchensink/keystore delete mode 100644 pkgs/development/mobile/titaniumenv/examples/simulate-kitchensink/default.nix delete mode 100644 pkgs/development/mobile/titaniumenv/titaniumsdk-6.3.nix diff --git a/pkgs/development/mobile/titaniumenv/build-app.nix b/pkgs/development/mobile/titaniumenv/build-app.nix index 0250e5bf2e28..472f85fbc453 100644 --- a/pkgs/development/mobile/titaniumenv/build-app.nix +++ b/pkgs/development/mobile/titaniumenv/build-app.nix @@ -1,200 +1,181 @@ -{stdenv, androidsdk, titaniumsdk, titanium, alloy, xcodewrapper, jdk, python, nodejs, which, file, xcodeBaseDir}: -{ name, src, preBuild ? "", target, androidPlatformVersions ? [ "25" ], androidAbiVersions ? [ "armeabi" "armeabi-v7a" ], tiVersion ? null +{stdenv, composeAndroidPackages, composeXcodeWrapper, titaniumsdk, titanium, alloy, jdk, python, nodejs, which, file}: +{ name, src, preBuild ? "", target, tiVersion ? null , release ? false, androidKeyStore ? null, androidKeyAlias ? null, androidKeyStorePassword ? null -, iosMobileProvisioningProfile ? null, iosCertificateName ? null, iosCertificate ? null, iosCertificatePassword ? null, iosVersion ? "11.2" -, enableWirelessDistribution ? false, iosBuildStore ? false, installURL ? null -}: +, iosMobileProvisioningProfile ? null, iosCertificateName ? null, iosCertificate ? null, iosCertificatePassword ? null, iosVersion ? "11.3", iosBuildStore ? false +, enableWirelessDistribution ? false, installURL ? null +, xcodeBaseDir ? "/Applications/Xcode.app" +, androidsdkArgs ? {} +, xcodewrapperArgs ? {} +, ... +}@args: assert (release && target == "android") -> androidKeyStore != null && androidKeyAlias != null && androidKeyStorePassword != null; assert (release && target == "iphone") -> iosMobileProvisioningProfile != null && iosCertificateName != null && iosCertificate != null && iosCertificatePassword != null; assert enableWirelessDistribution -> installURL != null; let - androidsdkComposition = androidsdk { - platformVersions = androidPlatformVersions; - abiVersions = androidAbiVersions; - useGoogleAPIs = true; - }; + realAndroidsdkArgs = { + platformVersions = [ "26" ]; + } // androidsdkArgs; + + androidsdk = (composeAndroidPackages realAndroidsdkArgs).androidsdk; + + realXcodewrapperArgs = { + inherit xcodeBaseDir; + } // xcodewrapperArgs; + + xcodewrapper = composeXcodeWrapper xcodewrapperArgs; deleteKeychain = '' - security default-keychain -s login.keychain - security delete-keychain $keychainName - rm -f $HOME/lock-keychain + if [ -f $HOME/lock-keychain ] + then + security default-keychain -s login.keychain + security delete-keychain $keychainName + rm -f $HOME/lock-keychain + fi ''; + + extraArgs = removeAttrs args [ "name" "preRebuild" "androidsdkArgs" "xcodewrapperArgs" ]; in -stdenv.mkDerivation { +stdenv.mkDerivation ({ name = stdenv.lib.replaceChars [" "] [""] name; - inherit src; - buildInputs = [ nodejs titanium alloy jdk python which file ] ++ stdenv.lib.optional (stdenv.hostPlatform.system == "x86_64-darwin") xcodewrapper; - + buildInputs = [ nodejs titanium alloy python which file jdk ] + ++ stdenv.lib.optional (target == "iphone") xcodewrapper; + buildPhase = '' ${preBuild} - export HOME=$TMPDIR - + export HOME=${if target == "iphone" then "/Users/$(whoami)" else "$TMPDIR"} + ${stdenv.lib.optionalString (tiVersion != null) '' # Replace titanium version by the provided one sed -i -e "s|[0-9a-zA-Z\.]*|${tiVersion}|" tiapp.xml ''} - + # Simulate a login mkdir -p $HOME/.titanium cat > $HOME/.titanium/auth_session.json < $TMPDIR/config.json titanium --config-file $TMPDIR/config.json --no-colors config sdk.defaultInstallLocation ${titaniumsdk} titanium --config-file $TMPDIR/config.json --no-colors config paths.modules ${titaniumsdk} - + mkdir -p $out - - ${if target == "android" then - '' - titanium config --config-file $TMPDIR/config.json --no-colors android.sdkPath ${androidsdkComposition}/libexec - - export PATH=$(echo ${androidsdkComposition}/libexec/tools):$(echo ${androidsdkComposition}/libexec/build-tools/android-*):$PATH - export GRADLE_USER_HOME=$TMPDIR/gradle - - ${if release then - '' - ${stdenv.lib.optionalString stdenv.isDarwin '' - # Signing the app does not work with OpenJDK on macOS, use host SDK instead - export JAVA_HOME="$(/usr/libexec/java_home -v 1.8)" - ''} - titanium build --config-file $TMPDIR/config.json --no-colors --force --platform android --target dist-playstore --keystore ${androidKeyStore} --alias ${androidKeyAlias} --store-password ${androidKeyStorePassword} --output-dir $out - '' - else - ''titanium build --config-file $TMPDIR/config.json --no-colors --force --platform android --target emulator --build-only -B foo --output $out''} - '' - else if target == "iphone" then - '' - ${if release then - '' - export HOME=/Users/$(whoami) - export keychainName=$(basename $out) - - # Create a keychain with the component hash name (should always be unique) - security create-keychain -p "" $keychainName - security default-keychain -s $keychainName - security unlock-keychain -p "" $keychainName - security import ${iosCertificate} -k $keychainName -P "${iosCertificatePassword}" -A - security set-key-partition-list -S apple-tool:,apple: -s -k "" $keychainName - provisioningId=$(grep UUID -A1 -a ${iosMobileProvisioningProfile} | grep -o "[-A-Za-z0-9]\{36\}") - - # Ensure that the requested provisioning profile can be found - - if [ ! -f "$HOME/Library/MobileDevice/Provisioning Profiles/$provisioningId.mobileprovision" ] - then - mkdir -p "$HOME/Library/MobileDevice/Provisioning Profiles" - cp ${iosMobileProvisioningProfile} "$HOME/Library/MobileDevice/Provisioning Profiles/$provisioningId.mobileprovision" - fi - - # Simulate a login - mkdir -p $HOME/.titanium - cat > $HOME/.titanium/auth_session.json < $out/nix-support/hydra-build-products - - ${stdenv.lib.optionalString enableWirelessDistribution '' - appname=$(basename $out/*.ipa .ipa) - bundleId=$(grep '[a-zA-Z0-9.]*' tiapp.xml | sed -e 's|||' -e 's|||' -e 's/ //g') - version=$(grep '[a-zA-Z0-9.]*' tiapp.xml | sed -e 's|||' -e 's|||' -e 's/ //g') - - sed -e "s|@INSTALL_URL@|${installURL}?bundleId=$bundleId\&version=$version\&title=$appname|" ${../xcodeenv/install.html.template} > "$out/$appname.html" - echo "doc install \"$out/$appname.html\"" >> $out/nix-support/hydra-build-products - ''} - '' - else if target == "iphone" then "" - else throw "Target: ${target} is not supported!"} - ${if target == "android" then '' + ${if release then "" + else '' + cp "$(ls build/android/bin/*.apk | grep -v '\-unsigned.apk')" $out + ''} + + mkdir -p $out/nix-support + echo "file binary-dist \"$(ls $out/*.apk)\"" > $out/nix-support/hydra-build-products + '' + else if target == "iphone" then + if release then '' mkdir -p $out/nix-support - echo "file binary-dist \"$(ls $out/*.apk)\"" > $out/nix-support/hydra-build-products - '' else ""} + echo "file binary-dist \"$(echo $out/*.ipa)\"" > $out/nix-support/hydra-build-products + + ${stdenv.lib.optionalString enableWirelessDistribution '' + appname="$(basename "$out/*.ipa" .ipa)" + bundleId=$(grep '[a-zA-Z0-9.]*' tiapp.xml | sed -e 's|||' -e 's|||' -e 's/ //g') + version=$(grep '[a-zA-Z0-9.]*' tiapp.xml | sed -e 's|||' -e 's|||' -e 's/ //g') + + sed -e "s|@INSTALL_URL@|${installURL}?bundleId=$bundleId\&version=$version\&title=$appname|" ${../xcodeenv/install.html.template} > "$out/$appname.html" + echo "doc install \"$out/$appname.html\"" >> $out/nix-support/hydra-build-products + ''} + '' + else "" + else throw "Target: ${target} is not supported!"} ''; - + failureHook = stdenv.lib.optionalString (release && target == "iphone") deleteKeychain; -} +} // extraArgs) diff --git a/pkgs/development/mobile/titaniumenv/default.nix b/pkgs/development/mobile/titaniumenv/default.nix index f411a8d61fd0..e9f6344680b7 100644 --- a/pkgs/development/mobile/titaniumenv/default.nix +++ b/pkgs/development/mobile/titaniumenv/default.nix @@ -1,27 +1,19 @@ -{pkgs, xcodeVersion ? "9.2", xcodeBaseDir ? "/Applications/Xcode.app", tiVersion ? "7.1.0.GA"}: +{pkgs, pkgs_i686, androidenv, xcodeenv, tiVersion ? "7.1.0.GA"}: rec { - androidenv = pkgs.androidenv; - - xcodeenv = if pkgs.stdenv.hostPlatform.system == "x86_64-darwin" then pkgs.xcodeenv.override { - version = xcodeVersion; - inherit xcodeBaseDir; - } else null; - titaniumsdk = let - titaniumSdkFile = if tiVersion == "6.3.1.GA" then ./titaniumsdk-6.3.nix - else if tiVersion == "7.1.0.GA" then ./titaniumsdk-7.1.nix + titaniumSdkFile = if tiVersion == "7.1.0.GA" then ./titaniumsdk-7.1.nix else throw "Titanium version not supported: "+tiVersion; in import titaniumSdkFile { - inherit (pkgs) stdenv fetchurl unzip makeWrapper python jdk; + inherit (pkgs) stdenv fetchurl unzip makeWrapper; }; - + buildApp = import ./build-app.nix { inherit (pkgs) stdenv python which file jdk nodejs; - inherit (pkgs.nodePackages_6_x) alloy titanium; - inherit (androidenv) androidsdk; - inherit (xcodeenv) xcodewrapper; - inherit titaniumsdk xcodeBaseDir; + inherit (pkgs.nodePackages_8_x) alloy titanium; + inherit (androidenv) composeAndroidPackages; + inherit (xcodeenv) composeXcodeWrapper; + inherit titaniumsdk; }; } diff --git a/pkgs/development/mobile/titaniumenv/examples/default.nix b/pkgs/development/mobile/titaniumenv/examples/default.nix deleted file mode 100644 index 78f91dd39fb8..000000000000 --- a/pkgs/development/mobile/titaniumenv/examples/default.nix +++ /dev/null @@ -1,91 +0,0 @@ -{ nixpkgs ? -, systems ? [ "x86_64-linux" "x86_64-darwin" ] -, xcodeVersion ? "9.2" -, xcodeBaseDir ? "/Applications/Xcode.app" -, tiVersion ? "7.1.0.GA" -, rename ? false -, newBundleId ? "com.example.kitchensink", iosMobileProvisioningProfile ? null, iosCertificate ? null, iosCertificateName ? "Example", iosCertificatePassword ? "", iosVersion ? "11.2" -, enableWirelessDistribution ? false, installURL ? null -}: - -let - pkgs = import nixpkgs {}; -in -rec { - kitchensink_android_debug = pkgs.lib.genAttrs systems (system: - let - pkgs = import nixpkgs { inherit system; }; - in - import ./kitchensink { - inherit (pkgs) fetchgit; - titaniumenv = pkgs.titaniumenv.override { inherit xcodeVersion xcodeBaseDir tiVersion; }; - inherit tiVersion; - target = "android"; - }); - - kitchensink_android_release = pkgs.lib.genAttrs systems (system: - let - pkgs = import nixpkgs { inherit system; }; - in - import ./kitchensink { - inherit (pkgs) fetchgit; - titaniumenv = pkgs.titaniumenv.override { inherit xcodeVersion xcodeBaseDir tiVersion; }; - inherit tiVersion; - target = "android"; - release = true; - }); - - emulate_kitchensink_debug = pkgs.lib.genAttrs systems (system: - let - pkgs = import nixpkgs { inherit system; }; - in - import ./emulate-kitchensink { - inherit (pkgs) androidenv; - kitchensink = builtins.getAttr system kitchensink_android_debug; - }); - - emulate_kitchensink_release = pkgs.lib.genAttrs systems (system: - let - pkgs = import nixpkgs { inherit system; }; - in - import ./emulate-kitchensink { - inherit (pkgs) androidenv; - kitchensink = builtins.getAttr system kitchensink_android_release; - }); - -} // (if builtins.elem "x86_64-darwin" systems then - let - pkgs = import nixpkgs { system = "x86_64-darwin"; }; - in - rec { - kitchensink_ios_development = import ./kitchensink { - inherit (pkgs) fetchgit; - titaniumenv = pkgs.titaniumenv.override { inherit xcodeVersion xcodeBaseDir tiVersion; }; - inherit tiVersion iosVersion; - target = "iphone"; - }; - - simulate_kitchensink = import ./simulate-kitchensink { - inherit (pkgs) stdenv; - xcodeenv = pkgs.xcodeenv.override { version = xcodeVersion; inherit xcodeBaseDir; }; - kitchensink = kitchensink_ios_development; - bundleId = if rename then newBundleId else "com.appcelerator.kitchensink"; - }; -} else {}) // (if rename then - let - pkgs = import nixpkgs { system = "x86_64-darwin"; }; - in - { - kitchensink_ipa = import ./kitchensink { - inherit (pkgs) stdenv fetchgit; - titaniumenv = pkgs.titaniumenv.override { inherit xcodeVersion xcodeBaseDir tiVersion; }; - target = "iphone"; - inherit tiVersion; - release = true; - rename = true; - inherit newBundleId iosMobileProvisioningProfile iosCertificate iosCertificateName iosCertificatePassword iosVersion; - inherit enableWirelessDistribution installURL; - }; - } - -else {}) diff --git a/pkgs/development/mobile/titaniumenv/examples/emulate-kitchensink/default.nix b/pkgs/development/mobile/titaniumenv/examples/emulate-kitchensink/default.nix deleted file mode 100644 index cad4503dc96e..000000000000 --- a/pkgs/development/mobile/titaniumenv/examples/emulate-kitchensink/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{androidenv, kitchensink}: - -androidenv.emulateApp { - name = "emulate-${kitchensink.name}"; - app = kitchensink; - platformVersion = "16"; - useGoogleAPIs = true; - package = "com.appcelerator.kitchensink"; - activity = ".KitchensinkActivity"; -} diff --git a/pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix b/pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix deleted file mode 100644 index 70ab1b168c42..000000000000 --- a/pkgs/development/mobile/titaniumenv/examples/kitchensink/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ titaniumenv, fetchgit, target, androidPlatformVersions ? [ "25" "26" ], tiVersion ? "7.1.0.GA", release ? false -, rename ? false, stdenv ? null, newBundleId ? null, iosMobileProvisioningProfile ? null, iosCertificate ? null, iosCertificateName ? null, iosCertificatePassword ? null, iosVersion ? "11.2" -, enableWirelessDistribution ? false, installURL ? null -}: - -assert rename -> (stdenv != null && newBundleId != null && iosMobileProvisioningProfile != null && iosCertificate != null && iosCertificateName != null && iosCertificatePassword != null); - -let - src = fetchgit { - url = https://github.com/appcelerator/kitchensink-v2.git; - rev = "94364df2ef60a80bd354a4273e3cb5f4c5185537"; - sha256 = "0q4gzidpsq401frkngy4yk5kqvm8dz00ls74bw3fnpvg4714d6gf"; - }; - - # Rename the bundle id to something else - renamedSrc = stdenv.mkDerivation { - name = "KitchenSink-renamedsrc"; - inherit src; - buildPhase = '' - sed -i -e "s|com.appcelerator.kitchensink|${newBundleId}|" tiapp.xml - ''; - installPhase = '' - mkdir -p $out - mv * $out - ''; - }; -in -titaniumenv.buildApp { - name = "KitchenSink-${target}-${if release then "release" else "debug"}"; - src = if rename then renamedSrc else src; - preBuild = '' - sed -i -e "s|23|25|" tiapp.xml - ''; # Raise minimum android SDK from 23 to 25 - inherit tiVersion; - - inherit target androidPlatformVersions release; - - androidKeyStore = ./keystore; - androidKeyAlias = "myfirstapp"; - androidKeyStorePassword = "mykeystore"; - - inherit iosMobileProvisioningProfile iosCertificate iosCertificateName iosCertificatePassword iosVersion; - inherit enableWirelessDistribution installURL; -} diff --git a/pkgs/development/mobile/titaniumenv/examples/kitchensink/generatekeystore.sh b/pkgs/development/mobile/titaniumenv/examples/kitchensink/generatekeystore.sh deleted file mode 100755 index 57451e8a5075..000000000000 --- a/pkgs/development/mobile/titaniumenv/examples/kitchensink/generatekeystore.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -e - -( echo "John Doe" - echo "My Company" - echo "My Organization" - echo "My City" - echo "My State" - echo "US" - echo "yes" -) | keytool --genkeypair --alias myfirstapp --keystore ./keystore --storepass mykeystore diff --git a/pkgs/development/mobile/titaniumenv/examples/kitchensink/keystore b/pkgs/development/mobile/titaniumenv/examples/kitchensink/keystore deleted file mode 100644 index ee0a9c7989ba..000000000000 Binary files a/pkgs/development/mobile/titaniumenv/examples/kitchensink/keystore and /dev/null differ diff --git a/pkgs/development/mobile/titaniumenv/examples/simulate-kitchensink/default.nix b/pkgs/development/mobile/titaniumenv/examples/simulate-kitchensink/default.nix deleted file mode 100644 index bbd94cb7882a..000000000000 --- a/pkgs/development/mobile/titaniumenv/examples/simulate-kitchensink/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{xcodeenv, kitchensink, bundleId}: - -xcodeenv.simulateApp { - name = "simulate-${kitchensink.name}"; - inherit bundleId; - app = "${kitchensink}/build/iphone/build/Products/Debug-iphonesimulator"; -} diff --git a/pkgs/development/mobile/titaniumenv/titaniumsdk-6.3.nix b/pkgs/development/mobile/titaniumenv/titaniumsdk-6.3.nix deleted file mode 100644 index b8c2688708bb..000000000000 --- a/pkgs/development/mobile/titaniumenv/titaniumsdk-6.3.nix +++ /dev/null @@ -1,43 +0,0 @@ -{stdenv, fetchurl, unzip, makeWrapper}: - -stdenv.mkDerivation { - name = "mobilesdk-6.3.1.GA"; - src = if (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") then fetchurl { - url = http://builds.appcelerator.com/mobile/6_3_X/mobilesdk-6.3.1.v20171101154403-linux.zip; - sha256 = "0g8dqqf5ffa7ll3rqm5naywipnv2vvfxcj9fmqg1wnvvxf0rflqj"; - } - else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchurl { - url = http://builds.appcelerator.com/mobile/6_3_X/mobilesdk-6.3.1.v20171101154403-osx.zip; - sha256 = "00bm8vv70mg4kd7jvmxd1bfqafv6zdpdx816i0hvf801zwnak4nj"; - } - else throw "Platform: ${stdenv.hostPlatform.system} not supported!"; - - buildInputs = [ unzip makeWrapper ]; - - buildCommand = '' - mkdir -p $out - cd $out - (yes y | unzip $src) || true - - # Rename ugly version number - cd mobilesdk/* - mv * 6.3.1.GA - cd * - ${stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-darwin") '' - # Fixes a bad archive copying error when generating an IPA file - sed -i -e "s|cp -rf|/bin/cp -rf|" iphone/cli/commands/_build.js - ''} - - # Patch some executables - - ${if stdenv.hostPlatform.system == "i686-linux" then - '' - patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 android/titanium_prep.linux32 - '' - else if stdenv.hostPlatform.system == "x86_64-linux" then - '' - patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 android/titanium_prep.linux64 - '' - else ""} - ''; -} diff --git a/pkgs/development/mobile/titaniumenv/titaniumsdk-7.1.nix b/pkgs/development/mobile/titaniumenv/titaniumsdk-7.1.nix index 4d3bd420969c..13abc18f76ec 100644 --- a/pkgs/development/mobile/titaniumenv/titaniumsdk-7.1.nix +++ b/pkgs/development/mobile/titaniumenv/titaniumsdk-7.1.nix @@ -35,7 +35,7 @@ let sha256 = "11nwdb9y84cghcx319nsjjf9m035s4s1184zrhzpvaxq2wvqhbhx"; }; - # Put the download plugins in a fake Maven repository + # Put the downloaded plugins in a fake Maven repository fakeMavenRepo = stdenv.mkDerivation { name = "fake-maven-repo"; buildCommand = '' @@ -54,15 +54,15 @@ let in stdenv.mkDerivation { name = "mobilesdk-7.1.0.GA"; - src = if (stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux") then fetchurl { + src = if (stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux") then fetchurl { url = http://builds.appcelerator.com/mobile/7_1_X/mobilesdk-7.1.0.v20180314133955-linux.zip; sha256 = "18b3jnr65sdn5wj191bcl48gvhyklxmighxakv4vrz1fb59kyvqn"; } - else if stdenv.hostPlatform.system == "x86_64-darwin" then fetchurl { + else if stdenv.system == "x86_64-darwin" then fetchurl { url = http://builds.appcelerator.com/mobile/7_1_X/mobilesdk-7.1.0.v20180314133955-osx.zip; sha256 = "1f62616biwsw1fqxz2sq7lpa6bsfjazffliplyf5dpnh298cnc1m"; } - else throw "Platform: ${stdenv.hostPlatform.system} not supported!"; + else throw "Platform: ${stdenv.system} not supported!"; buildInputs = [ unzip makeWrapper ]; @@ -89,11 +89,11 @@ stdenv.mkDerivation { # Patch some executables - ${if stdenv.hostPlatform.system == "i686-linux" then + ${if stdenv.system == "i686-linux" then '' patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 android/titanium_prep.linux32 '' - else if stdenv.hostPlatform.system == "x86_64-linux" then + else if stdenv.system == "x86_64-linux" then '' patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 android/titanium_prep.linux64 '' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 50f7aa507781..69446ff6ea7b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -815,7 +815,9 @@ in ssh-agents = callPackage ../tools/networking/ssh-agents { }; - titaniumenv = callPackage ../development/mobile/titaniumenv { }; + titaniumenv = callPackage ../development/mobile/titaniumenv { + pkgs_i686 = pkgsi686Linux; + }; abootimg = callPackage ../development/mobile/abootimg {}; -- cgit 1.4.1