about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/prevo/data.nix
blob: 7f61f60bf6ae0011b32478a72ef7376d93b64651 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{ stdenv, fetchFromGitHub, prevo-tools }:

stdenv.mkDerivation rec {
  pname = "prevo-data";
  version = "2020-03-08";

  src = fetchFromGitHub {
    owner = "bpeel";
    repo = "revo";
    rev = "1e8d7197c0bc831e2127909e77e64dfc26906bdd";
    sha256 = "1ldhzpi3d5cbssv8r7acsn7qwxcl8qpqi8ywpsp7cbgx3w7hhkyz";
  };

  nativeBuildInputs = [ prevo-tools ];

  dontUnpack = true;

  buildPhase = ''
    prevodb -s -i $src -o prevo.db
  '';

  installPhase = ''
    mkdir -p $out/share/prevo
    cp prevo.db $out/share/prevo/
  '';

  meta = with stdenv.lib; {
    description =
      "data for offline version of the Esperanto dictionary Reta Vortaro";
    longDescription = ''
      PReVo is the "portable" ReVo, i.e., the offline version
      of the Esperanto dictionary Reta Vortaro.

      This package provides the ReVo database for the prevo command line application.
    '';
    homepage = "https://github.com/bpeel/revo";
    license = licenses.gpl2Only;
    maintainers = [ maintainers.das-g ];
    platforms = platforms.linux;
  };
}