From e758f79ae2ba1b32c1bd2d7aed16ff1161186398 Mon Sep 17 00:00:00 2001 From: Jack Henahan Date: Fri, 27 Mar 2020 11:32:53 -0400 Subject: [PATCH] Dhall LSP releases --- default.nix | 4 ++++ dhall-lsp-simple.nix | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 dhall-lsp-simple.nix diff --git a/default.nix b/default.nix index 30ece4d..20eb7f6 100644 --- a/default.nix +++ b/default.nix @@ -20,4 +20,8 @@ dhall-yaml-simple = import ./dhall-yaml-simple.nix { inherit pkgs; }; + + dhall-lsp-simple = import ./dhall-lsp-simple.nix { + inherit pkgs; + }; } diff --git a/dhall-lsp-simple.nix b/dhall-lsp-simple.nix new file mode 100644 index 0000000..7a24e49 --- /dev/null +++ b/dhall-lsp-simple.nix @@ -0,0 +1,24 @@ +{ pkgs ? import {} }: + +pkgs.stdenv.mkDerivation rec { + name = "dhall-lsp-simple"; + + src = if pkgs.stdenv.isDarwin + then pkgs.fetchurl { + url = "https://github.com/dhall-lang/dhall-haskell/releases/download/1.30.0/dhall-lsp-server-1.0.5-x86_64-macos.tar.bz2"; + sha256 = "1ng7f6mrxz1yjwskdf0knlbrb1r8d95yb9sqzbfymnynvpakjn1g"; + } + else pkgs.fetchurl { + url = "https://github.com/dhall-lang/dhall-haskell/releases/download/1.30.0/dhall-lsp-server-1.0.5-x86_64-linux.tar.bz2"; + sha256 = "0bgidy98s6nn2ysfbyl13s36rc8mn1rr5lw2wdpad6achz0mr397"; + }; + + installPhase = '' + mkdir -p $out/bin + DHALL_LSP=$out/bin/dhall-lsp-server + install -D -m555 -T dhall-lsp-server $DHALL_LSP + + mkdir -p $out/etc/bash_completion.d/ + $DHALL_LSP --bash-completion-script $DHALL_LSP > $out/etc/bash_completion.d/dhall-lsp-server-completion.bash + ''; +}