easy-dhall-nix/dhall-simple.nix

21 lines
583 B
Nix
Raw Normal View History

2018-12-08 12:34:40 +01:00
{ pkgs ? import <nixpkgs> {} }:
pkgs.stdenv.mkDerivation rec {
name = "dhall-simple";
2019-02-09 11:15:00 +01:00
version = "1.20.1";
2018-12-08 12:34:40 +01:00
src = pkgs.fetchurl {
url = "https://github.com/dhall-lang/dhall-haskell/releases/download/${version}/dhall-${version}-x86_64-linux.tar.bz2";
2019-02-09 11:15:00 +01:00
sha256 = "1ycb0pglwi9k1pn4qqjyvd4bi54000fb9aqxnn550a515rm6cb03";
2018-12-08 12:34:40 +01:00
};
installPhase = ''
mkdir -p $out/bin
2018-12-12 14:53:19 +01:00
DHALL=$out/bin/dhall
install -D -m555 -T dhall $DHALL
mkdir -p $out/etc/bash_completion.d/
$DHALL --bash-completion-script $DHALL > $out/etc/bash_completion.d/dhall-completion.bash
2018-12-08 12:34:40 +01:00
'';
}