nix-module-wrapper-manager-fds/tests/configs/single-basepackage.nix
Gabriel Arazas 03e29feec5 wrapper-manager-fds/modules: change basePackages to accept a bare package
This will allow us to make changes to `programs.<name>.package`-type of
options found in NixOS, home-manager, etc. but it is expensive at the
cost of a rebuild which depends on the package.
2024-08-01 12:07:34 +08:00

26 lines
637 B
Nix

{ config, lib, pkgs, ... }:
{
basePackages = pkgs.fastfetch;
wrappers.fastfetch-guix = {
arg0 = lib.getExe' pkgs.fastfetch "fastfetch";
appendArgs = [
"--logo"
"Guix"
];
env.NO_COLOR.value = "1";
xdg.desktopEntry.enable = true;
};
build.extraPassthru.tests = {
singleBasePackage =
let
wrapper = config.build.toplevel;
in
pkgs.runCommand "wrapper-manager-fastfetch-actually-built" { } ''
[ -e "${wrapper}/share/applications/fastfetch-guix.desktop" ] && [ -x "${wrapper}/bin/${config.wrappers.fastfetch-guix.executableName}" ] && touch $out
'';
};
}