-
Notifications
You must be signed in to change notification settings - Fork 17
/
flake.nix
55 lines (48 loc) · 1.49 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# SPDX-FileCopyrightText: 2021 Serokell <https://serokell.io/>
#
# SPDX-License-Identifier: CC0-1.0
{
description = "My haskell application";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (system: let
# pkgs = nixpkgs.legacyPackages.${system};
pkgs = import nixpkgs {
inherit system;
overlays = [
(import ./nix/overlays)
];
};
#haskellPackages = pkgs.haskell.packages.ghc963;
haskellPackages = pkgs.haskellPackages;
jailbreakUnbreak = pkg:
pkgs.haskell.lib.doJailbreak (pkg.overrideAttrs (_: {meta = {};}));
packageName = "static-ls";
in {
packages.${packageName} = pkgs.haskell.lib.dontCheck (haskellPackages.callCabal2nix packageName self rec {
# Dependency overrides go here
});
packages.default = self.packages.${system}.${packageName};
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
pkgs.haskell.packages.${pkgs.ghcVersion}.haskell-language-server # you must build it with your ghc to work
haskellPackages.fourmolu
haskellPackages.hiedb
sqlite
ghcid
cabal-install
hpack
alejandra
];
inputsFrom = [self.packages.${system}.${packageName}.env];
shellHook = "PS1=\"[static-ls:\\w]$ \"";
};
});
}