2019-11-29 10:20:08 +00:00
|
|
|
# This file controls the pinned version of nixpkgs we use for our Nix environment
|
|
|
|
# as well as which versions of package we use, including their overrides.
|
|
|
|
{ config ? { } }:
|
|
|
|
|
|
|
|
let
|
2020-04-15 11:12:56 +00:00
|
|
|
# For testing local version of nixpkgs
|
|
|
|
#nixpkgsSrc = (import <nixpkgs> { }).lib.cleanSource "/home/jakubgs/work/nixpkgs";
|
|
|
|
|
2024-09-20 09:31:42 +00:00
|
|
|
# We use a commit from the unstable channel of nixpkgs for gradle 8.8
|
2023-06-21 12:49:21 +00:00
|
|
|
nixpkgsSrc = builtins.fetchTarball {
|
2024-09-20 09:31:42 +00:00
|
|
|
url = "https://github.com/NixOS/nixpkgs/archive/48d567fc7b299de90f70a48e4263e31f690ba03e.tar.gz";
|
|
|
|
sha256 = "sha256:0zynbk52khdfhg4qfv26h3r5156xff5p0cga2cin7b07i7lqminh";
|
2019-11-29 10:20:08 +00:00
|
|
|
};
|
2020-04-15 11:12:56 +00:00
|
|
|
|
2020-06-03 19:47:01 +00:00
|
|
|
# Status specific configuration defaults
|
2023-06-27 11:45:21 +00:00
|
|
|
defaultConfig = {
|
|
|
|
android_sdk.accept_license = true;
|
|
|
|
allowUnfree = true;
|
|
|
|
};
|
2020-06-03 19:47:01 +00:00
|
|
|
|
2020-04-26 12:40:06 +00:00
|
|
|
# Override some packages and utilities
|
|
|
|
pkgsOverlay = import ./overlay.nix;
|
2023-06-09 12:51:33 +00:00
|
|
|
|
|
|
|
# Fix for lack of Android SDK for M1 Macs.
|
|
|
|
systemOverride = let
|
|
|
|
inherit (builtins) currentSystem getEnv;
|
|
|
|
envSystemOverride = getEnv "NIXPKGS_SYSTEM_OVERRIDE";
|
|
|
|
in
|
|
|
|
if envSystemOverride != "" then
|
|
|
|
envSystemOverride
|
|
|
|
else
|
|
|
|
currentSystem;
|
2019-11-29 10:20:08 +00:00
|
|
|
in
|
2020-04-26 12:40:06 +00:00
|
|
|
# import nixpkgs with a config override
|
|
|
|
(import nixpkgsSrc) {
|
|
|
|
config = defaultConfig // config;
|
2023-06-09 12:51:33 +00:00
|
|
|
system = systemOverride;
|
2020-04-26 12:40:06 +00:00
|
|
|
overlays = [ pkgsOverlay ];
|
|
|
|
}
|