diff --git a/flake.lock b/flake.lock index 020a03f..af75680 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ }, "flake-root": { "locked": { - "lastModified": 1671295174, - "narHash": "sha256-5K+wdsB5TYSmI6HeexOMvJTZTBdXb9RbiFwXRtQkE3M=", + "lastModified": 1671378805, + "narHash": "sha256-yqGxyzMN2GuppwG3dTWD1oiKxi+jGYP7D1qUSc5vKhI=", "owner": "srid", "repo": "flake-root", - "rev": "bb96b89f65d7c47457303f2385798a09f4a1dd5a", + "rev": "dc7ba6166e478804a9da6881aa48c45d300075cf", "type": "github" }, "original": { @@ -50,14 +50,14 @@ }, "mission-control": { "inputs": { - "flake-root": "flake-root" + "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1671297603, - "narHash": "sha256-0fotrPbgV4WyJwh9RZ/eSWALMeAKr+n3JCQZU130BLI=", + "lastModified": 1671388575, + "narHash": "sha256-UgWIv5iXW9xh1L20G4eh4wocLSGzjsdz5U/jJZhb60A=", "owner": "Platonic-Systems", "repo": "mission-control", - "rev": "ede1ce90f17223f32ae21f2b12b8c26fd95a707e", + "rev": "4b4370280cca1070eb6c2571df645aa36e3abdaf", "type": "github" }, "original": { @@ -68,11 +68,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1670148586, - "narHash": "sha256-EcDfOiTHs0UBAtyGc0wxJJdhcMjrJEgWXjJutxZGA3E=", + "lastModified": 1671249438, + "narHash": "sha256-5e+CcnbZA3/i2BRXbnzRS52Ly67MUNdZR+Zpbb2C65k=", "owner": "nixos", "repo": "nixpkgs", - "rev": "a2d2f70b82ada0eadbcb1df2bca32d841a3c1bf1", + "rev": "067bfc6c90a301572cec7da48f09c447a9a8eae0", "type": "github" }, "original": { @@ -100,12 +100,29 @@ "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1670148586, + "narHash": "sha256-EcDfOiTHs0UBAtyGc0wxJJdhcMjrJEgWXjJutxZGA3E=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "a2d2f70b82ada0eadbcb1df2bca32d841a3c1bf1", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "flake-parts": "flake-parts", + "flake-root": "flake-root", "haskell-flake": "haskell-flake", "mission-control": "mission-control", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "treefmt-flake": "treefmt-flake" } }, diff --git a/flake.nix b/flake.nix index ace6c83..ced42d4 100644 --- a/flake.nix +++ b/flake.nix @@ -5,6 +5,7 @@ flake-parts.url = "github:hercules-ci/flake-parts"; haskell-flake.url = "github:srid/haskell-flake"; treefmt-flake.url = "github:srid/treefmt-flake"; + flake-root.url = "github:srid/flake-root"; mission-control.url = "github:Platonic-Systems/mission-control"; }; @@ -14,10 +15,12 @@ imports = [ inputs.haskell-flake.flakeModule inputs.treefmt-flake.flakeModule + inputs.flake-root.flakeModule inputs.mission-control.flakeModule ]; perSystem = { self', lib, config, pkgs, ... }: { - # The "main" project. You can have multiple projects, but this template has only one. + # The "main" project. You can have multiple projects, but this template + # has only one. haskellProjects.main = { packages = { haskell-template.root = ./.; @@ -27,6 +30,9 @@ hlsCheck.enable = true; hlintCheck.enable = true; }; + + # Auto formatters. This also adds a flake check to ensure that the + # source tree was auto formatted. treefmt.formatters = { inherit (pkgs) nixpkgs-fmt; @@ -34,6 +40,8 @@ cabal-fmt fourmolu; }; + + # Dev shell scripts. mission-control.scripts = { docs = { description = "Start Hoogle server for project dependencies"; @@ -63,9 +71,13 @@ category = "Primary"; }; }; + + # Default package. packages.default = self'.packages.main-haskell-template; + + # Default shell. devShells.default = - config.mission-control.installToDevShell config.devShells.main; + config.mission-control.installToDevShell self'.devShells.main; }; }; }