Skip to content
Snippets Groups Projects
Commit 100d784d authored by Daniel Firth's avatar Daniel Firth
Browse files

add horizon-shell devshell

parent 1f724d47
No related merge requests found
...@@ -31,22 +31,32 @@ This package set has the following policy. ...@@ -31,22 +31,32 @@ This package set has the following policy.
## Updating the package set ## Updating the package set
The package set is generated from the `horizon.dhall` using the following command: The package set is generated from the `horizon.dhall`. You can edit this in one
of two ways: manually using a text edit, or programatically using
`horizon-shell`.
### Manual
Edit the `horizon.dhall` file and add or change some package data.
Run `horizon-gen-nix` from the remote repository.
``` ```
nix run 'git+https://gitlab.horizon-haskell.net/haskell/horizon-gen-nix?ref=refs/tags/0.10.0' nix run 'git+https://gitlab.horizon-haskell.net/haskell/horizon-gen-nix?ref=refs/tags/0.10.0'
``` ```
If you need to do additional manual overrides to the nix code, such as ### Programatic
`addPkgconfigDepends`, edit the `configuration.nix` overlay, which is applied
afterwards.
## Programmmatic Updates
To use `horizon-shell`. To use `horizon-shell`.
``` ```
nix run 'git+https://gitlab.horizon-haskell.net/shells/horizon-shell?ref=refs/tags/0.0.7' nix develop
``` ```
See the in-shell help for usage. See the in-shell help for usage.
### Tweaking
If you need to do additional manual overrides to the nix code, such as
`addPkgconfigDepends`, edit the `configuration/common.nix` overlay, which is
applied last.
...@@ -33,6 +33,37 @@ ...@@ -33,6 +33,37 @@
"type": "github" "type": "github"
} }
}, },
"get-flake": {
"locked": {
"lastModified": 1673819588,
"narHash": "sha256-gRtwKAlu4htvS6dxyZnW3n+vMS1acqnMGVHqxUdETeY=",
"owner": "ursi",
"repo": "get-flake",
"rev": "e0917b6f564aa5acefb1484b5baf76da21746c3c",
"type": "github"
},
"original": {
"owner": "ursi",
"repo": "get-flake",
"type": "github"
}
},
"horizon-shell-flake": {
"flake": false,
"locked": {
"lastModified": 1679341258,
"narHash": "sha256-iVB9GSar0Varbxi0ed98S/1mqXfqcATGpeENOFcjv98=",
"ref": "refs/heads/master",
"rev": "c6b62503082814851d3a78fc64b80c4fd02cb290",
"revCount": 18,
"type": "git",
"url": "https://gitlab.horizon-haskell.net/shells/horizon-shell"
},
"original": {
"type": "git",
"url": "https://gitlab.horizon-haskell.net/shells/horizon-shell"
}
},
"lint-utils": { "lint-utils": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
...@@ -105,6 +136,8 @@ ...@@ -105,6 +136,8 @@
"root": { "root": {
"inputs": { "inputs": {
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"get-flake": "get-flake",
"horizon-shell-flake": "horizon-shell-flake",
"lint-utils": "lint-utils", "lint-utils": "lint-utils",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
} }
......
...@@ -8,7 +8,12 @@ ...@@ -8,7 +8,12 @@
}; };
inputs = { inputs = {
get-flake.url = "github:ursi/get-flake";
flake-parts.url = "github:hercules-ci/flake-parts"; flake-parts.url = "github:hercules-ci/flake-parts";
horizon-shell-flake = {
url = "git+https://gitlab.horizon-haskell.net/shells/horizon-shell";
flake = false;
};
lint-utils.url = "git+https://gitlab.homotopic.tech/nix/lint-utils"; lint-utils.url = "git+https://gitlab.homotopic.tech/nix/lint-utils";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
}; };
...@@ -16,7 +21,9 @@ ...@@ -16,7 +21,9 @@
outputs = outputs =
inputs@ inputs@
{ self { self
, get-flake
, flake-parts , flake-parts
, horizon-shell-flake
, lint-utils , lint-utils
, nixpkgs , nixpkgs
, ... , ...
...@@ -27,6 +34,8 @@ ...@@ -27,6 +34,8 @@
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
horizon-shell = get-flake horizon-shell-flake;
haskellLib = pkgs.haskell.lib.compose; haskellLib = pkgs.haskell.lib.compose;
legacyPackages = pkgs.callPackage (nixpkgs + /pkgs/development/haskell-modules) { legacyPackages = pkgs.callPackage (nixpkgs + /pkgs/development/haskell-modules) {
...@@ -50,6 +59,16 @@ ...@@ -50,6 +59,16 @@
&& v.meta.broken == false) && v.meta.broken == false)
legacyPackages; legacyPackages;
devShell = pkgs.mkShell {
buildInputs = [
horizon-shell.packages.${system}.default
];
shellHook = ''
horizon-shell
exit
'';
};
in in
{ {
...@@ -58,6 +77,8 @@ ...@@ -58,6 +77,8 @@
nixpkgs-fmt = nixpkgs-fmt { src = self; find = "flake.nix"; }; nixpkgs-fmt = nixpkgs-fmt { src = self; find = "flake.nix"; };
}; };
devShells.default = devShell;
inherit legacyPackages; inherit legacyPackages;
inherit packages; inherit packages;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment