From 56a292496f1630e39fd4b355762aaf14bc8e5677 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Mon, 6 May 2024 13:01:07 +0200 Subject: feat: add `--icons` astatusbar can be started with the option `--icons` and will replace sensor labels with appropriate icons. The user is expected to have Nerd Fonts, in particular IosevkaTerm Nerd Font, installed. --- default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'default.nix') diff --git a/default.nix b/default.nix index a0d748b..f670ad4 100644 --- a/default.nix +++ b/default.nix @@ -2,7 +2,16 @@ let haskellPackages = pkgs.haskellPackages.override { overrides = self: super: { - astatusbar = self.callCabal2nix "astatusbar" ./. { }; + astatusbar = (self.callCabal2nix "astatusbar" ./. { }).overrideAttrs (oldAttrs: { + nativeBuildInputs = oldAttrs.nativeBuildInputs or [ ] ++ [ pkgs.installShellFiles ]; + postInstall = oldAttrs.postInstall or "" + '' + exe=${oldAttrs.pname} + installShellCompletion --cmd $exe \ + --bash <($out/bin/$exe --bash-completion-script $out/bin/$exe) \ + --fish <($out/bin/$exe --fish-completion-script $out/bin/$exe) \ + --zsh <($out/bin/$exe --zsh-completion-script $out/bin/$exe) + ''; + }); sh = pkgs.haskell.lib.dontCheck (self.callCabal2nix "sh" (import ./nix/sources.nix).sh { }); statvfs = pkgs.haskell.lib.markUnbroken (super.statvfs.overrideAttrs (oldAtts: { patches = [ @@ -58,6 +67,7 @@ rec { packages = _: [ haskellPackages.astatusbar ]; buildInputs = [ pkgs.cabal-install + (pkgs.nerdfonts.override { fonts = [ "IosevkaTerm" ]; }) pkgs.niv pkgs.ormolu ]; -- cgit v1.2.3