lewa/words/default.nix

24 lines
562 B
Nix
Raw Normal View History

2020-05-18 11:53:10 +00:00
let
sources = import ../nix/sources.nix;
pkgs = import sources.nixpkgs { };
dhall = pkgs.callPackage ../nix/dhall.nix { };
in pkgs.stdenv.mkDerivation {
name = "lewa-dictionary";
src = ./.;
phases = "buildPhase installPhase";
buildInputs = [ sources.dhall-lang ];
DHALL_PRELUDE = "${sources.dhall-lang}/Prelude/package.dhall";
buildPhase = ''
env | grep ^DHALL
${dhall}/bin/dhall text --file $src/utils/showDictionary.dhall > dictionary.md
'';
installPhase = ''
mkdir -p $out
cp dictionary.md $out/dictionary.md
'';
}