https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
8 lines
288 B
Nix
8 lines
288 B
Nix
{ evalMinimalConfig, pkgs, lib, stdenv }:
|
|
lib.recurseIntoAttrs {
|
|
invokeNixpkgsSimple =
|
|
(evalMinimalConfig ({ config, modulesPath, ... }: {
|
|
imports = [ (modulesPath + "/misc/nixpkgs.nix") ];
|
|
nixpkgs.system = stdenv.hostPlatform.system;
|
|
}))._module.args.pkgs.hello;
|
|
}
|