1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-09-11 12:05:26 +03:00

release.nix: Fix usage for reliance on <nixpkgs>

This commit is contained in:
Samuel Dionne-Riel 2021-08-26 16:48:09 -04:00
parent 6e04a55820
commit b7ec236881

View File

@ -5,10 +5,21 @@
# instance. Though you can use it to run your builds, it is not as ergonomic as
# using `nix-build` on `./default.nix`.
#
# Also note that *by design* it still relies on NIX_PATH being used for the
# input Nixpkgs.
#
# Note:
# Verify that .ci/instantiate-all.nix lists the expected paths when adding to this file.
let
mobileReleaseTools = (import ./lib/release-tools.nix {});
# An ambiant arbitrary Nixpkgs package set.
# This is assumed to be used for e.g. Hydra evals where <nixpkgs> is an input.
# This pkgs' is used as an input to release-tools, *and* to get a `lib`.
# Named pkgs' to reduce confusion with fully evaluated `pkgs`.
pkgs' = import <nixpkgs> {};
mobileReleaseTools = (import ./lib/release-tools.nix {
pkgs = pkgs';
});
inherit (mobileReleaseTools) all-devices;
in
{ mobile-nixos ? builtins.fetchGit ./.
@ -25,8 +36,7 @@ in
let
# We require some `lib` stuff in here.
# Pick a lib from the ambient <nixpkgs>.
pkgs' = import <nixpkgs> {};
# Pick a lib from the arbitrary package set.
inherit (pkgs') lib releaseTools;
inherit (mobileReleaseTools.withPkgs pkgs')
evalFor