Created
July 7, 2022 14:42
-
-
Save luochen1990/2fec87b6c5f2a55efa4e4163e0e05630 to your computer and use it in GitHub Desktop.
An easy Haskell develop environment (useage: nix develop)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | |
inputs.flake-utils.url = "github:numtide/flake-utils"; | |
outputs = { self, nixpkgs, flake-utils }: | |
flake-utils.lib.eachDefaultSystem (system: | |
let | |
pkgs = nixpkgs.legacyPackages.${system}; | |
hpkgs = pkgs.haskell.packages.ghc923; | |
in rec { | |
defaultPackage = hpkgs.callCabal2nix "haskell-dev" ./. { }; | |
devShell = pkgs.haskell.lib.addBuildTools defaultPackage | |
(with hpkgs; [ haskell-language-server cabal-install ]); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment