nix: Update mission-control

Add flake-root as dependency. Improve comments.
This commit is contained in:
Sridhar Ratnakumar 2022-12-19 09:27:56 -05:00
parent fb9634b22b
commit ee4c430c12
2 changed files with 42 additions and 13 deletions

39
flake.lock generated
View file

@ -20,11 +20,11 @@
}, },
"flake-root": { "flake-root": {
"locked": { "locked": {
"lastModified": 1671295174, "lastModified": 1671378805,
"narHash": "sha256-5K+wdsB5TYSmI6HeexOMvJTZTBdXb9RbiFwXRtQkE3M=", "narHash": "sha256-yqGxyzMN2GuppwG3dTWD1oiKxi+jGYP7D1qUSc5vKhI=",
"owner": "srid", "owner": "srid",
"repo": "flake-root", "repo": "flake-root",
"rev": "bb96b89f65d7c47457303f2385798a09f4a1dd5a", "rev": "dc7ba6166e478804a9da6881aa48c45d300075cf",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -50,14 +50,14 @@
}, },
"mission-control": { "mission-control": {
"inputs": { "inputs": {
"flake-root": "flake-root" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1671297603, "lastModified": 1671388575,
"narHash": "sha256-0fotrPbgV4WyJwh9RZ/eSWALMeAKr+n3JCQZU130BLI=", "narHash": "sha256-UgWIv5iXW9xh1L20G4eh4wocLSGzjsdz5U/jJZhb60A=",
"owner": "Platonic-Systems", "owner": "Platonic-Systems",
"repo": "mission-control", "repo": "mission-control",
"rev": "ede1ce90f17223f32ae21f2b12b8c26fd95a707e", "rev": "4b4370280cca1070eb6c2571df645aa36e3abdaf",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -68,11 +68,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1670148586, "lastModified": 1671249438,
"narHash": "sha256-EcDfOiTHs0UBAtyGc0wxJJdhcMjrJEgWXjJutxZGA3E=", "narHash": "sha256-5e+CcnbZA3/i2BRXbnzRS52Ly67MUNdZR+Zpbb2C65k=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a2d2f70b82ada0eadbcb1df2bca32d841a3c1bf1", "rev": "067bfc6c90a301572cec7da48f09c447a9a8eae0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -100,12 +100,29 @@
"type": "github" "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": { "root": {
"inputs": { "inputs": {
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"flake-root": "flake-root",
"haskell-flake": "haskell-flake", "haskell-flake": "haskell-flake",
"mission-control": "mission-control", "mission-control": "mission-control",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs_2",
"treefmt-flake": "treefmt-flake" "treefmt-flake": "treefmt-flake"
} }
}, },

View file

@ -5,6 +5,7 @@
flake-parts.url = "github:hercules-ci/flake-parts"; flake-parts.url = "github:hercules-ci/flake-parts";
haskell-flake.url = "github:srid/haskell-flake"; haskell-flake.url = "github:srid/haskell-flake";
treefmt-flake.url = "github:srid/treefmt-flake"; treefmt-flake.url = "github:srid/treefmt-flake";
flake-root.url = "github:srid/flake-root";
mission-control.url = "github:Platonic-Systems/mission-control"; mission-control.url = "github:Platonic-Systems/mission-control";
}; };
@ -14,10 +15,12 @@
imports = [ imports = [
inputs.haskell-flake.flakeModule inputs.haskell-flake.flakeModule
inputs.treefmt-flake.flakeModule inputs.treefmt-flake.flakeModule
inputs.flake-root.flakeModule
inputs.mission-control.flakeModule inputs.mission-control.flakeModule
]; ];
perSystem = { self', lib, config, pkgs, ... }: { 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 = { haskellProjects.main = {
packages = { packages = {
haskell-template.root = ./.; haskell-template.root = ./.;
@ -27,6 +30,9 @@
hlsCheck.enable = true; hlsCheck.enable = true;
hlintCheck.enable = true; hlintCheck.enable = true;
}; };
# Auto formatters. This also adds a flake check to ensure that the
# source tree was auto formatted.
treefmt.formatters = { treefmt.formatters = {
inherit (pkgs) inherit (pkgs)
nixpkgs-fmt; nixpkgs-fmt;
@ -34,6 +40,8 @@
cabal-fmt cabal-fmt
fourmolu; fourmolu;
}; };
# Dev shell scripts.
mission-control.scripts = { mission-control.scripts = {
docs = { docs = {
description = "Start Hoogle server for project dependencies"; description = "Start Hoogle server for project dependencies";
@ -63,9 +71,13 @@
category = "Primary"; category = "Primary";
}; };
}; };
# Default package.
packages.default = self'.packages.main-haskell-template; packages.default = self'.packages.main-haskell-template;
# Default shell.
devShells.default = devShells.default =
config.mission-control.installToDevShell config.devShells.main; config.mission-control.installToDevShell self'.devShells.main;
}; };
}; };
} }