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-03-22 14:21:44 +00:00
|
|
|
# We follow a fork of nixpkgs where we bump gradle to 8.3 and update build tools
|
2023-06-21 12:49:21 +00:00
|
|
|
nixpkgsSrc = builtins.fetchTarball {
|
2024-03-22 14:21:44 +00:00
|
|
|
url = "https://github.com/status-im/nixpkgs/archive/44d8b23ebbe40ed16ef1aecef6c5354657c48b19.tar.gz";
|
|
|
|
sha256 = "sha256:0s7kjnc8drchzp268yzbv5snc4702hswcns9hrncjq4im8cv6mf9";
|
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 ];
|
|
|
|
}
|