Simplify devShell composition using inputsFrom
(#99)
This commit is contained in:
parent
60f6d56bb5
commit
7820548927
2 changed files with 23 additions and 14 deletions
18
flake.lock
generated
18
flake.lock
generated
|
@ -20,11 +20,11 @@
|
||||||
},
|
},
|
||||||
"flake-root": {
|
"flake-root": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1671378805,
|
"lastModified": 1680210152,
|
||||||
"narHash": "sha256-yqGxyzMN2GuppwG3dTWD1oiKxi+jGYP7D1qUSc5vKhI=",
|
"narHash": "sha256-VgFdqsu2i2oUcId9n8BFlRRc4GJHFvrmprdamcSZR1o=",
|
||||||
"owner": "srid",
|
"owner": "srid",
|
||||||
"repo": "flake-root",
|
"repo": "flake-root",
|
||||||
"rev": "dc7ba6166e478804a9da6881aa48c45d300075cf",
|
"rev": "6000244701c8ae8cf43263564095fd357d89c328",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -35,11 +35,11 @@
|
||||||
},
|
},
|
||||||
"haskell-flake": {
|
"haskell-flake": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1679690126,
|
"lastModified": 1680963459,
|
||||||
"narHash": "sha256-u6pQejlTLC1QSKLMB/8Ch+2VvgILlxuZsBHAbDn0zHM=",
|
"narHash": "sha256-amqQMQi8D8dACHR717LcZ3X51Vg4UJqHtlQLJbCjV8c=",
|
||||||
"owner": "srid",
|
"owner": "srid",
|
||||||
"repo": "haskell-flake",
|
"repo": "haskell-flake",
|
||||||
"rev": "d63943b612dbe30e2aba8aab0e60f1011c369973",
|
"rev": "c74e7c596792e0baf5cd22a9fd0f213e05679b7a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -50,11 +50,11 @@
|
||||||
},
|
},
|
||||||
"mission-control": {
|
"mission-control": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1679674077,
|
"lastModified": 1680209746,
|
||||||
"narHash": "sha256-hGz63fsyRGthjE6LLqB08IHApcBvHhI87gWrFN/Uu5w=",
|
"narHash": "sha256-P8Q0mPdeo2SvKQUejvl7nOKO2ahIXb6aintYofCxcP8=",
|
||||||
"owner": "Platonic-Systems",
|
"owner": "Platonic-Systems",
|
||||||
"repo": "mission-control",
|
"repo": "mission-control",
|
||||||
"rev": "d07854a616f559370b71c1c440d916ab6869f084",
|
"rev": "c1bd7344283d4006efb02cc660c5fd9befb73980",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
19
flake.nix
19
flake.nix
|
@ -20,9 +20,10 @@
|
||||||
inputs.mission-control.flakeModule
|
inputs.mission-control.flakeModule
|
||||||
];
|
];
|
||||||
perSystem = { self', system, lib, config, pkgs, ... }: {
|
perSystem = { self', system, lib, config, pkgs, ... }: {
|
||||||
# The "main" project. You can have multiple projects, but this template
|
# Our only Haskell project. You can have multiple projects, but this template
|
||||||
# has only one.
|
# has only one.
|
||||||
haskellProjects.main = {
|
# See https://github.com/srid/haskell-flake/blob/master/example/flake.nix
|
||||||
|
haskellProjects.default = {
|
||||||
# packages.haskell-template.root = ./.; # Auto-discovered by haskell-flake
|
# packages.haskell-template.root = ./.; # Auto-discovered by haskell-flake
|
||||||
overrides = self: super: { };
|
overrides = self: super: { };
|
||||||
devShell = {
|
devShell = {
|
||||||
|
@ -31,6 +32,7 @@
|
||||||
} // config.treefmt.build.programs;
|
} // config.treefmt.build.programs;
|
||||||
hlsCheck.enable = true;
|
hlsCheck.enable = true;
|
||||||
};
|
};
|
||||||
|
autoWire = false; # Enables us to wire flake outputs manually.
|
||||||
};
|
};
|
||||||
|
|
||||||
# Auto formatters. This also adds a flake check to ensure that the
|
# Auto formatters. This also adds a flake check to ensure that the
|
||||||
|
@ -87,11 +89,18 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# Default package.
|
# Default package.
|
||||||
packages.default = self'.packages.main-haskell-template;
|
packages.default = config.haskellProjects.default.outputs.localPackages.haskell-template;
|
||||||
|
|
||||||
|
checks = config.haskellProjects.default.outputs.checks;
|
||||||
|
|
||||||
# Default shell.
|
# Default shell.
|
||||||
devShells.default =
|
devShells.default = pkgs.mkShell {
|
||||||
config.mission-control.installToDevShell self'.devShells.main;
|
inputsFrom = [
|
||||||
|
config.haskellProjects.default.outputs.devShell
|
||||||
|
config.flake-root.devShell
|
||||||
|
config.mission-control.devShell
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue