2024-08-29 12:07:28 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
section = "one/foodogsquared/SomeMadeUpCrap";
|
|
|
|
key = "somemadeupkey";
|
|
|
|
value = true;
|
2025-01-29 04:48:19 +00:00
|
|
|
in {
|
2024-08-29 12:07:28 +00:00
|
|
|
wrappers.dconf-test = {
|
|
|
|
arg0 = lib.getExe' pkgs.dconf "dconf";
|
|
|
|
dconf = {
|
|
|
|
enable = true;
|
|
|
|
settings.${section}.${key} = value;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
build.extraPassthru.tests = {
|
|
|
|
dconfCheck = pkgs.runCommand "dconf-wrapped-test" { } ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
|
|
|
|
# We've hardcoded the value for now since Nix toString function makes the
|
|
|
|
# boolean either "1" or an empty string.
|
2025-01-29 04:48:19 +00:00
|
|
|
[ "$(${
|
|
|
|
lib.getExe' config.build.toplevel "dconf-test"
|
|
|
|
} read '/${section}/${key}')" = 'true' ] && touch $out
|
2024-08-29 12:07:28 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|