2020-04-26 12:40:06 +00:00
|
|
|
# Override some packages and utilities in 'pkgs'
|
|
|
|
# and make them available globally via callPackage.
|
|
|
|
#
|
|
|
|
# For more details see:
|
|
|
|
# - https://nixos.wiki/wiki/Overlays
|
|
|
|
# - https://nixos.org/nixos/nix-pills/callpackage-design-pattern.html
|
|
|
|
|
|
|
|
self: super:
|
|
|
|
|
2021-09-11 07:39:35 +00:00
|
|
|
let
|
|
|
|
inherit (super) stdenv stdenvNoCC callPackage;
|
2020-04-26 12:40:06 +00:00
|
|
|
in {
|
|
|
|
# Fix for MacOS
|
|
|
|
mkShell = super.mkShell.override { stdenv = stdenvNoCC; };
|
|
|
|
|
|
|
|
# Various utilities
|
|
|
|
utils = callPackage ./tools/utils.nix { };
|
2020-04-23 18:19:12 +00:00
|
|
|
lib = (super.lib or { }) // (import ./lib {
|
|
|
|
inherit (super) lib;
|
|
|
|
inherit (self) config;
|
|
|
|
});
|
2020-04-26 12:40:06 +00:00
|
|
|
|
2020-05-06 10:29:02 +00:00
|
|
|
# Project dependencies
|
|
|
|
deps = {
|
|
|
|
clojure = callPackage ./deps/clojure { };
|
2020-05-07 10:21:39 +00:00
|
|
|
gradle = callPackage ./deps/gradle { };
|
2020-05-06 10:39:49 +00:00
|
|
|
nodejs = callPackage ./deps/nodejs { };
|
2020-05-18 10:15:49 +00:00
|
|
|
nodejs-patched = callPackage ./deps/nodejs-patched { };
|
2020-05-06 13:33:54 +00:00
|
|
|
react-native = callPackage ./deps/react-native { };
|
2020-05-06 10:29:02 +00:00
|
|
|
};
|
|
|
|
|
2020-06-03 19:47:01 +00:00
|
|
|
# For parsing gradle.properties into an attrset
|
|
|
|
gradlePropParser = callPackage ./tools/gradlePropParser.nix { };
|
2020-04-26 12:40:06 +00:00
|
|
|
|
|
|
|
# Package version adjustments
|
2020-08-27 14:21:48 +00:00
|
|
|
gradle = super.pkgs.gradle_5;
|
2022-05-04 12:34:12 +00:00
|
|
|
nodejs = super.pkgs.nodejs-16_x;
|
2020-07-30 15:05:47 +00:00
|
|
|
openjdk = super.pkgs.openjdk8_headless;
|
|
|
|
xcodeWrapper = callPackage ./pkgs/xcodeenv/compose-xcodewrapper.nix { } {
|
2022-05-05 10:12:07 +00:00
|
|
|
version = "13.3";
|
2020-07-30 15:05:47 +00:00
|
|
|
allowHigher = true;
|
|
|
|
};
|
2024-04-30 05:54:19 +00:00
|
|
|
go = super.pkgs.go_1_19;
|
|
|
|
buildGoPackage = super.pkgs.buildGo119Package;
|
|
|
|
buildGoModule = super.pkgs.buildGo119Module;
|
2022-09-12 09:52:41 +00:00
|
|
|
gomobile = (super.gomobile.overrideAttrs (old: {
|
|
|
|
patches = self.pkgs.fetchurl { # https://github.com/golang/mobile/pull/84
|
|
|
|
url = "https://github.com/golang/mobile/commit/f20e966e05b8f7e06bed500fa0da81cf6ebca307.patch";
|
|
|
|
sha256 = "sha256-TZ/Yhe8gMRQUZFAs9G5/cf2b9QGtTHRSObBFD5Pbh7Y=";
|
|
|
|
};
|
|
|
|
})).override {
|
2021-11-23 12:30:48 +00:00
|
|
|
# FIXME: No Android SDK packages for aarch64-darwin.
|
|
|
|
withAndroidPkgs = stdenv.system != "aarch64-darwin";
|
2021-09-11 07:39:35 +00:00
|
|
|
androidPkgs = self.androidEnvCustom.compose;
|
|
|
|
};
|
2020-04-26 12:40:06 +00:00
|
|
|
|
2020-05-07 10:21:39 +00:00
|
|
|
# Android environement
|
|
|
|
androidEnvCustom = callPackage ./pkgs/android-sdk { };
|
2020-08-27 12:20:39 +00:00
|
|
|
androidPkgs = self.androidEnvCustom.pkgs;
|
2020-05-07 10:21:39 +00:00
|
|
|
androidShell = self.androidEnvCustom.shell;
|
|
|
|
|
2020-04-26 12:40:06 +00:00
|
|
|
# Custom packages
|
2020-05-07 10:21:39 +00:00
|
|
|
aapt2 = callPackage ./pkgs/aapt2 { };
|
2020-05-07 10:21:39 +00:00
|
|
|
patchMavenSources = callPackage ./pkgs/patch-maven-srcs { };
|
2020-05-22 18:24:47 +00:00
|
|
|
goMavenResolver = callPackage ./pkgs/go-maven-resolver { };
|
2020-04-26 12:40:06 +00:00
|
|
|
}
|