aboutsummaryrefslogtreecommitdiffhomepage
path: root/default.nix
diff options
context:
space:
mode:
authorFrédéric Menou <frederic.menou@fretlink.com>2016-12-08 10:19:15 +0200
committerIsmaël Bouya <ismael.bouya@fretlink.com>2022-05-17 18:01:51 +0200
commita9d77a20008efe82862cc1adbfa7a6d4f09f8ff7 (patch)
treeadf3186fdccaeef19151026cdfbd38a530cf9ecb /default.nix
downloadedi-parser-a9d77a20008efe82862cc1adbfa7a6d4f09f8ff7.tar.gz
edi-parser-a9d77a20008efe82862cc1adbfa7a6d4f09f8ff7.tar.zst
edi-parser-a9d77a20008efe82862cc1adbfa7a6d4f09f8ff7.zip
Release code as open sourceHEADmaster
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix63
1 files changed, 63 insertions, 0 deletions
diff --git a/default.nix b/default.nix
new file mode 100644
index 0000000..465f90f
--- /dev/null
+++ b/default.nix
@@ -0,0 +1,63 @@
1{ pkgs ? import <nixpkgs> { overlays = []; } }:
2
3with pkgs;
4let
5 stack = stdenv.mkDerivation rec {
6 name = "stack-${version}";
7 version = "2.3.3";
8 src = fetchurl {
9 url = "https://github.com/commercialhaskell/stack/releases/download/v${version}/stack-${version}-linux-x86_64.tar.gz";
10 sha256 = "1gm2llfwhal5ds6s21066mpr0lg4090rbaicn671dsn7v5srqcp7";
11 };
12 nativeBuildInputs = [ autoPatchelfHook ];
13 buildInputs = [
14 gmp
15 zlib
16 ];
17 dontFixup = true;
18 unpackPhase = ''
19 tar -xf $src
20 '';
21 installPhase = ''
22 mkdir -p $out/bin
23 cp -r stack-${version}-linux-x86_64/stack $out/bin
24 '';
25 };
26 stylish-haskell = stdenv.mkDerivation rec {
27 name = "stylish-haskell-${version}";
28 version = "0.12.2.0";
29 nativeBuildInputs = [ autoPatchelfHook ];
30 buildInputs = [];
31 src = fetchurl {
32 url = "https://github.com/jaspervdj/stylish-haskell/releases/download/v${version}/stylish-haskell-v${version}-linux-x86_64.tar.gz";
33 sha256 = "1v7r2vm3q9xn9xdwmmx2b9yl0a9x0101mni1ipd2k3ph5x3pf3gm";
34 };
35 unpackPhase = ''
36 tar -xzf $src
37 '';
38 installPhase = ''
39 mkdir -p $out/bin
40 cp -r stylish-haskell-v${version}-linux-x86_64/stylish-haskell $out/bin
41 '';
42 };
43 hlint = stdenv.mkDerivation rec {
44 name = "hlint-${version}";
45 version = "2.2.1";
46 nativeBuildInputs = [ autoPatchelfHook ];
47 buildInputs = [ gmp ncurses5 ];
48 src = fetchurl {
49 url = "https://github.com/ndmitchell/hlint/releases/download/v${version}/hlint-${version}-x86_64-linux.tar.gz";
50 sha256 = "03ipgynd4vkcm89nzgzd10m6k4rr5fsnk93zgv7d7d9lhy6y7vhg";
51 };
52 unpackPhase = ''
53 tar -xf $src
54 '';
55 installPhase = ''
56 mkdir -p $out/bin
57 cp -r hlint-${version}/* $out/bin/
58 '';
59 };
60in
61{
62 inherit shellcheck git stack stylish-haskell hlint;
63}