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
|
|
|
inherit (import <nixpkgs> { }) fetchFromGitHub lib;
|
|
|
|
|
|
|
|
# For testing local version of nixpkgs
|
|
|
|
#nixpkgsSrc = (import <nixpkgs> { }).lib.cleanSource "/home/jakubgs/work/nixpkgs";
|
|
|
|
|
|
|
|
nixpkgsSrc = fetchFromGitHub {
|
2019-11-29 10:20:08 +00:00
|
|
|
name = "nixpkgs-source";
|
|
|
|
owner = "status-im";
|
|
|
|
repo = "nixpkgs";
|
2020-04-15 11:12:56 +00:00
|
|
|
rev = "6dacca5eb43a8bfb02fb09331df607d4465a28e9";
|
|
|
|
sha256 = "0whwzll9lvrq4gg5j838skg7fqpvb55w4z7y44pzib32k613y2qn";
|
2019-11-29 10:20:08 +00:00
|
|
|
# To get the compressed Nix sha256, use:
|
|
|
|
# nix-prefetch-url --unpack https://github.com/${ORG}/nixpkgs/archive/${REV}.tar.gz
|
|
|
|
# The last line will be the hash.
|
|
|
|
};
|
2020-04-15 11:12:56 +00:00
|
|
|
|
2019-11-29 10:20:08 +00:00
|
|
|
defaultConfig = {
|
|
|
|
android_sdk.accept_license = true;
|
2020-04-15 11:12:56 +00:00
|
|
|
# Android Env still needs old OpenSSL
|
|
|
|
permittedInsecurePackages = [ "openssl-1.0.2u" ];
|
2019-11-29 10:20:08 +00:00
|
|
|
# Override some package versions
|
|
|
|
packageOverrides = pkgs: rec {
|
|
|
|
# utilities
|
|
|
|
mkFilter = import ./tools/mkFilter.nix { inherit (pkgs.stdenv) lib; };
|
|
|
|
mkShell = import ./tools/mkShell.nix { inherit pkgs; stdenv = pkgs.stdenvNoCC; };
|
|
|
|
mergeSh = import ./tools/mergeSh.nix { inherit (pkgs.stdenv) lib; };
|
|
|
|
|
|
|
|
# custom packages
|
2020-04-15 11:12:56 +00:00
|
|
|
openjdk = pkgs.openjdk8_headless;
|
2019-11-29 10:20:08 +00:00
|
|
|
nodejs = pkgs.nodejs-10_x;
|
|
|
|
yarn = pkgs.yarn.override { inherit nodejs; };
|
2020-04-15 11:12:56 +00:00
|
|
|
go = pkgs.callPackage ./patched-go { baseGo = pkgs.go_1_14; };
|
2019-11-29 10:20:08 +00:00
|
|
|
|
|
|
|
# custom builders
|
2020-04-15 11:12:56 +00:00
|
|
|
buildGoPackage = pkgs.buildGo114Package.override { inherit go; };
|
2019-11-29 10:20:08 +00:00
|
|
|
};
|
|
|
|
};
|
2020-04-15 11:12:56 +00:00
|
|
|
pkgs = (import nixpkgsSrc) { config = defaultConfig // config; };
|
2019-11-29 10:20:08 +00:00
|
|
|
in
|
|
|
|
pkgs
|