Refactor Nix flake inputs
This commit is contained in:
parent
97a4f1c359
commit
b9e2e59174
24
flake.nix
24
flake.nix
@ -12,19 +12,11 @@
|
|||||||
hs-bindgen.url = "github:well-typed/hs-bindgen/release-0.1-alpha";
|
hs-bindgen.url = "github:well-typed/hs-bindgen/release-0.1-alpha";
|
||||||
};
|
};
|
||||||
outputs =
|
outputs =
|
||||||
{ self
|
inputs@{ nixpkgs, ... }:
|
||||||
, nixpkgs
|
inputs.flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
|
||||||
, flake-utils
|
|
||||||
, haskellNix
|
|
||||||
, hls-2-13
|
|
||||||
, crane
|
|
||||||
, rust-overlay
|
|
||||||
, hs-bindgen
|
|
||||||
}:
|
|
||||||
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
|
|
||||||
let
|
let
|
||||||
overlays = [
|
overlays = [
|
||||||
haskellNix.overlay
|
inputs.haskellNix.overlay
|
||||||
(final: _prev: {
|
(final: _prev: {
|
||||||
hixProject =
|
hixProject =
|
||||||
final.haskell-nix.hix.project {
|
final.haskell-nix.hix.project {
|
||||||
@ -35,18 +27,18 @@
|
|||||||
shell.tools.cabal = "latest";
|
shell.tools.cabal = "latest";
|
||||||
shell.withHoogle = false;
|
shell.withHoogle = false;
|
||||||
shell.tools.haskell-language-server = {
|
shell.tools.haskell-language-server = {
|
||||||
src = hls-2-13;
|
src = inputs.hls-2-13;
|
||||||
sha256map = {
|
sha256map = {
|
||||||
"https://github.com/snowleopard/alga"."d4e43fb42db05413459fb2df493361d5a666588a" = "0s1mlnl64wj7pkg3iipv5bb4syy3bhxwqzqv93zqlvkyfn64015i";
|
"https://github.com/snowleopard/alga"."d4e43fb42db05413459fb2df493361d5a666588a" = "0s1mlnl64wj7pkg3iipv5bb4syy3bhxwqzqv93zqlvkyfn64015i";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
(import rust-overlay)
|
(import inputs.rust-overlay)
|
||||||
];
|
];
|
||||||
pkgs = import nixpkgs { inherit system overlays; inherit (haskellNix) config; };
|
pkgs = import nixpkgs { inherit system overlays; inherit (inputs.haskellNix) config; };
|
||||||
haskell = pkgs.hixProject.flake { };
|
haskell = pkgs.hixProject.flake { };
|
||||||
rust = (crane.mkLib pkgs).overrideToolchain (p: p.rust-bin.selectLatestNightlyWith (
|
rust = (inputs.crane.mkLib pkgs).overrideToolchain (p: p.rust-bin.selectLatestNightlyWith (
|
||||||
toolchain: toolchain.default.override {
|
toolchain: toolchain.default.override {
|
||||||
extensions = [ "rust-src" ];
|
extensions = [ "rust-src" ];
|
||||||
targets = [ "x86_64-unknown-linux-gnu" ];
|
targets = [ "x86_64-unknown-linux-gnu" ];
|
||||||
@ -62,7 +54,7 @@
|
|||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
bacon
|
bacon
|
||||||
ghcid
|
ghcid
|
||||||
hs-bindgen.packages.${system}.hs-bindgen-cli
|
inputs.hs-bindgen.packages.${system}.hs-bindgen-cli
|
||||||
rust-analyzer
|
rust-analyzer
|
||||||
rust-cbindgen
|
rust-cbindgen
|
||||||
];
|
];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user