lib: move manual nixpkgs initialization to lib folder

This commit is contained in:
Tobias Happ 2022-07-09 15:35:57 +02:00
parent fc9072bb20
commit 116e30b8d5
7 changed files with 8 additions and 33 deletions

View file

@ -1,13 +1,9 @@
# Copyright (c) 2019-2022, see AUTHORS. Licensed under MIT License, see LICENSE. # Copyright (c) 2019-2022, see AUTHORS. Licensed under MIT License, see LICENSE.
#{ config }: {}:
{ }:
let
loadNixpkgs = import ../lib/load-nixpkgs.nix;
import ./nixpkgs-pinned.nix {
crossSystem = { crossSystem = {
#config = "${config.build.arch}-unknown-linux-android";
config = "aarch64-unknown-linux-android"; config = "aarch64-unknown-linux-android";
sdkVer = "32"; sdkVer = "32";
libc = "bionic"; libc = "bionic";
@ -15,7 +11,4 @@ let
useLLVM = true; useLLVM = true;
isStatic = true; isStatic = true;
}; };
}
in
loadNixpkgs { inherit crossSystem; }

View file

@ -14,4 +14,4 @@ let
}; };
in in
args: import pinnedPkgsSrc (args // defaultNixpkgsArgs) args: import pinnedPkgsSrc (defaultNixpkgsArgs // args)

View file

@ -1,18 +0,0 @@
# Copyright (c) 2019-2022, see AUTHORS. Licensed under MIT License, see LICENSE.
{ super }:
let
# head of nixos-22.05 as of 2022-06-27
pinnedPkgsSrc = super.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
rev = "cd90e773eae83ba7733d2377b6cdf84d45558780";
sha256 = "1b2wn1ncx9x4651vfcgyqrm93pd7ghnrgqjbkf6ckkpidah69m03";
};
in
import pinnedPkgsSrc {
inherit (super) config system;
overlays = [ ];
}

View file

@ -3,7 +3,7 @@
self: super: self: super:
let let
nixpkgs = import ./lib/nixpkgs.nix { inherit super; }; nixpkgs = import ../lib/nixpkgs-pinned.nix { inherit (super) config system; };
in in
{ {

View file

@ -3,7 +3,7 @@
{ callPackage, tallocStatic }: { callPackage, tallocStatic }:
let let
pkgsCross = callPackage ./cross-pkgs.nix { }; pkgsCross = callPackage ../../lib/nixpkgs-cross.nix { };
stdenv = pkgsCross.stdenvAdapters.makeStaticBinaries pkgsCross.stdenv; stdenv = pkgsCross.stdenvAdapters.makeStaticBinaries pkgsCross.stdenv;
in in

View file

@ -8,7 +8,7 @@
}: }:
let let
pkgsCross = callPackage ./cross-pkgs.nix { }; pkgsCross = callPackage ../../lib/nixpkgs-cross.nix { };
in in
pkgsCross.stdenv.mkDerivation rec { pkgsCross.stdenv.mkDerivation rec {

View file

@ -6,7 +6,7 @@ let
nixDirectory = callPackage ./nix-directory.nix { }; nixDirectory = callPackage ./nix-directory.nix { };
packageInfo = import "${nixDirectory}/nix-support/package-info.nix"; packageInfo = import "${nixDirectory}/nix-support/package-info.nix";
nixpkgs = import lib/load-nixpkgs.nix { }; nixpkgs = import ../lib/nixpkgs-pinned.nix { };
modules = import ../modules { modules = import ../modules {
pkgs = nixpkgs; pkgs = nixpkgs;