mirror of
https://github.com/nix-community/home-manager
synced 2024-11-22 12:43:14 +00:00
tests: add mainProgram to stub packages
This is to avoid warnings being printed while tests are run.
This commit is contained in:
parent
835465e8ba
commit
baf222f2fb
1 changed files with 6 additions and 2 deletions
|
@ -33,7 +33,8 @@ let
|
|||
|
||||
defaultBuildScript = "mkdir $out";
|
||||
|
||||
dummyPackage = pkgs.runCommandLocal "dummy" { } defaultBuildScript;
|
||||
dummyPackage = pkgs.runCommandLocal "dummy" { meta.mainProgram = "dummy"; }
|
||||
defaultBuildScript;
|
||||
|
||||
mkStubPackage = { name ? "dummy", outPath ? null, version ? null
|
||||
, buildScript ? defaultBuildScript }:
|
||||
|
@ -41,7 +42,10 @@ let
|
|||
pkg = if name == "dummy" && buildScript == defaultBuildScript then
|
||||
dummyPackage
|
||||
else
|
||||
pkgs.runCommandLocal name { pname = name; } buildScript;
|
||||
pkgs.runCommandLocal name {
|
||||
pname = name;
|
||||
meta.mainProgram = name;
|
||||
} buildScript;
|
||||
in pkg // optionalAttrs (outPath != null) {
|
||||
inherit outPath;
|
||||
|
||||
|
|
Loading…
Reference in a new issue