xmonad-contrib/flake.nix
Ivan Malison 7402a7c250 Use "nix develop -c cabal v2-build -O0" to speed up the workflow
With "nix build", just the build of xmonad-contrib itself takes 3
minutes (it builds twice, the second build with profiling enabled), so
it ends up being almost 6 minutes in total, making this workflow the
slowest one.
2021-08-09 10:50:10 +01:00

31 lines
1.0 KiB
Nix

# This file is maintained by @IvanMalison (github)
{
inputs = {
flake-utils.url = github:numtide/flake-utils;
git-ignore-nix.url = github:IvanMalison/gitignore.nix/master;
xmonad.url = github:xmonad/xmonad;
};
outputs = { self, flake-utils, nixpkgs, git-ignore-nix, xmonad }:
let
overlay = final: prev: {
haskellPackages = prev.haskellPackages.override (old: {
overrides = prev.lib.composeExtensions (old.overrides or (_: _: {}))
(hself: hsuper: {
xmonad-contrib =
hself.callCabal2nix "xmonad-contrib" (git-ignore-nix.gitIgnoreSource ./.) { };
});
});
};
overlays = xmonad.overlays ++ [ overlay ];
in flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system overlays; };
in
rec {
devShell = pkgs.haskellPackages.shellFor {
packages = p: [ p.xmonad-contrib ];
nativeBuildInputs = [ pkgs.cabal-install ];
};
defaultPackage = pkgs.haskellPackages.xmonad-contrib;
}) // { inherit overlay overlays; } ;
}