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.
#{ config }:
{ }:
let
loadNixpkgs = import ../lib/load-nixpkgs.nix;
{}:
import ./nixpkgs-pinned.nix {
crossSystem = {
#config = "${config.build.arch}-unknown-linux-android";
config = "aarch64-unknown-linux-android";
sdkVer = "32";
libc = "bionic";
@ -15,7 +11,4 @@ let
useLLVM = true;
isStatic = true;
};
in
loadNixpkgs { inherit crossSystem; }
}

View file

@ -14,4 +14,4 @@ let
};
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:
let
nixpkgs = import ./lib/nixpkgs.nix { inherit super; };
nixpkgs = import ../lib/nixpkgs-pinned.nix { inherit (super) config system; };
in
{

View file

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

View file

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

View file

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