24 lines
562 B
Nix
24 lines
562 B
Nix
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
|
|
'';
|
|
}
|