add flake-haskell
This commit is contained in:
parent
d9db6faf24
commit
f72dd6a30e
3 changed files with 53 additions and 0 deletions
|
@ -12,6 +12,10 @@
|
|||
path = ./flakes/rust;
|
||||
description = "Flake to develop, build and run a rust application";
|
||||
};
|
||||
flake-haskell = {
|
||||
path = ./flakes/haskell;
|
||||
description = "Flake to develop haskell application";
|
||||
};
|
||||
flake-jupyter = {
|
||||
path = ./flakes/jupyter;
|
||||
description = "Flake to configure jupyter lab";
|
||||
|
|
1
flakes/haskell/.envrc
Normal file
1
flakes/haskell/.envrc
Normal file
|
@ -0,0 +1 @@
|
|||
use flake
|
48
flakes/haskell/flake.nix
Normal file
48
flakes/haskell/flake.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, utils }:
|
||||
utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
hPkgs = pkgs.haskellPackages;
|
||||
|
||||
stack-wrapped = pkgs.symlinkJoin {
|
||||
name = "stack";
|
||||
paths = [ pkgs.stack ];
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/stack \
|
||||
--add-flags "\
|
||||
--nix \
|
||||
--no-nix-pure \
|
||||
--no-install-ghc \
|
||||
--system-ghc \
|
||||
"
|
||||
'';
|
||||
};
|
||||
|
||||
myDevTools = with hPkgs; [
|
||||
ghc
|
||||
ghcid
|
||||
ormolu
|
||||
hlint
|
||||
hoogle
|
||||
haskell-language-server
|
||||
implicit-hie
|
||||
retrie
|
||||
stack-wrapped
|
||||
pkgs.zlib
|
||||
];
|
||||
in
|
||||
{
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = myDevTools;
|
||||
|
||||
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath myDevTools;
|
||||
};
|
||||
});
|
||||
}
|
Loading…
Reference in a new issue