2024-07-01 14:27:03 +00:00
|
|
|
{ pkgs, lib, self }:
|
|
|
|
|
|
|
|
lib.runTests {
|
2024-07-08 13:13:32 +00:00
|
|
|
testsEvaluateSampleConfiguration = {
|
|
|
|
expr =
|
|
|
|
let
|
|
|
|
sampleConf = self.env.eval {
|
|
|
|
inherit pkgs;
|
|
|
|
modules = [ ./wrapper-neofetch.nix ];
|
|
|
|
specialArgs.yourMomName = "Joe Mama";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
lib.isDerivation sampleConf.config.build.toplevel;
|
|
|
|
expected = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
testsEvaluateSampleConfiguration2 = {
|
|
|
|
expr =
|
|
|
|
let
|
|
|
|
sampleConf = self.env.eval {
|
|
|
|
inherit pkgs;
|
|
|
|
modules = [ ./wrapper-fastfetch.nix ];
|
|
|
|
specialArgs.yourMomName = "Joe Mama";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
lib.isDerivation sampleConf.config.build.toplevel;
|
|
|
|
expected = true;
|
|
|
|
};
|
|
|
|
|
2024-07-01 14:27:03 +00:00
|
|
|
testsBuildSampleConfiguration = {
|
|
|
|
expr =
|
|
|
|
let
|
|
|
|
sampleConf = self.env.build {
|
|
|
|
inherit pkgs;
|
|
|
|
modules = [ ./wrapper-neofetch.nix ];
|
|
|
|
specialArgs.yourMomName = "Joe Mama";
|
|
|
|
};
|
|
|
|
in
|
2024-07-08 13:12:31 +00:00
|
|
|
lib.isDerivation sampleConf;
|
2024-07-01 14:27:03 +00:00
|
|
|
expected = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
testsBuildSampleConfiguration2 = {
|
|
|
|
expr =
|
|
|
|
let
|
|
|
|
sampleConf = self.env.build {
|
|
|
|
inherit pkgs;
|
|
|
|
modules = [ ./wrapper-fastfetch.nix ];
|
|
|
|
specialArgs.yourMomName = "Joe Mama";
|
|
|
|
};
|
|
|
|
in
|
2024-07-08 13:12:31 +00:00
|
|
|
lib.isDerivation sampleConf;
|
2024-07-01 14:27:03 +00:00
|
|
|
expected = true;
|
|
|
|
};
|
|
|
|
}
|