{ description = "Personal XMonad configuration."; inputs = { nixpkgs = { type = "github"; owner = "NixOS"; repo = "nixpkgs"; ref = "nixpkgs-unstable"; }; flake-utils = { type = "github"; owner = "numtide"; repo = "flake-utils"; ref = "master"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = inputs: with inputs; let name = "xmonad-ng"; in flake-utils.lib.eachSystem ["x86_64-linux"] (system: let pkgs = import nixpkgs {inherit system;}; haskellPackages = pkgs.haskellPackages.override { overrides = _: super: { ${name} = with pkgs.haskell.lib; justStaticExecutables ( failOnAllWarnings ( disableExecutableProfiling ( disableLibraryProfiling ( (pkgs.haskellPackages.developPackage { inherit name; root = inputs.self; }) .overrideAttrs (_: _: { postInstall = '' rm -rf $out/share ''; }) ) ) ) ); }; }; in { packages.default = haskellPackages.${name}; devShells.default = with haskellPackages; shellFor { nativeBuildInputs = [ brittany cabal-install haskell-language-server hpack stack ]; packages = p: [p.${name}]; }; formatter = pkgs.alejandra; }) // { overlays.default = final: prev: { # TODO Figure out how to generalise the system here. ${name} = packages.default."x86_64-linux"; }; }; }