writers: use callPackages to import sub-groups of writers

Use callPackages instead of plain import to get proper splicing. Without this,
writeNginxConfig fails when cross-compiling.
This commit is contained in:
Ben Wolsieffer 2023-07-26 21:57:49 -04:00
parent 35abc09040
commit 09dd973987
2 changed files with 4 additions and 17 deletions

View File

@ -1,17 +1,13 @@
{ pkgs, config, lib }:
{ config, lib, callPackages }:
let
aliases = if config.allowAliases then (import ./aliases.nix lib) else prev: {};
# Writers for JSON-like data structures
dataWriters = import ./data.nix {
inherit lib; inherit (pkgs) runCommandNoCC dasel;
};
dataWriters = callPackages ./data.nix { };
# Writers for scripts
scriptWriters = import ./scripts.nix {
inherit lib pkgs;
};
scriptWriters = callPackages ./scripts.nix { };
writers = scriptWriters // dataWriters;
in

View File

@ -1,4 +1,4 @@
{ pkgs, lib }:
{ pkgs, buildPackages, lib, stdenv, libiconv, mkNugetDeps, mkNugetSource, gixy }:
let
inherit (lib)
concatMapStringsSep
@ -10,15 +10,6 @@ let
strings
types
;
inherit (pkgs)
buildPackages
gixy
libiconv
mkNugetDeps
mkNugetSource
stdenv
;
in
rec {
# Base implementation for non-compiled executables.