49 lines
1.3 KiB
Nix
49 lines
1.3 KiB
Nix
{
|
|
description = "Build my xmonad config";
|
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
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" ./. {};
|
|
xmonad = hprev.xmonad_0_18_0;
|
|
xmonad-contrib = hprev.xmonad-contrib_0_18_1;
|
|
};
|
|
};
|
|
});
|
|
in {
|
|
formatter = forAllSystems ({pkgs, ...}: pkgs.alejandra);
|
|
packages = forAllSystems ({hsPkgs, ...}: {
|
|
default = hsPkgs.xmonad-config;
|
|
});
|
|
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
|
|
];
|
|
};
|
|
});
|
|
};
|
|
}
|