xmonad-config/flake.nix

50 lines
1.3 KiB
Nix
Raw Normal View History

2022-12-04 17:52:49 +01:00
{
description = "Build my xmonad config";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
2024-09-13 16:51:00 +02:00
outputs = {
self,
nixpkgs,
}: let
forAllSystems = function:
nixpkgs.lib.genAttrs ["x86_64-linux" "aarch64-linux"] (system:
function rec {
inherit system;
compilerVersion = "ghc966";
pkgs = nixpkgs.legacyPackages.${system};
hsPkgs = pkgs.haskell.packages.${compilerVersion}.override {
overrides = hfinal: hprev: {
# Internal Packages
xmonad-config = hfinal.callCabal2nix "xmonad-config" ./. {};
2025-01-01 13:06:37 +01:00
xmonad = hprev.xmonad_0_18_0;
xmonad-contrib = hprev.xmonad-contrib_0_18_1;
2024-09-13 16:51:00 +02:00
};
};
});
in {
formatter = forAllSystems ({pkgs, ...}: pkgs.alejandra);
2025-01-01 13:06:37 +01:00
packages = forAllSystems ({hsPkgs, ...}: {
2024-09-13 16:51:00 +02:00
default = hsPkgs.xmonad-config;
2025-01-01 13:06:37 +01:00
});
2024-09-13 16:51:00 +02:00
devShells = forAllSystems ({
hsPkgs,
pkgs,
...
}: {
default = hsPkgs.shellFor {
name = "xmonad-config";
packages = p: [
p.xmonad-config
];
buildInputs = with pkgs; [
hsPkgs.haskell-language-server
hsPkgs.cabal-install
cabal2nix
haskellPackages.ghcid
];
};
});
2022-12-04 17:52:49 +01:00
};
}