mirror of
https://github.com/justinwoo/easy-dhall-nix.git
synced 2024-11-26 21:19:42 +01:00
commit
29769888e2
4 changed files with 30 additions and 0 deletions
|
@ -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
24
dhall-yaml-simple.nix
Normal 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
|
||||||
|
'';
|
||||||
|
}
|
|
@ -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
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue