-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathflake.nix
49 lines (44 loc) · 1.47 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
# I used chatgpt to generate this template and then just
# modified to how I normally use these things.
{
description = "My Haskell project";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};
outputs = { self, nixpkgs, flake-compat }:
let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
hpkgs = pkgs.haskellPackages.override {
overrides = hnew: hold: {
mysql-haskell = hnew.callCabal2nix "mysql-haskell" ./. { };
# untill they figure out how to compile the test suite
crypton-x509 = pkgs.haskell.lib.markUnbroken (pkgs.haskell.lib.dontCheck hold.crypton-x509);
# need to override untill nixpkgs merges in the new tls
# do to the cryptonite/crypton clusterfuck
tls = (hold.callHackageDirect {
pkg = "tls";
ver = "1.7.1";
sha256 = "sha256-l8+Kgx7A8zg2tl64mC7t/S0gJNCS10fQ/2I65bTMpjY=";
} {});
};
};
in
{
defaultPackage.x86_64-linux = hpkgs.mysql-haskell;
inherit pkgs;
devShell.x86_64-linux = hpkgs.shellFor {
packages = ps : [ ps."mysql-haskell" ];
# TODO disabled untill crypton/crytponite clusterfuck is resolved
# withHoogle = true;
buildInputs = [
hpkgs.haskell-language-server
pkgs.ghcid
pkgs.cabal-install
];
};
};
}