depot: support system arg

This commit is contained in:
Luke Granger-Brown 2021-09-05 09:21:41 +00:00
parent 26dad9dce1
commit c705bf788a
3 changed files with 6 additions and 4 deletions

View file

@ -2,8 +2,9 @@
#
# SPDX-License-Identifier: Apache-2.0
{ system ? builtins.currentSystem, ... }:
let
depot = (import ./default.nix {});
depot = (import ./default.nix { inherit system; });
pkgs = depot.third_party.nixpkgs;
lib = pkgs.lib;
prefixAttrs = prefix: lib.mapAttrsToList (name: value: { name = "${prefix}-${name}"; path = value; });

View file

@ -2,12 +2,12 @@
#
# SPDX-License-Identifier: Apache-2.0
{ ... }:
{ system ? builtins.currentSystem, ... }:
let
fix = f: let x = f x; in x;
config = depot: {
inherit depot;
inherit depot system;
pkgs = depot.third_party.nixpkgs;
};
in fix (self:

View file

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: Apache-2.0
{ depot, ... }@ch:
{ depot, system, ... }@ch:
let
nixpkgsConfig = {
allowUnfree = true;
@ -15,6 +15,7 @@ let
};
};
nixpkgs = import ./nixpkgs {
inherit system;
config = nixpkgsConfig;
};
crate2nixSrc = nixpkgs.fetchFromGitHub {