-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdefault.nix
63 lines (62 loc) · 1.85 KB
/
default.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
56
57
58
59
60
61
62
63
{ pkgs ? import <nixpkgs> { overlays = []; } }:
with pkgs;
let
stack = stdenv.mkDerivation rec {
name = "stack-${version}";
version = "2.3.3";
src = fetchurl {
url = "https://github.com/commercialhaskell/stack/releases/download/v${version}/stack-${version}-linux-x86_64.tar.gz";
sha256 = "1gm2llfwhal5ds6s21066mpr0lg4090rbaicn671dsn7v5srqcp7";
};
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [
gmp
zlib
];
dontFixup = true;
unpackPhase = ''
tar -xf $src
'';
installPhase = ''
mkdir -p $out/bin
cp -r stack-${version}-linux-x86_64/stack $out/bin
'';
};
stylish-haskell = stdenv.mkDerivation rec {
name = "stylish-haskell-${version}";
version = "0.12.2.0";
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [];
src = fetchurl {
url = "https://github.com/jaspervdj/stylish-haskell/releases/download/v${version}/stylish-haskell-v${version}-linux-x86_64.tar.gz";
sha256 = "1v7r2vm3q9xn9xdwmmx2b9yl0a9x0101mni1ipd2k3ph5x3pf3gm";
};
unpackPhase = ''
tar -xzf $src
'';
installPhase = ''
mkdir -p $out/bin
cp -r stylish-haskell-v${version}-linux-x86_64/stylish-haskell $out/bin
'';
};
hlint = stdenv.mkDerivation rec {
name = "hlint-${version}";
version = "2.2.1";
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [ gmp ncurses5 ];
src = fetchurl {
url = "https://github.com/ndmitchell/hlint/releases/download/v${version}/hlint-${version}-x86_64-linux.tar.gz";
sha256 = "03ipgynd4vkcm89nzgzd10m6k4rr5fsnk93zgv7d7d9lhy6y7vhg";
};
unpackPhase = ''
tar -xf $src
'';
installPhase = ''
mkdir -p $out/bin
cp -r hlint-${version}/* $out/bin/
'';
};
in
{
inherit shellcheck git stack stylish-haskell hlint;
}