2020-04-26 14:40:06 +02: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 09:39:35 +02:00
|
|
|
let
|
|
|
|
inherit (super) stdenv stdenvNoCC callPackage;
|
2020-04-26 14:40:06 +02:00
|
|
|
in {
|
|
|
|
# Fix for MacOS
|
|
|
|
mkShell = super.mkShell.override { stdenv = stdenvNoCC; };
|
|
|
|
|
2020-04-23 20:19:12 +02:00
|
|
|
lib = (super.lib or { }) // (import ./lib {
|
|
|
|
inherit (super) lib;
|
|
|
|
});
|
2020-04-26 14:40:06 +02:00
|
|
|
|
2020-05-06 12:29:02 +02:00
|
|
|
# Project dependencies
|
|
|
|
deps = {
|
|
|
|
clojure = callPackage ./deps/clojure { };
|
2020-05-07 12:21:39 +02:00
|
|
|
gradle = callPackage ./deps/gradle { };
|
2020-05-06 12:39:49 +02:00
|
|
|
nodejs = callPackage ./deps/nodejs { };
|
2020-05-18 12:15:49 +02:00
|
|
|
nodejs-patched = callPackage ./deps/nodejs-patched { };
|
2020-05-06 15:33:54 +02:00
|
|
|
react-native = callPackage ./deps/react-native { };
|
2020-05-06 12:29:02 +02:00
|
|
|
};
|
|
|
|
|
2023-10-05 18:50:57 +00:00
|
|
|
# Clojure's linter receives frequent upgrades, and we want to take advantage
|
|
|
|
# of the latest available rules.
|
|
|
|
clj-kondo = super.clj-kondo.override rec {
|
|
|
|
buildGraalvmNativeImage = args: super.buildGraalvmNativeImage (args // rec {
|
|
|
|
inherit (args) pname;
|
|
|
|
version = "2023.09.07";
|
|
|
|
src = super.fetchurl {
|
|
|
|
url = "https://github.com/clj-kondo/${pname}/releases/download/v${version}/${pname}-${version}-standalone.jar";
|
|
|
|
sha256 = "sha256-F7ePdITYKkGB6nsR3EFJ7zLDCUoT0g3i+AAjXzBd624=";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2023-06-26 12:51:39 +05:30
|
|
|
# Checks fail on darwin.
|
|
|
|
git-lfs = super.git-lfs.overrideAttrs (old: {
|
|
|
|
doCheck = false;
|
|
|
|
});
|
|
|
|
|
2023-06-27 11:04:46 +02:00
|
|
|
|
2020-04-26 14:40:06 +02:00
|
|
|
# Package version adjustments
|
2024-09-20 15:01:42 +05:30
|
|
|
nodejs = super.nodejs_20;
|
2023-10-17 10:37:35 +02:00
|
|
|
ruby = super.ruby_3_1;
|
2024-09-20 15:01:42 +05:30
|
|
|
yarn = super.yarn.override { nodejs = super.nodejs_20; };
|
|
|
|
openjdk = super.openjdk17_headless;
|
2024-05-08 12:51:04 +05:30
|
|
|
xcodeWrapper = callPackage ./pkgs/xcodeenv/compose-xcodewrapper.nix { } {
|
2024-07-04 14:39:23 +05:30
|
|
|
versions = ["15.1" "15.2" "15.3" "15.4"];
|
2020-07-30 17:05:47 +02:00
|
|
|
};
|
2024-05-30 14:41:56 +05:30
|
|
|
go = super.go_1_21;
|
2023-12-07 15:36:08 +05:30
|
|
|
clang = super.clang_15;
|
2024-05-30 14:41:56 +05:30
|
|
|
buildGoPackage = super.buildGo121Package;
|
|
|
|
buildGoModule = super.buildGo121Module;
|
2022-09-12 11:52:41 +02:00
|
|
|
gomobile = (super.gomobile.overrideAttrs (old: {
|
2024-04-01 16:26:44 +05:30
|
|
|
patches = [
|
|
|
|
(self.fetchurl { # https://github.com/golang/mobile/pull/84
|
|
|
|
url = "https://github.com/golang/mobile/commit/f20e966e05b8f7e06bed500fa0da81cf6ebca307.patch";
|
|
|
|
sha256 = "sha256-TZ/Yhe8gMRQUZFAs9G5/cf2b9QGtTHRSObBFD5Pbh7Y=";
|
|
|
|
})
|
|
|
|
(self.fetchurl { # https://github.com/golang/go/issues/58426
|
|
|
|
url = "https://github.com/golang/mobile/commit/406ed3a7b8e44dc32844953647b49696d8847d51.patch";
|
|
|
|
sha256 = "sha256-dqbYukHkQEw8npOkKykOAzMC3ot/Y4DEuh7fE+ptlr8=";
|
|
|
|
})
|
|
|
|
];
|
2022-09-12 11:52:41 +02:00
|
|
|
})).override {
|
2021-11-23 13:30:48 +01:00
|
|
|
# FIXME: No Android SDK packages for aarch64-darwin.
|
|
|
|
withAndroidPkgs = stdenv.system != "aarch64-darwin";
|
2021-09-11 09:39:35 +02:00
|
|
|
androidPkgs = self.androidEnvCustom.compose;
|
|
|
|
};
|
2020-04-26 14:40:06 +02:00
|
|
|
|
2024-06-11 12:48:24 +02:00
|
|
|
# Android environment
|
2020-05-07 12:21:39 +02:00
|
|
|
androidEnvCustom = callPackage ./pkgs/android-sdk { };
|
2020-08-27 14:20:39 +02:00
|
|
|
androidPkgs = self.androidEnvCustom.pkgs;
|
2020-05-07 12:21:39 +02:00
|
|
|
androidShell = self.androidEnvCustom.shell;
|
|
|
|
|
2020-04-26 14:40:06 +02:00
|
|
|
# Custom packages
|
2020-05-07 12:21:39 +02:00
|
|
|
aapt2 = callPackage ./pkgs/aapt2 { };
|
2020-05-07 12:21:39 +02:00
|
|
|
patchMavenSources = callPackage ./pkgs/patch-maven-srcs { };
|
2020-05-22 20:24:47 +02:00
|
|
|
goMavenResolver = callPackage ./pkgs/go-maven-resolver { };
|
2020-04-26 14:40:06 +02:00
|
|
|
}
|