diff options
author | Azat Bahawi <azahi@teknik.io> | 2021-11-22 00:46:38 +0300 |
---|---|---|
committer | Azat Bahawi <azahi@teknik.io> | 2021-11-22 00:46:38 +0300 |
commit | 49f1d6b3acece70f886e3d52f7a8cb336b7f3f63 (patch) | |
tree | 9dd71b3db9df8b6c0d26a6e2d2e68cb3048df341 /flake.nix | |
parent | Whoops (diff) |
Making progress
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 57 |
1 files changed, 24 insertions, 33 deletions
diff --git a/flake.nix b/flake.nix index 6d8dda1..1fb71dc 100644 --- a/flake.nix +++ b/flake.nix @@ -1,43 +1,34 @@ { description = "Personal XMonad configuration."; - inputs = { - haskell-nix.url = "github:input-output-hk/haskell.nix"; - nixpkgs.follows = "haskell-nix/nixpkgs-unstable"; - flake-utils.follows = "haskell-nix/flake-utils"; + inputs.nixpkgs = { + type = "github"; + owner = "NixOS"; + repo = "nixpkgs"; + ref = "nixpkgs-unstable"; }; - outputs = { nixpkgs, flake-utils, haskell-nix, ... }: - flake-utils.lib.eachDefaultSystem (system: - let - pkgs = import nixpkgs { - inherit system overlays; - inherit (haskell-nix) config; - }; - overlays = [ - haskell-nix.overlay - (final: _: { - xmonad-ng = final.haskell-nix.project' { - src = ./.; - - compiler-nix-name = "ghc8107"; + outputs = { nixpkgs, ... }: + let + system = "x86_64-linux"; - shell = { - tools = { - brittany = { }; - cabal = { }; - haskell-language-server = { }; - hlint = { }; - }; + pkgs = import nixpkgs { inherit system; }; - buildInputs = with pkgs; [ nixfmt ]; - }; + project = returnShellEnv: + pkgs.haskellPackages.developPackage { + inherit returnShellEnv; + name = "xmonad-ng"; + root = ./.; + withHoogle = false; + overrides = self: super: + with pkgs.haskell.lib; + { + # TODO Override xmobar. }; - }) - ]; + }; + in { + defaultPackage.${system} = project false; - flake = pkgs.xmonad-ng.flake { }; - in flake // { - defaultPackage = flake.packages."xmonad-ng:exe:xmonad-ng"; - }); + devShell.${system} = project true; + }; } |