From 49f1d6b3acece70f886e3d52f7a8cb336b7f3f63 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Mon, 22 Nov 2021 00:46:38 +0300 Subject: Making progress --- flake.nix | 57 ++++++++++++++++++++++++--------------------------------- 1 file changed, 24 insertions(+), 33 deletions(-) (limited to 'flake.nix') 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; + }; } -- cgit 1.4.1