[NixOS] Get taffybar compiling on ghc94, which avoids mmap issue

This commit is contained in:
Ivan Malison 2023-05-17 14:09:41 -06:00
parent 8f97ea3934
commit 99bdb41cc5
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8
10 changed files with 1296 additions and 203 deletions

View File

@ -2,21 +2,48 @@
inputs = { inputs = {
taffybar.url = path:./taffybar; taffybar.url = path:./taffybar;
flake-utils.url = github:numtide/flake-utils; flake-utils.url = github:numtide/flake-utils;
xmonad.url = github:xmonad/xmonad/master;
}; };
outputs = { self, flake-utils, taffybar, nixpkgs }: outputs = { self, flake-utils, taffybar, nixpkgs, xmonad }:
let let
overlay = import ./overlay.nix; hoverlay = final: prev: hself: hsuper: {
overlays = taffybar.overlays ++ [ overlay ]; imalison-taffybar = prev.haskell.lib.addPkgconfigDepends (
in flake-utils.lib.eachDefaultSystem (system: hself.callCabal2nix "imalison-taffybar"
let pkgs = import nixpkgs { inherit system overlays; config.allowBroken = true; }; (
in final.lib.sourceByRegex ./.
rec { ["taffybar.hs" "imalison-taffybar.cabal"]
devShell = pkgs.haskellPackages.shellFor { )
packages = p: [ p.imalison-taffybar p.taffybar ]; { }) [
nativeBuildInputs = with pkgs.haskellPackages; [ final.util-linux.dev
cabal-install hlint ghcid ormolu implicit-hie haskell-language-server final.pcre2
final.pcre
final.libselinux.dev
final.libsepol.dev
final.fribidi.out
final.fribidi.dev
final.libthai.dev
final.libdatrie.dev
final.xorg.libXdmcp.dev
final.libxkbcommon.dev
final.libepoxy.dev
final.xorg.libXtst.out
]; ];
}; };
defaultPackage = pkgs.haskellPackages.imalison-taffybar; defComp = { compiler = "ghc94"; };
overlay = xmonad.lib.fromHOL hoverlay defComp;
overlays = [ taffybar.overlay overlay ];
in flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system overlays; config.allowBroken = true; };
hpkgs = pkgs.lib.attrsets.getAttrFromPath (xmonad.lib.hpath defComp) pkgs;
in
rec {
devShell = hpkgs.shellFor {
packages = p: [ p.imalison-taffybar p.taffybar ];
nativeBuildInputs = with hpkgs; [
cabal-install
# ghcid ormolu implicit-hie haskell-language-server hlint
];
};
defaultPackage = hpkgs.imalison-taffybar;
}) // { inherit overlay overlays; } ; }) // { inherit overlay overlays; } ;
} }

View File

@ -1,13 +0,0 @@
final: prev: {
haskellPackages = prev.haskellPackages.override (old: {
overrides = prev.lib.composeExtensions (old.overrides or (_: _: {}))
(hself: hsuper: {
imalison-taffybar = hself.callCabal2nix "imalison-taffybar"
(
final.lib.sourceByRegex ./.
["taffybar.hs" "imalison-taffybar.cabal"]
)
{ };
});
});
}

@ -1 +1 @@
Subproject commit 5d1685f87ecbf283119110d002813d82f74342ea Subproject commit fec8b0e408c7ae9be1b7be819c7d81900225aae6

View File

@ -19,7 +19,6 @@
xmonad.overlay xmonad.overlay
xmonad-contrib.overlay xmonad-contrib.overlay
notifications-tray-icon.overlay notifications-tray-icon.overlay
(import ../dotfiles/config/taffybar/overlay.nix)
(import ./overlay.nix) (import ./overlay.nix)
] ++ taffybar.overlays; ] ++ taffybar.overlays;

View File

@ -52,7 +52,6 @@ in
# Haskell Desktop # Haskell Desktop
haskellPackages.xmonad haskellPackages.xmonad
haskellPackages.imalison-xmonad haskellPackages.imalison-xmonad
haskellPackages.imalison-taffybar
# haskellPackages.notifications-tray-icon # haskellPackages.notifications-tray-icon
haskellPackages.gtk-sni-tray haskellPackages.gtk-sni-tray
haskellPackages.status-notifier-item haskellPackages.status-notifier-item

File diff suppressed because it is too large Load Diff

View File

@ -20,8 +20,11 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
taffybar = { taffybar = {
# url = path:../dotfiles/config/taffybar/taffybar; url = path:../dotfiles/config/taffybar/taffybar;
url = github:taffybar/taffybar; inputs.nixpkgs.follows = "nixpkgs";
};
imalison-taffybar = {
url = path:../dotfiles/config/taffybar;
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
notifications-tray-icon = { notifications-tray-icon = {
@ -33,7 +36,7 @@
}; };
outputs = inputs@{ outputs = inputs@{
self, nixpkgs, nixos-hardware, home-manager, taffybar, xmonad, self, nixpkgs, nixos-hardware, home-manager, taffybar, xmonad,
xmonad-contrib, notifications-tray-icon, nix xmonad-contrib, notifications-tray-icon, nix, imalison-taffybar,
}: }:
let let
mkConfig = mkConfig =

View File

@ -1,4 +1,4 @@
{ pkgs, config, ... }: { inputs: { pkgs, config, ... }: {
xsession = { xsession = {
enable = true; enable = true;
preferStatusNotifierItems = true; preferStatusNotifierItems = true;
@ -35,7 +35,7 @@
services.taffybar = { services.taffybar = {
enable = true; enable = true;
package = pkgs.haskellPackages.imalison-taffybar; package = inputs.imalison-taffybar.defaultPackage."${pkgs.system}";
}; };
services.notify-osd = { services.notify-osd = {

@ -1 +1 @@
Subproject commit df78ece042baf74f25b855df3f2dfb759e8b1c91 Subproject commit 800e99c79266dc855c63076468a7088a74ef2410

View File

@ -41,7 +41,7 @@
}; };
}; };
nix.settings.trustedUsers = [ "root" "imalison" "kat" ]; nix.settings.trusted-users = [ "root" "imalison" "kat" ];
imports = [ imports = [
inputs.home-manager.nixosModule inputs.home-manager.nixosModule
@ -49,5 +49,5 @@
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.imalison = import ./home-manager.nix; home-manager.users.imalison = (import ./home-manager.nix) inputs;
} }