Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv 2, fetchurl 3, fetchFromGitHub 4, cmake 5, extra-cmake-modules 6, boost 7, python3 8, fcitx5 9}: 10 11let 12 table = fetchurl { 13 url = "https://download.fcitx-im.org/data/table.tar.gz"; 14 sha256 = "1dw7mgbaidv3vqy0sh8dbfv8631d2zwv5mlb7npf69a1f8y0b5k1"; 15 }; 16 arpaVer = "20220810"; 17 arpa = fetchurl { 18 url = "https://download.fcitx-im.org/data/lm_sc.arpa-${arpaVer}.tar.xz"; 19 sha256 = "sha256-oRvJfSda2vGV+brIVDaK4GzbSg/h7s9Z21rlgGFdtPo="; 20 }; 21 dictVer = "20220810"; 22 dict = fetchurl { 23 url = "https://download.fcitx-im.org/data/dict-${dictVer}.tar.xz"; 24 sha256 = "sha256-lxdS9BMYgAfo0ZFYwRuFyVXiXXsyHsInXEs69tioXSY="; 25 }; 26in 27stdenv.mkDerivation rec { 28 pname = "libime"; 29 version = "1.0.17"; 30 31 src = fetchFromGitHub { 32 owner = "fcitx"; 33 repo = "libime"; 34 rev = version; 35 sha256 = "sha256-mc0Mknqki0pY4oKf8B6H67N+1eMu7wbqF7wES22Kw1A="; 36 fetchSubmodules = true; 37 }; 38 39 prePatch = '' 40 ln -s ${table} data/$(stripHash ${table}) 41 ln -s ${arpa} data/$(stripHash ${arpa}) 42 ln -s ${dict} data/$(stripHash ${dict}) 43 ''; 44 45 nativeBuildInputs = [ 46 cmake 47 extra-cmake-modules 48 python3 49 ]; 50 51 buildInputs = [ 52 boost 53 fcitx5 54 ]; 55 56 meta = with lib; { 57 description = "A library to support generic input method implementation"; 58 homepage = "https://github.com/fcitx/libime"; 59 license = licenses.lgpl21Plus; 60 maintainers = with maintainers; [ poscat ]; 61 platforms = platforms.linux; 62 }; 63}