nixpkgs/pkgs/development/libraries/libpinyin/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
955 B
Nix
Raw Normal View History

2022-01-20 04:35:16 +00:00
{ lib
, stdenv
, fetchurl
, fetchFromGitHub
2019-08-12 05:00:17 +00:00
, autoreconfHook
, glib
, db
, pkg-config
2019-08-12 05:00:17 +00:00
}:
2016-03-26 17:08:53 +00:00
2016-10-01 01:52:01 +00:00
let
modelData = fetchurl {
2022-01-20 04:35:16 +00:00
url = "mirror://sourceforge/libpinyin/models/model19.text.tar.gz";
sha256 = "02zml6m8sj5q97ibpvaj9s9yz3gfj0jnjrfhkn02qv4nwm72lhjn";
2016-10-01 01:52:01 +00:00
};
in
stdenv.mkDerivation rec {
pname = "libpinyin";
2022-04-23 12:46:20 +00:00
version = "2.6.2";
2016-10-01 01:52:01 +00:00
src = fetchFromGitHub {
2022-01-20 04:35:16 +00:00
owner = "libpinyin";
repo = "libpinyin";
rev = version;
2022-04-23 12:46:20 +00:00
sha256 = "sha256-hafetjKWqImg3Jr1tSXjY0RwbBQ7LccXqx0OdtKCy/c=";
2016-10-01 01:52:01 +00:00
};
2016-03-26 17:08:53 +00:00
2019-08-12 05:00:17 +00:00
postUnpack = ''
tar -xzf ${modelData} -C $sourceRoot/data
'';
2022-01-20 04:35:16 +00:00
nativeBuildInputs = [
autoreconfHook
glib
db
pkg-config
];
2019-08-12 05:00:17 +00:00
meta = with lib; {
2016-03-26 17:08:53 +00:00
description = "Library for intelligent sentence-based Chinese pinyin input method";
2022-04-23 12:46:20 +00:00
homepage = "https://github.com/libpinyin/libpinyin";
2022-01-20 04:35:16 +00:00
license = licenses.gpl3Plus;
maintainers = with maintainers; [ linsui ericsagnes ];
platforms = platforms.linux;
2016-03-26 17:08:53 +00:00
};
}