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";
|
||||
};
|
||||
outputs =
|
||||
{ self
|
||||
, nixpkgs
|
||||
, flake-utils
|
||||
, haskellNix
|
||||
, hls-2-13
|
||||
, crane
|
||||
, rust-overlay
|
||||
, hs-bindgen
|
||||
}:
|
||||
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
|
||||
inputs@{ nixpkgs, ... }:
|
||||
inputs.flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
|
||||
let
|
||||
overlays = [
|
||||
haskellNix.overlay
|
||||
inputs.haskellNix.overlay
|
||||
(final: _prev: {
|
||||
hixProject =
|
||||
final.haskell-nix.hix.project {
|
||||
@ -35,18 +27,18 @@
|
||||
shell.tools.cabal = "latest";
|
||||
shell.withHoogle = false;
|
||||
shell.tools.haskell-language-server = {
|
||||
src = hls-2-13;
|
||||
src = inputs.hls-2-13;
|
||||
sha256map = {
|
||||
"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 { };
|
||||
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 {
|
||||
extensions = [ "rust-src" ];
|
||||
targets = [ "x86_64-unknown-linux-gnu" ];
|
||||
@ -62,7 +54,7 @@
|
||||
packages = with pkgs; [
|
||||
bacon
|
||||
ghcid
|
||||
hs-bindgen.packages.${system}.hs-bindgen-cli
|
||||
inputs.hs-bindgen.packages.${system}.hs-bindgen-cli
|
||||
rust-analyzer
|
||||
rust-cbindgen
|
||||
];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user