nix: upgrade nixpkgs to latest nixos-22.11

Notable upgrades:

* Bash `5.1` to `5.2`
* Git `2.37.3` to `2.40.1`
* Curl `7.85.0` to `8.0.1`
* OpenSSL `3.0.5` to `3.0.8`
* Go `1.18.6` to `1.18.9`
* NodeJS `18.9.1` to `18.16.0`
* Java `1.8.0_322` to `11.0.11`
* Ruby `3.1.2` to `3.1.4`
* Python `2.7.18` to `3.10.11`
* Clojure `1.11.1.1165` to `1.11.1.1273`
* Clj-kondo `v2022.10.05` to `v2023.04.14`
* Zprint `1.2.5` to `1.2.6`
* Bundler `2.3.22` to `2.4.13`
* Gradle `6.9.2` to `6.9.4`
* Android Platform Tools `33.0.2` to `33.0.3`
* Android SDK Tools to Android SDK Command-Line Tools

Removals:

* Zprint since the version in `nixpkgs` was newer than in overlay.
* Xcode wrapper definition was removed since my fixes were merged:
  - https://github.com/NixOS/nixpkgs/pull/204278
  - https://github.com/NixOS/nixpkgs/pull/228696

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2023-01-31 17:54:29 +01:00
parent fa59843804
commit c97559793c
No known key found for this signature in database
GPG Key ID: FE65CD384D5BF7B4
9 changed files with 15 additions and 70 deletions

View File

@ -32,18 +32,6 @@ in {
# For parsing gradle.properties into an attrset # For parsing gradle.properties into an attrset
gradlePropParser = callPackage ./tools/gradlePropParser.nix { }; gradlePropParser = callPackage ./tools/gradlePropParser.nix { };
# Clojure formatting tool
zprint = super.zprint.override rec {
buildGraalvmNativeImage = args: super.buildGraalvmNativeImage ( args // rec {
inherit (args) pname;
version = "1.2.5";
src = self.fetchurl {
url = "https://github.com/kkinnear/${pname}/releases/download/${version}/${pname}-filter-${version}";
sha256 = "sha256-PWdR5jqyzvTk9HoxqDldwtZNik34dmebBtZZ5vtva4A=";
};
});
};
# Fix for missing libarclite_macosx.a in Xcode 14.3. # Fix for missing libarclite_macosx.a in Xcode 14.3.
# https://github.com/ios-control/ios-deploy/issues/580 # https://github.com/ios-control/ios-deploy/issues/580
ios-deploy = super.darwin.ios-deploy.overrideAttrs (old: rec { ios-deploy = super.darwin.ios-deploy.overrideAttrs (old: rec {
@ -61,7 +49,7 @@ in {
nodejs = super.nodejs-18_x; nodejs = super.nodejs-18_x;
yarn = super.yarn.override { nodejs = super.nodejs-18_x; }; yarn = super.yarn.override { nodejs = super.nodejs-18_x; };
openjdk = super.openjdk11_headless; openjdk = super.openjdk11_headless;
xcodeWrapper = callPackage ./pkgs/xcodeenv/compose-xcodewrapper.nix { } { xcodeWrapper = super.xcodeenv.composeXcodeWrapper {
version = "14.0"; version = "14.0";
allowHigher = true; allowHigher = true;
}; };

View File

@ -11,11 +11,10 @@ let
# We follow the master branch of official nixpkgs. # We follow the master branch of official nixpkgs.
nixpkgsSrc = fetchFromGitHub { nixpkgsSrc = fetchFromGitHub {
name = "nixpkgs-source"; name = "nixpkgs-source";
# FIXME: Fork used to get Cocoapods 1.12.0 and apksigner macOS build. owner = "NixOS";
owner = "status-im";
repo = "nixpkgs"; repo = "nixpkgs";
rev = "d0c06fa3d3982a91aa01bd63ed84020cbde3d3ab"; rev = "e7603eba51f2c7820c0a182c6bbb351181caa8e7";
sha256 = "sha256-8blvuUHnuf0hFr/PpBxVohJp5CaGXIXhgJlFN/cv7us="; sha256 = "sha256-XJZ/o17eOd2sEsGif+/MQBnfa2DKmndWgJyc7CWajFc=";
# To get the compressed Nix sha256, use: # To get the compressed Nix sha256, use:
# nix-prefetch-url --unpack https://github.com/${ORG}/nixpkgs/archive/${REV}.tar.gz # nix-prefetch-url --unpack https://github.com/${ORG}/nixpkgs/archive/${REV}.tar.gz
}; };

View File

@ -8,8 +8,9 @@
# The "android-sdk-license" license is accepted # The "android-sdk-license" license is accepted
# by setting android_sdk.accept_license = true. # by setting android_sdk.accept_license = true.
androidenv.composeAndroidPackages { androidenv.composeAndroidPackages {
cmdLineToolsVersion = "9.0";
toolsVersion = "26.1.1"; toolsVersion = "26.1.1";
platformToolsVersion = "33.0.2"; platformToolsVersion = "33.0.3";
buildToolsVersions = [ "31.0.0" ]; buildToolsVersions = [ "31.0.0" ];
platformVersions = [ "31" ]; platformVersions = [ "31" ];
cmakeVersions = [ "3.18.1" ]; cmakeVersions = [ "3.18.1" ];

View File

@ -1,17 +1,18 @@
{ mkShell, androidPkgs }: { mkShell, openjdk, androidPkgs }:
mkShell { mkShell {
name = "android-sdk-shell"; name = "android-sdk-shell";
buildInputs = [ openjdk ];
shellHook = '' shellHook = ''
export ANDROID_HOME="${androidPkgs.sdk}" export ANDROID_HOME="${androidPkgs.sdk}"
export ANDROID_NDK_ROOT="${androidPkgs.ndk}" export ANDROID_NDK_ROOT="${androidPkgs.ndk}"
export ANDROID_SDK_ROOT="$ANDROID_HOME" export ANDROID_SDK_ROOT="$ANDROID_HOME"
export PATH="$ANDROID_HOME/bin:$PATH"
export PATH="$ANDROID_NDK_ROOT:$PATH" export PATH="$ANDROID_NDK_ROOT:$PATH"
export PATH="$ANDROID_SDK_ROOT/tools:$PATH" export PATH="$ANDROID_SDK_ROOT/tools:$PATH"
export PATH="$ANDROID_SDK_ROOT/tools/bin:$PATH" export PATH="$ANDROID_SDK_ROOT/tools/bin:$PATH"
export PATH="$(echo $ANDROID_SDK_ROOT/cmdline-tools/*/bin):$PATH"
export PATH="$ANDROID_SDK_ROOT/platform-tools:$PATH" export PATH="$ANDROID_SDK_ROOT/platform-tools:$PATH"
export PATH="$ANDROID_SDK_ROOT/build-tools:$PATH"
''; '';
} }

View File

@ -1,44 +0,0 @@
{ stdenv }:
{ version ? "11.1"
, allowHigher ? false
, xcodeBaseDir ? "/Applications/Xcode.app" }:
assert stdenv.isDarwin;
stdenv.mkDerivation {
name = "xcode-wrapper-${version}${if allowHigher then "-plus" else ""}";
# Fix 'xcodebuild: Operation not permitted' when 'sandbox=relaxed' is used.
# https://github.com/NixOS/nixpkgs/pull/228696
__noChroot = stdenv.isDarwin;
buildCommand = ''
mkdir -p $out/bin
cd $out/bin
ln -s /usr/bin/xcode-select
ln -s /usr/bin/security
ln -s /usr/bin/codesign
ln -s /usr/bin/xcrun
ln -s /usr/bin/plutil
ln -s /usr/bin/clang
ln -s /usr/bin/lipo
ln -s /usr/bin/file
ln -s /usr/bin/rev
ln -s "${xcodeBaseDir}/Contents/Developer/usr/bin/xcodebuild"
ln -s "${xcodeBaseDir}/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator"
cd ..
ln -s "${xcodeBaseDir}/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs"
# Check if we have the xcodebuild version that we want
currVer=$($out/bin/xcodebuild -version)
${if allowHigher then ''
if [ -z "$(printf '%s\n' "${version}" "$currVer" | sort -V | head -n1)""" != "${version}" ]
'' else ''
if [ -z "$(echo $currVer | grep -x 'Xcode ${version}')" ]
''}
then
echo "We require xcodebuild version${if allowHigher then " or higher" else ""}: ${version}"
exit 1
fi
'';
}

View File

@ -20,7 +20,7 @@ in mkShell {
# lint specific utilities # lint specific utilities
clj-kondo zprint clj-kondo zprint
# other nice to have stuff # other nice to have stuff
yarn nodejs python27 yarn nodejs python310
] # and some special cases ] # and some special cases
++ lib.optionals stdenv.isDarwin [ cocoapods clang tcl ] ++ lib.optionals stdenv.isDarwin [ cocoapods clang tcl ]
++ lib.optionals (!stdenv.isDarwin) [ gcc8 ] ++ lib.optionals (!stdenv.isDarwin) [ gcc8 ]

View File

@ -57,7 +57,7 @@ let
# for 'scripts/generate-keystore.sh' # for 'scripts/generate-keystore.sh'
keytool = mkShell { keytool = mkShell {
buildInputs = with pkgs; [ openjdk11 apksigner ]; buildInputs = with pkgs; [ openjdk apksigner ];
}; };
# for targets needing 'adb', 'apkanalyzer' and other SDK/NDK tools # for targets needing 'adb', 'apkanalyzer' and other SDK/NDK tools

View File

@ -42,8 +42,8 @@
:default-value default-value :default-value default-value
:accessibility-label :profile-title-input :accessibility-label :profile-title-input
:keyboard-appearance (theme/theme-value :light :dark override-theme) :keyboard-appearance (theme/theme-value :light :dark override-theme)
:on-focus #(swap! focused? (fn [] true)) :on-focus #(swap! focused? (constantly true))
:on-blur #(swap! focused? (fn [] false)) :on-blur #(swap! focused? (constantly false))
:auto-focus auto-focus :auto-focus auto-focus
:input-mode :text :input-mode :text
:on-change-text on-change :on-change-text on-change

View File

@ -96,7 +96,7 @@
[rn/view [rn/view
{:style style/featured-list-container {:style style/featured-list-container
:on-layout #(swap! view-size :on-layout #(swap! view-size
(fn [] (fn [_]
(- (oops/oget % "nativeEvent.layout.width") 40)))} (- (oops/oget % "nativeEvent.layout.width") 40)))}
(when-not (= @view-size 0) (when-not (= @view-size 0)
[rn/flat-list [rn/flat-list