xmobar: wrap ghc completely and not expose it to home.packages

This commit is contained in:
Primrose 2025-08-08 09:07:26 +02:00
parent 65a12ca27d
commit 8e2659463d
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA

View file

@ -1,15 +1,15 @@
{pkgs, ...}: {
home.packages = let
inherit (pkgs) lib;
wrapped-xmobar = pkgs.symlinkJoin {
name = "xmobar";
paths = with pkgs; [
# Xmobar wants ghc
(haskellPackages.ghcWithPackages (self: [
self.xmobar
]))
# The executable
xmobar
];
paths = [pkgs.xmobar];
buildInputs = [pkgs.makeWrapper];
postBuild = ''
wrapProgram $out/bin/xmobar \
--prefix PATH : "${lib.makeBinPath [pkgs.ghc]}"
'';
};
in [
wrapped-xmobar