diff --git a/nix/dhall.nix b/nix/dhall.nix index ddb8c3d..38141ba 100644 --- a/nix/dhall.nix +++ b/nix/dhall.nix @@ -1,5 +1,16 @@ let sources = import ./sources.nix; pkgs = import sources.nixpkgs { }; - dhall = import sources.easy-dhall-nix { inherit pkgs; }; -in dhall.dhall-yaml-simple +in pkgs.stdenv.mkDerivation rec { + name = "dhall-yaml-simple"; + + src = sources.dhall-yaml; + + 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 + ''; +} diff --git a/nix/sources.json b/nix/sources.json index f215c0b..e8b854e 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -1,4 +1,10 @@ { + "dhall-yaml": { + "sha256": "0mnqn6by839v1n2ccb33qxdh7jga0x5xq3kkwdsnic6q7fgcsds6", + "type": "file", + "url": "https://github.com/dhall-lang/dhall-haskell/releases/download/1.33.1/dhall-yaml-1.2.0-x86_64-linux.tar.bz2", + "url_template": "https://github.com/dhall-lang/dhall-haskell/releases/download/1.33.1/dhall-yaml-1.2.0-x86_64-linux.tar.bz2" + }, "easy-dhall-nix": { "branch": "master", "description": "Derivations for easily downloading Dhall binaries and putting them to use.",