From 37cf577bbf7b75e47d5f4fc9745bb1789efca69c Mon Sep 17 00:00:00 2001 From: Raphael Borun Das Gupta Date: Sun, 12 Apr 2020 01:01:00 +0200 Subject: [PATCH 1/3] prevo-tools: init at 0.2 --- pkgs/applications/misc/prevo/tools.nix | 38 ++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 40 insertions(+) create mode 100644 pkgs/applications/misc/prevo/tools.nix diff --git a/pkgs/applications/misc/prevo/tools.nix b/pkgs/applications/misc/prevo/tools.nix new file mode 100644 index 000000000000..8dcf9701307b --- /dev/null +++ b/pkgs/applications/misc/prevo/tools.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchFromGitHub, autoreconfHook, pkg-config, glib, expat +, installShellFiles }: + +stdenv.mkDerivation rec { + pname = "prevo-tools"; + version = "0.2"; + + src = fetchFromGitHub { + owner = "bpeel"; + repo = "prevodb"; + rev = version; + sha256 = "1fyrc4g9qdq04nxs4g8x0krxfani5xady6v9m0qfqpbh4xk2ry2d"; + }; + + nativeBuildInputs = [ autoreconfHook pkg-config installShellFiles ]; + buildInputs = [ glib expat ]; + + postInstall = '' + installShellCompletion --bash $out/etc/bash_completion.d/prevo-completion + ''; + + meta = with stdenv.lib; { + description = + "CLI tools for the 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 command line application prevo to query a local + ReVo database, as well as the command line tool revodb to create such a + database for this application or for the Android app of the same name. + ''; + homepage = "https://github.com/bpeel/prevodb"; + license = licenses.gpl2; + maintainers = [ maintainers.das-g ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cc405432704d..b535abd164ad 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21163,6 +21163,8 @@ in jre = openjdk11; }; + prevo-tools = callPackage ../applications/misc/prevo/tools.nix { }; + ptex = callPackage ../development/libraries/ptex {}; qbec = callPackage ../applications/networking/cluster/qbec { }; From fdf828ca22e917ba9d4b19d347ab887602562468 Mon Sep 17 00:00:00 2001 From: Raphael Borun Das Gupta Date: Sun, 12 Apr 2020 01:03:31 +0200 Subject: [PATCH 2/3] prevo-data: init at 2020-03-08 --- pkgs/applications/misc/prevo/data.nix | 41 +++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/applications/misc/prevo/data.nix diff --git a/pkgs/applications/misc/prevo/data.nix b/pkgs/applications/misc/prevo/data.nix new file mode 100644 index 000000000000..1539bc041d03 --- /dev/null +++ b/pkgs/applications/misc/prevo/data.nix @@ -0,0 +1,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.gpl2; + maintainers = [ maintainers.das-g ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b535abd164ad..dc0cee08e885 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21163,6 +21163,7 @@ in jre = openjdk11; }; + prevo-data = callPackage ../applications/misc/prevo/data.nix { }; prevo-tools = callPackage ../applications/misc/prevo/tools.nix { }; ptex = callPackage ../development/libraries/ptex {}; From 905cf1555c59411672c7581109d0d7921e80c47e Mon Sep 17 00:00:00 2001 From: Raphael Borun Das Gupta Date: Sun, 12 Apr 2020 01:06:36 +0200 Subject: [PATCH 3/3] prevo: init at 0.2 --- pkgs/applications/misc/prevo/data.nix | 2 +- pkgs/applications/misc/prevo/default.nix | 27 ++++++++++++++++++++++++ pkgs/applications/misc/prevo/tools.nix | 2 +- pkgs/top-level/all-packages.nix | 1 + 4 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 pkgs/applications/misc/prevo/default.nix diff --git a/pkgs/applications/misc/prevo/data.nix b/pkgs/applications/misc/prevo/data.nix index 1539bc041d03..7f61f60bf6ae 100644 --- a/pkgs/applications/misc/prevo/data.nix +++ b/pkgs/applications/misc/prevo/data.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { This package provides the ReVo database for the prevo command line application. ''; homepage = "https://github.com/bpeel/revo"; - license = licenses.gpl2; + license = licenses.gpl2Only; maintainers = [ maintainers.das-g ]; platforms = platforms.linux; }; diff --git a/pkgs/applications/misc/prevo/default.nix b/pkgs/applications/misc/prevo/default.nix new file mode 100644 index 000000000000..1f299b15d409 --- /dev/null +++ b/pkgs/applications/misc/prevo/default.nix @@ -0,0 +1,27 @@ +{ stdenv, symlinkJoin, prevo-tools, prevo-data, makeWrapper }: + +symlinkJoin rec { + name = "prevo-${version}"; + inherit (prevo-tools) version; + + paths = [ prevo-tools ]; + + nativeBuildInputs = [ makeWrapper ]; + + postBuild = '' + wrapProgram $out/bin/prevo \ + --prefix XDG_DATA_DIRS : "${prevo-data}/share" + ''; + + meta = with stdenv.lib; { + description = "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. + ''; + homepage = "https://github.com/bpeel/prevodb"; + license = licenses.gpl2Only; + maintainers = [ maintainers.das-g ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/applications/misc/prevo/tools.nix b/pkgs/applications/misc/prevo/tools.nix index 8dcf9701307b..6a85e73bf851 100644 --- a/pkgs/applications/misc/prevo/tools.nix +++ b/pkgs/applications/misc/prevo/tools.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { database for this application or for the Android app of the same name. ''; homepage = "https://github.com/bpeel/prevodb"; - license = licenses.gpl2; + license = licenses.gpl2Only; maintainers = [ maintainers.das-g ]; platforms = platforms.linux; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index dc0cee08e885..458c4cefdf78 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21163,6 +21163,7 @@ in jre = openjdk11; }; + prevo = callPackage ../applications/misc/prevo { }; prevo-data = callPackage ../applications/misc/prevo/data.nix { }; prevo-tools = callPackage ../applications/misc/prevo/tools.nix { };