Compare commits

...
Author SHA1 Message Date
yqrashawn a440ef3fcd fix: lint 2023-06-06 15:29:38 +08:00
jakub c3065c9d2a 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.18`
* 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`

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>
2023-06-05 19:08:09 +02:00
10 changed files with 14 additions and 70 deletions
+2 -14
View File
@@ -32,18 +32,6 @@ in {
# For parsing gradle.properties into an attrset
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.
# https://github.com/ios-control/ios-deploy/issues/580
ios-deploy = super.darwin.ios-deploy.overrideAttrs (old: rec {
@@ -60,8 +48,8 @@ in {
gradle = super.gradle_6;
nodejs = super.nodejs-18_x;
yarn = super.yarn.override { nodejs = super.nodejs-18_x; };
openjdk = super.openjdk8_headless;
xcodeWrapper = callPackage ./pkgs/xcodeenv/compose-xcodewrapper.nix { } {
openjdk = super.openjdk11_headless;
xcodeWrapper = super.xcodeenv.composeXcodeWrapper {
version = "14.0";
allowHigher = true;
};
+3 -4
View File
@@ -11,11 +11,10 @@ let
# We follow the master branch of official nixpkgs.
nixpkgsSrc = fetchFromGitHub {
name = "nixpkgs-source";
# FIXME: Fork used to get Cocoapods 1.12.0 and apksigner macOS build.
owner = "status-im";
owner = "NixOS";
repo = "nixpkgs";
rev = "d0c06fa3d3982a91aa01bd63ed84020cbde3d3ab";
sha256 = "sha256-8blvuUHnuf0hFr/PpBxVohJp5CaGXIXhgJlFN/cv7us=";
rev = "e7603eba51f2c7820c0a182c6bbb351181caa8e7";
sha256 = "sha256-XJZ/o17eOd2sEsGif+/MQBnfa2DKmndWgJyc7CWajFc=";
# To get the compressed Nix sha256, use:
# nix-prefetch-url --unpack https://github.com/${ORG}/nixpkgs/archive/${REV}.tar.gz
};
+1 -1
View File
@@ -9,7 +9,7 @@
# by setting android_sdk.accept_license = true.
androidenv.composeAndroidPackages {
toolsVersion = "26.1.1";
platformToolsVersion = "33.0.2";
platformToolsVersion = "33.0.3";
buildToolsVersions = [ "30.0.0" ];
platformVersions = [ "31" ];
cmakeVersions = [ "3.18.1" ];
+1
View File
@@ -2,6 +2,7 @@
mkShell {
name = "android-sdk-shell";
buildInputs = [ openjdk ];
shellHook = ''
export JAVA_HOME="${openjdk}"
@@ -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
'';
}
+1 -1
View File
@@ -20,7 +20,7 @@ in mkShell {
# lint specific utilities
clj-kondo zprint
# other nice to have stuff
yarn nodejs python27
yarn nodejs python310
] # and some special cases
++ lib.optionals stdenv.isDarwin [ cocoapods clang tcl ]
++ lib.optionals (!stdenv.isDarwin) [ gcc8 ]
+1 -1
View File
@@ -57,7 +57,7 @@ let
# for 'scripts/generate-keystore.sh'
keytool = mkShell {
buildInputs = with pkgs; [ openjdk8 apksigner ];
buildInputs = with pkgs; [ openjdk apksigner ];
};
# for targets needing 'adb', 'apkanalyzer' and other SDK/NDK tools
@@ -40,8 +40,8 @@
:default-value default-value
:accessibility-label :profile-title-input
:keyboard-appearance (theme/theme-value :light :dark override-theme)
:on-focus #(swap! focused? (fn [] true))
:on-blur #(swap! focused? (fn [] false))
:on-focus #(swap! focused? (constantly true))
:on-blur #(swap! focused? (constantly false))
:input-mode :text
:on-change-text on-change
:editable (not disabled?)
@@ -96,7 +96,7 @@
[rn/view
{:style style/featured-list-container
:on-layout #(swap! view-size
(fn []
(fn [_]
(- (oops/oget % "nativeEvent.layout.width") 40)))}
(when-not (= @view-size 0)
[rn/flat-list
@@ -73,11 +73,11 @@
(let [will-show-listener (oops/ocall rn/keyboard
"addListener"
"keyboardWillShow"
#(swap! keyboard-shown? (fn [] true)))
#(swap! keyboard-shown? (constantly true)))
will-hide-listener (oops/ocall rn/keyboard
"addListener"
"keyboardWillHide"
#(swap! keyboard-shown? (fn [] false)))]
#(swap! keyboard-shown? (constantly false)))]
(fn []
(fn []
(oops/ocall will-show-listener "remove")