diff --git a/pkgs/tools/text/zim-tools/default.nix b/pkgs/tools/text/zim-tools/default.nix new file mode 100644 index 000000000000..319eb47be271 --- /dev/null +++ b/pkgs/tools/text/zim-tools/default.nix @@ -0,0 +1,31 @@ +{ lib, stdenv, fetchFromGitHub +, meson, ninja, pkg-config +, docopt_cpp, file, gumbo, mustache-hpp, zimlib, zlib +, gtest +}: + +stdenv.mkDerivation rec { + pname = "zim-tools"; + version = "3.1.1"; + + src = fetchFromGitHub { + owner = "openzim"; + repo = "zim-tools"; + rev = version; + sha256 = "sha256-xZae1o4L9AdGDqBnFDZniWNM/dLsYRcS0OLWw9+Wecs="; + }; + + nativeBuildInputs = [ meson ninja pkg-config ]; + buildInputs = [ docopt_cpp file gumbo mustache-hpp zimlib zlib ]; + + checkInputs = [ gtest ]; + doCheck = true; + + meta = { + description = "Various ZIM command line tools"; + homepage = "https://github.com/openzim/zim-tools"; + maintainers = with lib.maintainers; [ robbinch ]; + license = lib.licenses.gpl3Plus; + platforms = lib.platforms.all; + }; +} diff --git a/pkgs/tools/text/zimwriterfs/default.nix b/pkgs/tools/text/zimwriterfs/default.nix deleted file mode 100644 index 9a7e495df2b8..000000000000 --- a/pkgs/tools/text/zimwriterfs/default.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ lib, stdenv -, fetchFromGitHub - -, autoconf -, automake -, libtool -, pkg-config - -, file -, icu -, gumbo -, xz -, xapian -, zimlib -, zlib -}: - -stdenv.mkDerivation rec { - pname = "zimwriterfs"; - version = "1.0"; - - src = fetchFromGitHub { - owner = "wikimedia"; - repo = "openzim"; - rev = "${pname}-${version}"; - sha256 = "1vkrrq929a8s3m5rri1lg0l2vd0mc9n2fsb2z1g88k4n4j2l6f19"; - }; - - nativeBuildInputs = [ automake autoconf libtool pkg-config ]; - buildInputs = [ file icu gumbo xz zimlib zlib xapian ]; - setSourceRoot = '' - sourceRoot=$(echo */zimwriterfs) - ''; - preConfigure = "./autogen.sh"; - - meta = { - description = "A console tool to create ZIM files"; - homepage = "http://git.wikimedia.org/log/openzim"; - maintainers = with lib.maintainers; [ robbinch ]; - license = lib.licenses.gpl3; - platforms = with lib.platforms; [ linux ]; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 8e3fa8e0f269..0dec5d31a220 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1510,6 +1510,7 @@ mapAliases ({ zabbix30 = throw "Zabbix 3.0.x is end of life, see https://www.zabbix.com/documentation/5.0/manual/installation/upgrade/sources for a direct upgrade path to 5.0.x"; # Added 2021-04-07 zdfmediathk = throw "'zdfmediathk' has been renamed to/replaced by 'mediathekview'"; # Converted to throw 2022-02-22 zimreader = throw "zimreader has been removed from nixpkgs as it has been replaced by kiwix-serve and stopped working with modern zimlib versions"; # Added 2021-03-28 + zimwriterfs = throw "zimwriterfs is now part of zim-tools"; # Added 2022-06-10. # TODO(ekleog): add ‘wasm’ alias to ‘ocamlPackages.wasm’ after 19.03 # branch-off diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1ab652f0b961..f610659c5d47 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11992,7 +11992,7 @@ with pkgs; zinnia = callPackage ../tools/inputmethods/zinnia { }; tegaki-zinnia-japanese = callPackage ../tools/inputmethods/tegaki-zinnia-japanese { }; - zimwriterfs = callPackage ../tools/text/zimwriterfs { }; + zim-tools = callPackage ../tools/text/zim-tools { }; zld = callPackage ../development/tools/zld { };