summaryrefslogtreecommitdiffstats
path: root/default.nix
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2024-05-06 13:01:07 +0200
committerLibravatar Alexander Foremny <aforemny@posteo.de>2024-05-06 21:36:42 +0200
commit56a292496f1630e39fd4b355762aaf14bc8e5677 (patch)
tree1f6bf8b8130cba1164fec12795b8d7b1be668442 /default.nix
parentfbf0f26fe34f08f7d12b8f334e8ac77abbf7db2d (diff)
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.
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix12
1 files changed, 11 insertions, 1 deletions
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
];