Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 80 lines 1.5 kB view raw
1{ 2 lib, 3 python3Packages, 4 fetchFromGitHub, 5 pkg-config, 6 gobject-introspection, 7 wrapGAppsHook3, 8 gtk3, 9 gst_all_1, 10 gtksourceview, 11 writableTmpDirAsHomeHook, 12}: 13 14python3Packages.buildPythonApplication rec { 15 pname = "pychess"; 16 version = "1.0.5"; 17 pyproject = true; 18 19 src = fetchFromGitHub { 20 owner = "pychess"; 21 repo = "pychess"; 22 rev = "${version}"; 23 hash = "sha256-hxc+vYvCeiM0+oOu1peI9qkZg5PeIsDMCiydJQAuzOk="; 24 }; 25 26 nativeBuildInputs = [ 27 pkg-config 28 gobject-introspection 29 wrapGAppsHook3 30 writableTmpDirAsHomeHook 31 ]; 32 33 buildInputs = [ 34 gtk3 35 gst_all_1.gst-plugins-base 36 gtksourceview 37 ]; 38 39 build-system = with python3Packages; [ setuptools ]; 40 41 dependencies = with python3Packages; [ 42 pygobject3 43 pycairo 44 sqlalchemy 45 pexpect 46 psutil 47 websockets 48 ptyprocess 49 ]; 50 51 dontWrapGApps = true; 52 53 preFixup = '' 54 makeWrapperArgs+=("''${gappsWrapperArgs[@]}") 55 ''; 56 57 preBuild = '' 58 export PYTHONPATH=./lib:$PYTHONPATH 59 python pgn2ecodb.py 60 python create_theme_preview.py 61 ''; 62 63 postInstall = '' 64 cp -r $out/share/pychess/* $out/lib/python*/ 65 ''; 66 67 # No tests available. 68 doCheck = false; 69 70 pythonImportsCheck = [ "pychess" ]; 71 72 meta = { 73 description = "Advanced GTK chess client written in Python"; 74 homepage = "https://pychess.github.io/"; 75 mainProgram = "pychess"; 76 license = lib.licenses.gpl3Only; 77 platforms = lib.platforms.linux; 78 maintainers = with lib.maintainers; [ lgbishop ]; 79 }; 80}