add dhall-to-yaml-ng

This commit is contained in:
James Carey 2020-01-24 14:48:58 +00:00
parent 1aa3b306e4
commit e181280124
4 changed files with 30 additions and 0 deletions

View file

@ -16,4 +16,8 @@
dhall-nix-simple = import ./dhall-nix-simple.nix { dhall-nix-simple = import ./dhall-nix-simple.nix {
inherit pkgs; inherit pkgs;
}; };
dhall-yaml-simple = import ./dhall-yaml-simple.nix {
inherit pkgs;
};
} }

24
dhall-yaml-simple.nix Normal file
View file

@ -0,0 +1,24 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.stdenv.mkDerivation rec {
name = "dhall-yaml-simple";
src = if pkgs.stdenv.isDarwin
then pkgs.fetchurl {
url = "https://github.com/dhall-lang/dhall-haskell/releases/download/1.29.0/dhall-yaml-1.0.1-x86_64-macos.tar.bz2";
sha256 = "0rg1gsr6fhx71sadr8xcwik202jfbpwcvgj3bjzbvsx8hvn2cy13";
}
else pkgs.fetchurl {
url = "https://github.com/dhall-lang/dhall-haskell/releases/download/1.29.0/dhall-yaml-1.0.1-x86_64-linux.tar.bz2";
sha256 = "13gnqq3xjilrs4zmp7c7jybyw9xa7ipi3kkrp7mr826vypcwlrga";
};
installPhase = ''
mkdir -p $out/bin
DHALL_TO_YAML=$out/bin/dhall-to-yaml-ng
install -D -m555 -T dhall-to-yaml-ng $DHALL_TO_YAML
mkdir -p $out/etc/bash_completion.d/
$DHALL_TO_YAML --bash-completion-script $DHALL_TO_YAML > $out/etc/bash_completion.d/dhall-to-yaml-completion.bash
'';
}

View file

@ -12,5 +12,6 @@ in
dhall-json-simple dhall-json-simple
dhall-bash-simple dhall-bash-simple
dhall-nix-simple dhall-nix-simple
dhall-yaml-simple
]; ];
} }

View file

@ -18,5 +18,6 @@ test_exe dhall;
test_exe dhall-to-json; test_exe dhall-to-json;
test_exe dhall-to-bash; test_exe dhall-to-bash;
test_exe dhall-to-nix; test_exe dhall-to-nix;
test_exe dhall-to-yaml;
exit $ERRORS; exit $ERRORS;