feat: add inputs to callPackage
This commit is contained in:
parent
2bc7d5fab3
commit
07d478036c
4 changed files with 38 additions and 6 deletions
|
|
@ -27,6 +27,7 @@ in
|
|||
drv = pkgs.callPackage package {
|
||||
inherit channels;
|
||||
lib = snowfall-lib.internal.system-lib;
|
||||
inputs = snowfall-lib.flake.without-src user-inputs;
|
||||
};
|
||||
};
|
||||
packages-metadata = builtins.map create-package-metadata user-packages;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,9 @@ in
|
|||
{
|
||||
name = builtins.unsafeDiscardStringContext (snowfall-lib.path.get-parent-directory shell);
|
||||
drv = channels.nixpkgs.callPackage shell {
|
||||
inherit channels;
|
||||
lib = snowfall-lib.internal.system-lib;
|
||||
inputs = snowfall-lib.flake.without-src user-inputs;
|
||||
};
|
||||
};
|
||||
shells-metadata = builtins.map create-shell-metadata user-shells;
|
||||
|
|
|
|||
|
|
@ -32,6 +32,13 @@ in
|
|||
# result: false
|
||||
is-linux = hasInfix "linux";
|
||||
|
||||
# Check whether a named system is virtual.
|
||||
# Type: String -> Bool
|
||||
# Usage: is-virtual "x86_64-iso"
|
||||
# result: true
|
||||
is-virtual = target:
|
||||
(get-virtual-system-type target) != "";
|
||||
|
||||
# Get the virtual system type of a system target.
|
||||
# Type: String -> String
|
||||
# Usage: get-virtual-system-type "x86_64-iso"
|
||||
|
|
@ -161,8 +168,9 @@ in
|
|||
modules = [ path ] ++ modules;
|
||||
|
||||
specialArgs = specialArgs // {
|
||||
inherit system name systems lib;
|
||||
inherit target system name systems lib;
|
||||
|
||||
virtual = (get-virtual-system-type target) != "";
|
||||
inputs = snowfall-lib.flake.without-src user-inputs;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue