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
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
{ system ? builtins.currentSystem, ... }:
|
||||||
let
|
let
|
||||||
depot = (import ./default.nix {});
|
depot = (import ./default.nix { inherit system; });
|
||||||
pkgs = depot.third_party.nixpkgs;
|
pkgs = depot.third_party.nixpkgs;
|
||||||
lib = pkgs.lib;
|
lib = pkgs.lib;
|
||||||
prefixAttrs = prefix: lib.mapAttrsToList (name: value: { name = "${prefix}-${name}"; path = value; });
|
prefixAttrs = prefix: lib.mapAttrsToList (name: value: { name = "${prefix}-${name}"; path = value; });
|
||||||
|
|
|
@ -2,12 +2,12 @@
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
{ ... }:
|
{ system ? builtins.currentSystem, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
fix = f: let x = f x; in x;
|
fix = f: let x = f x; in x;
|
||||||
config = depot: {
|
config = depot: {
|
||||||
inherit depot;
|
inherit depot system;
|
||||||
pkgs = depot.third_party.nixpkgs;
|
pkgs = depot.third_party.nixpkgs;
|
||||||
};
|
};
|
||||||
in fix (self:
|
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
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
{ depot, ... }@ch:
|
{ depot, system, ... }@ch:
|
||||||
let
|
let
|
||||||
nixpkgsConfig = {
|
nixpkgsConfig = {
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
|
@ -15,6 +15,7 @@ let
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
nixpkgs = import ./nixpkgs {
|
nixpkgs = import ./nixpkgs {
|
||||||
|
inherit system;
|
||||||
config = nixpkgsConfig;
|
config = nixpkgsConfig;
|
||||||
};
|
};
|
||||||
crate2nixSrc = nixpkgs.fetchFromGitHub {
|
crate2nixSrc = nixpkgs.fetchFromGitHub {
|
||||||
|
|
Loading…
Reference in a new issue