Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 58 lines 1.2 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 cmake, 6 extra-cmake-modules, 7 krunner, 8 kconfigwidgets, 9 ktextwidgets, 10 kservice, 11 ki18n, 12 translate-shell, 13 qtbase, 14 qtdeclarative, 15 qtlocation, 16}: 17 18stdenv.mkDerivation rec { 19 pname = "krunner-translator"; 20 version = "1.5.0"; 21 22 src = fetchFromGitHub { 23 owner = "naraesk"; 24 repo = pname; 25 rev = "v${version}"; 26 sha256 = "8MusGvNhTxa8Sm8WiSwRaVIfZOeXmgcO4T6H9LqFGLs="; 27 }; 28 29 nativeBuildInputs = [ 30 cmake 31 extra-cmake-modules 32 ]; 33 34 dontWrapQtApps = true; 35 36 buildInputs = [ 37 krunner 38 kconfigwidgets 39 ktextwidgets 40 kservice 41 ki18n 42 qtbase 43 qtdeclarative 44 qtlocation 45 ]; 46 47 postPatch = '' 48 substituteInPlace src/translateShellProcess.cpp --replace "start(\"trans\", arguments);" "start(\"${translate-shell}/bin/trans\", arguments);" 49 ''; 50 51 meta = with lib; { 52 description = "Plugin for KRunner which integrates a translator, supports Google Translate, Bing Translator, youdao and Baidu Fanyi"; 53 homepage = "https://github.com/naraesk/krunner-translator"; 54 license = licenses.gpl3; 55 maintainers = with maintainers; [ pongo1231 ]; 56 platforms = platforms.unix; 57 }; 58}