mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-21 17:59:39 +01:00
Use finalPackage pattern with wrapper so that people who don't use the service can benefit from the other options. Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
28 lines
647 B
Nix
28 lines
647 B
Nix
{ config, ... }:
|
|
{
|
|
programs.sketchybar = {
|
|
enable = true;
|
|
package = config.lib.test.mkStubPackage {
|
|
name = "sketchybar";
|
|
buildScript = ''
|
|
mkdir -p $out/bin
|
|
touch $out/bin/sketchybar
|
|
chmod 755 $out/bin/sketchybar
|
|
'';
|
|
};
|
|
|
|
# Test case for lua configuration without sbarLuaPackage
|
|
configType = "lua";
|
|
sbarLuaPackage = null;
|
|
|
|
config = ''
|
|
-- Basic lua config
|
|
local sbar = require("sbarlua")
|
|
sbar.bar:set({ height = 30 })
|
|
'';
|
|
};
|
|
|
|
test.asserts.assertions.expected = [
|
|
"When configType is set to \"lua\", service.sbarLuaPackage must be specified"
|
|
];
|
|
}
|