-
Notifications
You must be signed in to change notification settings - Fork 11
/
derivations.nix
63 lines (56 loc) · 1.86 KB
/
derivations.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
{ callPackage, fetchzip, lib, stdenv
# Optional override for the HLS binaries to support specific GHC versions.
, ghcVersions ? [
"8.6.5"
"8.8.3"
"8.8.4"
"8.10.5"
"8.10.6"
"8.10.7"
"9.0.1"
"9.0.2"
"9.2.1"
] }:
let
inherit (stdenv) isDarwin isLinux;
hlsBins = [ "wrapper" ] ++ ghcVersions;
#############################################################################
# Derivation attributes & metadata shared across platforms.
#############################################################################
pname = "haskell-language-server";
version = "1.6.1.0";
meta = {
description = ''
A language server that provides information about Haskell programs to
IDEs, editors, and other tools.
'';
homepage = "https://github.com/haskell/haskell-language-server";
license = lib.licenses.asl20; # Apache-2.0 license.
maintainers = [ ];
platforms = [ "x86_64-darwin" "x86_64-linux" ];
};
in rec {
#############################################################################
# Platform-Specific Derivations
#############################################################################
nixosSrc = fetchzip {
url =
"https://github.com/haskell/haskell-language-server/releases/download/${version}/haskell-language-server-Linux-${version}.tar.gz";
sha256 = "05ldsqac227wddsdw3pf9jinmcafaw1rdq0f0kb5b0010p84m7wj";
stripRoot = false;
};
nixosDrv = callPackage ./nixos {
inherit hlsBins pname version meta;
src = nixosSrc;
};
macosSrc = fetchzip {
url =
"https://github.com/haskell/haskell-language-server/releases/download/${version}/haskell-language-server-macOS-${version}.tar.gz";
sha256 = "08zmy222z4gw7fansxnpv9v0yfv8lm9f9bklnz8dcm41hmy26hp6";
stripRoot = false;
};
macosDrv = callPackage ./macos {
inherit hlsBins pname version meta;
src = macosSrc;
};
}