76 lines
1.6 KiB
Nix
76 lines
1.6 KiB
Nix
{
|
|
inputs = {
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
xmonad = {
|
|
url = "github:xmonad/xmonad";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
xmonad-contrib = {
|
|
url = "github:xmonad/xmonad-contrib";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
xmobar = {
|
|
url = "git+https://codeberg.org/xmobar/xmobar";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = {
|
|
self,
|
|
flake-utils,
|
|
nixpkgs,
|
|
xmonad,
|
|
xmonad-contrib,
|
|
xmobar,
|
|
}: let
|
|
overlay = _: pkgs: {
|
|
haskellPackages = pkgs.haskellPackages.override (old: {
|
|
overrides =
|
|
pkgs.lib.composeExtensions (old.overrides or (_: _: {}))
|
|
(final: _: {
|
|
xmonadConfig = final.callCabal2nix "xmonadConfig" ./. {};
|
|
});
|
|
});
|
|
};
|
|
|
|
overlays = [
|
|
overlay
|
|
xmonad.overlay
|
|
xmonad-contrib.overlay
|
|
xmobar.overlay
|
|
];
|
|
in
|
|
flake-utils.lib.eachDefaultSystem (system: let
|
|
pkgs = import nixpkgs {
|
|
inherit system overlays;
|
|
config.allowBroken = true;
|
|
};
|
|
in {
|
|
devShells.default = pkgs.haskellPackages.shellFor {
|
|
packages = p: [p.xmonadConfig];
|
|
buildInputs = with pkgs.haskellPackages;
|
|
[
|
|
cabal-fmt
|
|
cabal-install
|
|
ghcid
|
|
haskell-language-server
|
|
hlint
|
|
implicit-hie
|
|
stylish-haskell
|
|
]
|
|
++ (with pkgs; [
|
|
alejandra
|
|
zlib
|
|
]);
|
|
};
|
|
|
|
packages.default = pkgs.haskellPackages.xmonadConfig;
|
|
})
|
|
// {
|
|
inherit overlays overlay;
|
|
};
|
|
}
|