diff options
Diffstat (limited to 'pkgs/development/mobile')
15 files changed, 270 insertions, 62 deletions
diff --git a/pkgs/development/mobile/androidenv/.gitignore b/pkgs/development/mobile/androidenv/.gitignore index c15750760a44d..2a297b88cdebc 100644 --- a/pkgs/development/mobile/androidenv/.gitignore +++ b/pkgs/development/mobile/androidenv/.gitignore @@ -1,2 +1,3 @@ /xml local.properties +.android diff --git a/pkgs/development/mobile/androidenv/compose-android-packages.nix b/pkgs/development/mobile/androidenv/compose-android-packages.nix index 75f393b3f9e20..8c24b10093be0 100644 --- a/pkgs/development/mobile/androidenv/compose-android-packages.nix +++ b/pkgs/development/mobile/androidenv/compose-android-packages.nix @@ -185,20 +185,38 @@ rec { system-images = lib.flatten (map (apiVersion: map (type: - map (abiVersion: - if lib.hasAttrByPath [apiVersion type abiVersion] system-images-packages then - deployAndroidPackage { - inherit os; - package = system-images-packages.${apiVersion}.${type}.${abiVersion}; - # Patch 'google_apis' system images so they're recognized by the sdk. - # Without this, `android list targets` shows 'Tag/ABIs : no ABIs' instead - # of 'Tag/ABIs : google_apis*/*' and the emulator fails with an ABI-related error. - patchInstructions = lib.optionalString (lib.hasPrefix "google_apis" type) '' + # Deploy all system images with the same systemImageType in one derivation to avoid the `null` problem below + # with avdmanager when trying to create an avd! + # + # ``` + # $ yes "" | avdmanager create avd --force --name testAVD --package 'system-images;android-33;google_apis;x86_64' + # Error: Package path is not valid. Valid system image paths are: + # null + # ``` + let + availablePackages = map (abiVersion: + system-images-packages.${apiVersion}.${type}.${abiVersion} + ) (builtins.filter (abiVersion: + lib.hasAttrByPath [apiVersion type abiVersion] system-images-packages + ) abiVersions); + + instructions = builtins.listToAttrs (map (package: { + name = package.name; + value = lib.optionalString (lib.hasPrefix "google_apis" type) '' + # Patch 'google_apis' system images so they're recognized by the sdk. + # Without this, `android list targets` shows 'Tag/ABIs : no ABIs' instead + # of 'Tag/ABIs : google_apis*/*' and the emulator fails with an ABI-related error. sed -i '/^Addon.Vendor/d' source.properties ''; - } - else [] - ) abiVersions + }) availablePackages + ); + in + lib.optionals (availablePackages != []) + (deployAndroidPackages { + inherit os; + packages = availablePackages; + patchesInstructions = instructions; + }) ) systemImageTypes ) platformVersions); @@ -217,7 +235,7 @@ rec { }; # All NDK bundles. - ndk-bundles = if includeNDK then map makeNdkBundle ndkVersions else []; + ndk-bundles = lib.optionals includeNDK (map makeNdkBundle ndkVersions); # The "default" NDK bundle. ndk-bundle = if includeNDK then lib.findFirst (x: x != null) null ndk-bundles else null; @@ -271,8 +289,8 @@ rec { ${lib.concatMapStrings (system-image: '' apiVersion=$(basename $(echo ${system-image}/libexec/android-sdk/system-images/*)) type=$(basename $(echo ${system-image}/libexec/android-sdk/system-images/*/*)) - mkdir -p system-images/$apiVersion/$type - ln -s ${system-image}/libexec/android-sdk/system-images/$apiVersion/$type/* system-images/$apiVersion/$type + mkdir -p system-images/$apiVersion + ln -s ${system-image}/libexec/android-sdk/system-images/$apiVersion/$type system-images/$apiVersion/$type '') images} ''; @@ -294,7 +312,11 @@ rec { You must accept the following licenses: ${lib.concatMapStringsSep "\n" (str: " - ${str}") licenseNames} - by setting nixpkgs config option 'android_sdk.accept_license = true;'. + a) + by setting nixpkgs config option 'android_sdk.accept_license = true;'. + b) + by an environment variable for a single invocation of the nix tools. + $ export NIXPKGS_ACCEPT_ANDROID_SDK_LICENSE=1 '' else callPackage ./cmdline-tools.nix { inherit deployAndroidPackage os cmdLineToolsVersion; diff --git a/pkgs/development/mobile/androidenv/default.nix b/pkgs/development/mobile/androidenv/default.nix index 9bd9fb9a543b1..3de6bf6e478cd 100644 --- a/pkgs/development/mobile/androidenv/default.nix +++ b/pkgs/development/mobile/androidenv/default.nix @@ -1,5 +1,5 @@ { config, pkgs ? import <nixpkgs> {} -, licenseAccepted ? config.android_sdk.accept_license or false +, licenseAccepted ? config.android_sdk.accept_license or (builtins.getEnv "NIXPKGS_ACCEPT_ANDROID_SDK_LICENSE" == "1") }: rec { diff --git a/pkgs/development/mobile/androidenv/emulate-app.nix b/pkgs/development/mobile/androidenv/emulate-app.nix index ef803779ad64d..e4a9615e4f76c 100644 --- a/pkgs/development/mobile/androidenv/emulate-app.nix +++ b/pkgs/development/mobile/androidenv/emulate-app.nix @@ -1,20 +1,30 @@ { composeAndroidPackages, stdenv, lib, runtimeShell }: { name, app ? null -, platformVersion ? "16", abiVersion ? "armeabi-v7a", systemImageType ? "default" -, enableGPU ? false, extraAVDFiles ? [] -, package ? null, activity ? null -, avdHomeDir ? null, sdkExtraArgs ? {} +, platformVersion ? "33" +, abiVersion ? "armeabi-v7a" +, systemImageType ? "default" +, enableGPU ? false +, extraAVDFiles ? [] +, package ? null +, activity ? null +, androidUserHome ? null +, avdHomeDir ? null # Support old variable with non-standard naming! +, androidAvdHome ? avdHomeDir +, sdkExtraArgs ? {} +, androidAvdFlags ? null +, androidEmulatorFlags ? null }: let sdkArgs = { - toolsVersion = "26.1.1"; - platformVersions = [ platformVersion ]; includeEmulator = true; includeSystemImages = true; + } // sdkExtraArgs // { + cmdLineToolsVersion = "8.0"; + platformVersions = [ platformVersion ]; systemImageTypes = [ systemImageType ]; abiVersions = [ abiVersion ]; - } // sdkExtraArgs; + }; sdk = (composeAndroidPackages sdkArgs).androidsdk; in @@ -33,24 +43,45 @@ stdenv.mkDerivation { export TMPDIR=/tmp fi - ${if avdHomeDir == null then '' + ${if androidUserHome == null then '' # Store the virtual devices somewhere else, instead of polluting a user's HOME directory - export ANDROID_SDK_HOME=$(mktemp -d $TMPDIR/nix-android-vm-XXXX) + export ANDROID_USER_HOME=$(mktemp -d $TMPDIR/nix-android-user-home-XXXX) + '' else '' + mkdir -p "${androidUserHome}" + export ANDROID_USER_HOME="${androidUserHome}" + ''} + + ${if androidAvdHome == null then '' + export ANDROID_AVD_HOME=$ANDROID_USER_HOME/avd '' else '' - mkdir -p "${avdHomeDir}" - export ANDROID_SDK_HOME="${avdHomeDir}" + mkdir -p "${androidAvdHome}" + export ANDROID_AVD_HOME="${androidAvdHome}" ''} # We need to specify the location of the Android SDK root folder export ANDROID_SDK_ROOT=${sdk}/libexec/android-sdk + ${lib.optionalString (androidAvdFlags != null) '' + # If NIX_ANDROID_AVD_FLAGS is empty + if [[ -z "$NIX_ANDROID_AVD_FLAGS" ]]; then + NIX_ANDROID_AVD_FLAGS="${androidAvdFlags}" + fi + ''} + + ${lib.optionalString (androidEmulatorFlags != null) '' + # If NIX_ANDROID_EMULATOR_FLAGS is empty + if [[ -z "$NIX_ANDROID_EMULATOR_FLAGS" ]]; then + NIX_ANDROID_EMULATOR_FLAGS="${androidEmulatorFlags}" + fi + ''} + # We have to look for a free TCP port echo "Looking for a free TCP port in range 5554-5584" >&2 for i in $(seq 5554 2 5584) do - if [ -z "$(${sdk}/libexec/android-sdk/platform-tools/adb devices | grep emulator-$i)" ] + if [ -z "$(${sdk}/bin/adb devices | grep emulator-$i)" ] then port=$i break @@ -68,25 +99,26 @@ stdenv.mkDerivation { export ANDROID_SERIAL="emulator-$port" # Create a virtual android device for testing if it does not exist - ${sdk}/libexec/android-sdk/tools/bin/avdmanager list target + ${sdk}/bin/avdmanager list target - if [ "$(${sdk}/libexec/android-sdk/tools/android list avd | grep 'Name: device')" = "" ] + if [ "$(${sdk}/bin/avdmanager list avd | grep 'Name: device')" = "" ] then # Create a virtual android device - yes "" | ${sdk}/libexec/android-sdk/tools/bin/avdmanager create avd -n device -k "system-images;android-${platformVersion};${systemImageType};${abiVersion}" $NIX_ANDROID_AVD_FLAGS + yes "" | ${sdk}/bin/avdmanager create avd --force -n device -k "system-images;android-${platformVersion};${systemImageType};${abiVersion}" -p $ANDROID_AVD_HOME $NIX_ANDROID_AVD_FLAGS ${lib.optionalString enableGPU '' # Enable GPU acceleration - echo "hw.gpu.enabled=yes" >> $ANDROID_SDK_HOME/.android/avd/device.avd/config.ini + echo "hw.gpu.enabled=yes" >> $ANDROID_AVD_HOME/device.avd/config.ini ''} ${lib.concatMapStrings (extraAVDFile: '' - ln -sf ${extraAVDFile} $ANDROID_SDK_HOME/.android/avd/device.avd + ln -sf ${extraAVDFile} $ANDROID_AVD_HOME/device.avd '') extraAVDFiles} fi # Launch the emulator - ${sdk}/libexec/android-sdk/emulator/emulator -avd device -no-boot-anim -port $port $NIX_ANDROID_EMULATOR_FLAGS & + echo "\nLaunch the emulator" + $ANDROID_SDK_ROOT/emulator/emulator -avd device -no-boot-anim -port $port $NIX_ANDROID_EMULATOR_FLAGS & # Wait until the device has completely booted echo "Waiting until the emulator has booted the device and the package manager is ready..." >&2 diff --git a/pkgs/development/mobile/androidenv/examples/shell-with-emulator.nix b/pkgs/development/mobile/androidenv/examples/shell-with-emulator.nix new file mode 100644 index 0000000000000..ebfe97b856ad8 --- /dev/null +++ b/pkgs/development/mobile/androidenv/examples/shell-with-emulator.nix @@ -0,0 +1,151 @@ +{ + # To test your changes in androidEnv run `nix-shell android-sdk-with-emulator-shell.nix` + + # If you copy this example out of nixpkgs, use these lines instead of the next. + # This example pins nixpkgs: https://nix.dev/tutorials/towards-reproducibility-pinning-nixpkgs.html + /*nixpkgsSource ? (builtins.fetchTarball { + name = "nixpkgs-20.09"; + url = "https://github.com/NixOS/nixpkgs/archive/20.09.tar.gz"; + sha256 = "1wg61h4gndm3vcprdcg7rc4s1v3jkm5xd7lw8r2f67w502y94gcy"; + }), + pkgs ? import nixpkgsSource { + config.allowUnfree = true; + }, + */ + + # If you want to use the in-tree version of nixpkgs: + pkgs ? import ../../../../.. { + config.allowUnfree = true; + }, + + config ? pkgs.config +}: + +# Copy this file to your Android project. +let + # Declaration of versions for everything. This is useful since these + # versions may be used in multiple places in this Nix expression. + android = { + platforms = [ "33" ]; + systemImageTypes = [ "google_apis" ]; + abis = [ "arm64-v8a" "x86_64" ]; + }; + + # If you copy this example out of nixpkgs, something like this will work: + /*androidEnvNixpkgs = fetchTarball { + name = "androidenv"; + url = "https://github.com/NixOS/nixpkgs/archive/<fill me in from Git>.tar.gz"; + sha256 = "<fill me in with nix-prefetch-url --unpack>"; + }; + + androidEnv = pkgs.callPackage "${androidEnvNixpkgs}/pkgs/development/mobile/androidenv" { + inherit config pkgs; + licenseAccepted = true; + };*/ + + # Otherwise, just use the in-tree androidenv: + androidEnv = pkgs.callPackage ./.. { + inherit config pkgs; + # You probably need to uncomment below line to express consent. + # licenseAccepted = true; + }; + + sdkArgs = { + platformVersions = android.platforms; + abiVersions = android.abis; + systemImageTypes = android.systemImageTypes; + + includeSystemImages = true; + includeEmulator = true; + + # Accepting more licenses declaratively: + extraLicenses = [ + # Already accepted for you with the global accept_license = true or + # licenseAccepted = true on androidenv. + # "android-sdk-license" + + # These aren't, but are useful for more uncommon setups. + "android-sdk-preview-license" + "android-googletv-license" + "android-sdk-arm-dbt-license" + "google-gdk-license" + "intel-android-extra-license" + "intel-android-sysimage-license" + "mips-android-sysimage-license" + ]; + }; + + androidComposition = androidEnv.composeAndroidPackages sdkArgs; + androidEmulator = androidEnv.emulateApp { + name = "android-sdk-emulator-demo"; + sdkExtraArgs = sdkArgs; + }; + androidSdk = androidComposition.androidsdk; + platformTools = androidComposition.platform-tools; + jdk = pkgs.jdk; +in +pkgs.mkShell rec { + name = "androidenv-demo"; + packages = [ androidSdk platformTools androidEmulator jdk pkgs.android-studio ]; + + LANG = "C.UTF-8"; + LC_ALL = "C.UTF-8"; + JAVA_HOME = jdk.home; + + # Note: ANDROID_HOME is deprecated. Use ANDROID_SDK_ROOT. + ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk"; + ANDROID_NDK_ROOT = "${ANDROID_SDK_ROOT}/ndk-bundle"; + + shellHook = '' + # Write out local.properties for Android Studio. + cat <<EOF > local.properties + # This file was automatically generated by nix-shell. + sdk.dir=$ANDROID_SDK_ROOT + ndk.dir=$ANDROID_NDK_ROOT + EOF + ''; + + passthru.tests = { + + shell-with-emulator-sdkmanager-packages-test = pkgs.runCommand "shell-with-emulator-sdkmanager-packages-test" { + nativeBuildInputs = [ androidSdk jdk ]; + } '' + output="$(sdkmanager --list)" + installed_packages_section=$(echo "''${output%%Available Packages*}" | awk 'NR>4 {print $1}') + echo "installed_packages_section: ''${installed_packages_section}" + + packages=( + "build-tools;33.0.1" "cmdline-tools;8.0" \ + "emulator" "patcher;v4" "platform-tools" "platforms;android-33" \ + "system-images;android-33;google_apis;arm64-v8a" \ + "system-images;android-33;google_apis;x86_64" + ) + + for package in "''${packages[@]}"; do + if [[ ! $installed_packages_section =~ "$package" ]]; then + echo "$package package was not installed." + exit 1 + fi + done + + touch "$out" + ''; + + shell-with-emulator-avdmanager-create-avd-test = pkgs.runCommand "shell-with-emulator-avdmanager-create-avd-test" { + nativeBuildInputs = [ androidSdk androidEmulator jdk ]; + } '' + avdmanager delete avd -n testAVD || true + echo "" | avdmanager create avd --force --name testAVD --package 'system-images;android-33;google_apis;x86_64' + result=$(avdmanager list avd) + + if [[ ! $result =~ "Name: testAVD" ]]; then + echo "avdmanager couldn't create the avd! The output is :''${result}" + exit 1 + fi + + avdmanager delete avd -n testAVD || true + touch "$out" + ''; + }; +} + diff --git a/pkgs/development/mobile/androidenv/examples/shell.nix b/pkgs/development/mobile/androidenv/examples/shell.nix index 8c51ba09e53ce..775f69bce4c51 100644 --- a/pkgs/development/mobile/androidenv/examples/shell.nix +++ b/pkgs/development/mobile/androidenv/examples/shell.nix @@ -56,7 +56,8 @@ let # Otherwise, just use the in-tree androidenv: androidEnv = pkgs.callPackage ./.. { inherit config pkgs; - licenseAccepted = true; + # You probably need to uncomment below line to express consent. + # licenseAccepted = true; }; androidComposition = androidEnv.composeAndroidPackages { @@ -146,8 +147,9 @@ pkgs.mkShell rec { ''; passthru.tests = { - sdkmanager-licenses-test = pkgs.runCommand "sdkmanager-licenses-test" { - buildInputs = [ androidSdk jdk ]; + + shell-sdkmanager-licenses-test = pkgs.runCommand "shell-sdkmanager-licenses-test" { + nativeBuildInputs = [ androidSdk jdk ]; } '' if [[ ! "$(sdkmanager --licenses)" =~ "All SDK package licenses accepted." ]]; then echo "At least one of SDK package licenses are not accepted." @@ -156,14 +158,14 @@ pkgs.mkShell rec { touch $out ''; - sdkmanager-packages-test = pkgs.runCommand "sdkmanager-packages-test" { - buildInputs = [ androidSdk jdk ]; + shell-sdkmanager-packages-test = pkgs.runCommand "shell-sdkmanager-packages-test" { + nativeBuildInputs = [ androidSdk jdk ]; } '' output="$(sdkmanager --list)" installed_packages_section=$(echo "''${output%%Available Packages*}" | awk 'NR>4 {print $1}') packages=( - "build-tools;30.0.3" "ndk-bundle" "platform-tools" \ + "build-tools;30.0.3" "platform-tools" \ "platforms;android-23" "platforms;android-24" "platforms;android-25" "platforms;android-26" \ "platforms;android-27" "platforms;android-28" "platforms;android-29" "platforms;android-30" \ "platforms;android-31" "platforms;android-32" "platforms;android-33" \ diff --git a/pkgs/development/mobile/androidenv/test-suite.nix b/pkgs/development/mobile/androidenv/test-suite.nix index d063b73ccb40b..b5aeca4324617 100644 --- a/pkgs/development/mobile/androidenv/test-suite.nix +++ b/pkgs/development/mobile/androidenv/test-suite.nix @@ -1,16 +1,19 @@ -{ stdenv, callPackage }: +{callPackage, lib, stdenv}: let examples-shell = callPackage ./examples/shell.nix {}; + examples-shell-with-emulator = callPackage ./examples/shell-with-emulator.nix {}; + all-tests = examples-shell.passthru.tests // + examples-shell-with-emulator.passthru.tests; in stdenv.mkDerivation { name = "androidenv-test-suite"; + buidInputs = lib.mapAttrsToList (name: value: value) all-tests; - src = ./.; + buildCommand = '' + touch $out + ''; - dontConfigure = true; - dontBuild = true; - - passthru.tests = { } // examples-shell.passthru.tests; + passthru.tests = all-tests; meta.timeout = 60; } diff --git a/pkgs/development/mobile/genymotion/default.nix b/pkgs/development/mobile/genymotion/default.nix index d8413117a30b8..0659046950014 100644 --- a/pkgs/development/mobile/genymotion/default.nix +++ b/pkgs/development/mobile/genymotion/default.nix @@ -24,11 +24,11 @@ let in stdenv.mkDerivation rec { pname = "genymotion"; - version = "3.2.1"; + version = "3.3.3"; src = fetchurl { url = "https://dl.genymotion.com/releases/genymotion-${version}/genymotion-${version}-linux_x64.bin"; name = "genymotion-${version}-linux_x64.bin"; - sha256 = "sha256-yCczUfiMcuu9OauMDmMdtnheDBXiC9tOEu0cWAW95FM="; + sha256 = "sha256-8NJgYILOR63tWZc3tHDie79uM1hBnAwJNwGp/h2RHCo="; }; nativeBuildInputs = [ makeWrapper ]; diff --git a/pkgs/development/mobile/maestro/default.nix b/pkgs/development/mobile/maestro/default.nix index 34687e9dbf9a2..9427e3d5d5927 100644 --- a/pkgs/development/mobile/maestro/default.nix +++ b/pkgs/development/mobile/maestro/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "maestro"; - version = "1.22.1"; + version = "1.25.0"; src = fetchurl { url = "https://github.com/mobile-dev-inc/maestro/releases/download/cli-${version}/maestro.zip"; - sha256 = "0h1012mdw8k4hf1fflxhbq7rq1gpwgs7a9v5sghc9minjc3b3z8h"; + sha256 = "0rkm2rgbbr4rbycg2kz5in2wjklv23jr7ms5p49j3bpa6nkv4jq3"; }; dontUnpack = true; diff --git a/pkgs/development/mobile/titaniumenv/build-app.nix b/pkgs/development/mobile/titaniumenv/build-app.nix index e4c3062cf5315..fa2eeae00b559 100644 --- a/pkgs/development/mobile/titaniumenv/build-app.nix +++ b/pkgs/development/mobile/titaniumenv/build-app.nix @@ -167,7 +167,7 @@ stdenv.mkDerivation ({ echo "file binary-dist \"$(ls $out/*.apk)\"" > $out/nix-support/hydra-build-products '' else if target == "iphone" then - if release then '' + lib.optionalString release '' mkdir -p $out/nix-support echo "file binary-dist \"$(echo $out/*.ipa)\"" > $out/nix-support/hydra-build-products @@ -180,7 +180,6 @@ stdenv.mkDerivation ({ echo "doc install \"$out/$appname.html\"" >> $out/nix-support/hydra-build-products ''} '' - else "" else throw "Target: ${target} is not supported!"} ''; diff --git a/pkgs/development/mobile/titaniumenv/titaniumsdk-7.5.nix b/pkgs/development/mobile/titaniumenv/titaniumsdk-7.5.nix index 4c8a63a0a5285..a42a9c20923d9 100644 --- a/pkgs/development/mobile/titaniumenv/titaniumsdk-7.5.nix +++ b/pkgs/development/mobile/titaniumenv/titaniumsdk-7.5.nix @@ -103,10 +103,9 @@ stdenv.mkDerivation { '' patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 android/titanium_prep.linux32 '' - else if stdenv.system == "x86_64-linux" then - '' + else lib.optionalString (stdenv.system == "x86_64-linux") '' 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-8.2.nix b/pkgs/development/mobile/titaniumenv/titaniumsdk-8.2.nix index e51775b8c6df6..a0907881d1685 100644 --- a/pkgs/development/mobile/titaniumenv/titaniumsdk-8.2.nix +++ b/pkgs/development/mobile/titaniumenv/titaniumsdk-8.2.nix @@ -105,10 +105,9 @@ stdenv.mkDerivation { '' patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux.so.2 android/titanium_prep.linux32 '' - else if stdenv.system == "x86_64-linux" then - '' + else lib.optionalString (stdenv.system == "x86_64-linux") '' patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 android/titanium_prep.linux64 '' - else ""} + } ''; } diff --git a/pkgs/development/mobile/webos/novacomd.nix b/pkgs/development/mobile/webos/novacomd.nix index 5e12fb5ce8a33..3d9eb8de1030a 100644 --- a/pkgs/development/mobile/webos/novacomd.nix +++ b/pkgs/development/mobile/webos/novacomd.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains: # ld: src/host/usb-linux.c:82: multiple definition of `t_recovery_queue'; # src/host/recovery.c:45: first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; cmakeFlags = [ "-DWEBOS_TARGET_MACHINE_IMPL=host" ]; diff --git a/pkgs/development/mobile/xcodeenv/build-app.nix b/pkgs/development/mobile/xcodeenv/build-app.nix index 4bef0ba2db0e9..6120025d5e3e9 100644 --- a/pkgs/development/mobile/xcodeenv/build-app.nix +++ b/pkgs/development/mobile/xcodeenv/build-app.nix @@ -91,7 +91,7 @@ stdenv.mkDerivation ({ # Do the building export LD=/usr/bin/clang # To avoid problem with -isysroot parameter that is unrecognized by the stock ld. Comparison with an impure build shows that it uses clang instead. Ugly, but it works - xcodebuild -target ${_target} -configuration ${_configuration} ${lib.optionalString (scheme != null) "-scheme ${scheme}"} -sdk ${_sdk} TARGETED_DEVICE_FAMILY="1, 2" ONLY_ACTIVE_ARCH=NO CONFIGURATION_TEMP_DIR=$TMPDIR CONFIGURATION_BUILD_DIR=$out ${if generateIPA || generateXCArchive then "-archivePath \"${name}.xcarchive\" archive" else ""} ${if release then '' PROVISIONING_PROFILE=$PROVISIONING_PROFILE OTHER_CODE_SIGN_FLAGS="--keychain $HOME/Library/Keychains/$keychainName-db"'' else ""} ${xcodeFlags} + xcodebuild -target ${_target} -configuration ${_configuration} ${lib.optionalString (scheme != null) "-scheme ${scheme}"} -sdk ${_sdk} TARGETED_DEVICE_FAMILY="1, 2" ONLY_ACTIVE_ARCH=NO CONFIGURATION_TEMP_DIR=$TMPDIR CONFIGURATION_BUILD_DIR=$out ${lib.optionalString (generateIPA || generateXCArchive) "-archivePath \"${name}.xcarchive\" archive"} ${lib.optionalString release '' PROVISIONING_PROFILE=$PROVISIONING_PROFILE OTHER_CODE_SIGN_FLAGS="--keychain $HOME/Library/Keychains/$keychainName-db"''} ${xcodeFlags} ${lib.optionalString release '' ${lib.optionalString generateIPA '' diff --git a/pkgs/development/mobile/xpwn/default.nix b/pkgs/development/mobile/xpwn/default.nix index e23ed132ce443..efd8d538c0906 100644 --- a/pkgs/development/mobile/xpwn/default.nix +++ b/pkgs/development/mobile/xpwn/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { # Workaround build failure on -fno-common toolchains: # ld: ../ipsw-patch/libxpwn.a(libxpwn.c.o):(.bss+0x4): multiple definition of # `endianness'; CMakeFiles/xpwn-bin.dir/src/xpwn.cpp.o:(.bss+0x0): first defined here - NIX_CFLAGS_COMPILE = "-fcommon"; + env.NIX_CFLAGS_COMPILE = "-fcommon"; preConfigure = '' rm BUILD # otherwise `mkdir build` fails on case insensitive file systems |