-
Notifications
You must be signed in to change notification settings - Fork 14
/
flake.nix
47 lines (45 loc) · 1.35 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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils/main";
flake-compat = {
url = "github:edolstra/flake-compat/master";
flake = false;
};
};
description = "Interactively browse the dependency graph of your Nix derivations.";
outputs = { self, nixpkgs, flake-utils, ... }:
let
overlay = se: su: {
haskellPackages = su.haskellPackages.override {
overrides = hse: _hsu: {
"nix-tree" = hse.callCabal2nix "nix-tree" self { };
};
};
nix-tree =
se.haskell.lib.justStaticExecutables
se.haskellPackages.nix-tree;
};
in
{ inherit overlay; } // flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; overlays = [ overlay ]; };
in
{
defaultPackage = pkgs.nix-tree;
devShell = pkgs.haskellPackages.shellFor {
packages = p: [ p."nix-tree" ];
buildInputs = [
pkgs.haskellPackages.haskell-language-server
pkgs.haskellPackages.cabal-install
pkgs.haskellPackages.ghcid
pkgs.haskellPackages.ormolu
pkgs.haskellPackages.hlint
pkgs.nixpkgs-fmt
pkgs.bash
];
withHoogle = false;
};
}
);
}