depot: support system arg
This commit is contained in:
parent
26dad9dce1
commit
c705bf788a
3 changed files with 6 additions and 4 deletions
|
@ -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; });
|
||||
|
|
|
@ -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:
|
||||
|
|
3
third_party/default.nix
vendored
3
third_party/default.nix
vendored
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue