nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

default.nix (858B)


      1 {
      2   lib,
      3   fetchFromGitHub,
      4   python3Packages,
      5   withUI ? true,
      6 }:
      7 
      8 python3Packages.buildPythonApplication rec {
      9   pname = "gt4gd";
     10   version = "1.3.9";
     11 
     12   src = fetchFromGitHub {
     13     owner = "xinebf";
     14     repo = "google-translate-for-goldendict";
     15     rev = "v${version}";
     16     hash = "sha256-zJq5dhmrd0k7bsw75xFECKmwZU4qjw+wwSzsYjg8zao=";
     17   };
     18 
     19   dependencies = with python3Packages; [ requests ] ++ lib.optional withUI tkinter;
     20 
     21   doCheck = false;
     22 
     23   postInstall = lib.optionalString withUI ''
     24     install -Dm755 googletranslateui.py $out/bin/googletranslateui
     25     install -Dm644 google_translate.png -t $out/share/gt4gd
     26   '';
     27 
     28   meta = {
     29     description = "Add Google translate to GoldenDict";
     30     homepage = "https://github.com/xinebf/google-translate-for-goldendict";
     31     license = lib.licenses.gpl3;
     32     maintainers = [ lib.maintainers.sikmir ];
     33   };
     34 }