mirror of
https://github.com/xmonad/xmonad.git
synced 2025-07-25 17:21:52 -07:00
Add a flake.nix file
This commit is contained in:
committed by
Tomas Janousek
parent
f1d6316526
commit
71af4239bd
26
flake.nix
Normal file
26
flake.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
inputs = {
|
||||
flake-utils.url = github:numtide/flake-utils;
|
||||
git-ignore-nix.url = github:IvanMalison/gitignore.nix/master;
|
||||
};
|
||||
outputs = { self, flake-utils, nixpkgs, git-ignore-nix }:
|
||||
let
|
||||
overlay = final: prev: {
|
||||
haskellPackages = prev.haskellPackages.override (old: {
|
||||
overrides = prev.lib.composeExtensions (old.overrides or (_: _: {}))
|
||||
(hself: hsuper: {
|
||||
xmonad = hself.callCabal2nix "xmonad" (git-ignore-nix.gitIgnoreSource ./.) { };
|
||||
});
|
||||
});
|
||||
};
|
||||
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 ];
|
||||
};
|
||||
defaultPackage = pkgs.haskellPackages.xmonad;
|
||||
}) // { inherit overlay overlays; } ;
|
||||
}
|
Reference in New Issue
Block a user