Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 python3Packages, 6 gettext, 7 git, 8 qt5, 9 versionCheckHook, 10 copyDesktopItems, 11 imagemagick, 12 nix-update-script, 13}: 14 15python3Packages.buildPythonApplication rec { 16 pname = "git-cola"; 17 version = "4.13.0"; 18 pyproject = true; 19 20 src = fetchFromGitHub { 21 owner = "git-cola"; 22 repo = "git-cola"; 23 tag = "v${version}"; 24 hash = "sha256-FoCU10EKeNltYh7AEOR+98ryVA6rFVfCDMg5QUSpF0w="; 25 }; 26 27 buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ qt5.qtwayland ]; 28 29 propagatedBuildInputs = [ 30 git 31 ] 32 ++ (with python3Packages; [ 33 setuptools 34 pyqt5 35 qtpy 36 send2trash 37 polib 38 ]); 39 40 nativeBuildInputs = [ 41 gettext 42 qt5.wrapQtAppsHook 43 python3Packages.setuptools-scm 44 imagemagick 45 ] 46 ++ lib.optionals stdenv.hostPlatform.isLinux [ copyDesktopItems ]; 47 48 nativeCheckInputs = [ 49 git 50 python3Packages.pytestCheckHook 51 versionCheckHook 52 ]; 53 54 versionCheckProgramArg = "--version"; 55 56 disabledTestPaths = [ 57 "qtpy/" 58 "contrib/win32" 59 ] 60 ++ lib.optionals stdenv.hostPlatform.isDarwin [ "cola/inotify.py" ]; 61 62 preFixup = '' 63 makeWrapperArgs+=("''${qtWrapperArgs[@]}") 64 ''; 65 66 desktopItems = [ 67 "share/applications/git-cola-folder-handler.desktop" 68 "share/applications/git-cola.desktop" 69 "share/applications/git-dag.desktop" 70 ]; 71 72 postInstall = '' 73 for i in 16 24 48 64 96 128 256 512; do 74 mkdir -p $out/share/icons/hicolor/''${i}x''${i}/apps 75 magick cola/icons/git-cola.svg -background none -resize ''${i}x''${i} $out/share/icons/hicolor/''${i}x''${i}/apps/${pname}.png 76 done 77 ''; 78 79 passthru.updateScript = nix-update-script { }; 80 81 meta = { 82 description = "Sleek and powerful Git GUI"; 83 homepage = "https://git-cola.github.io/"; 84 changelog = "https://github.com/git-cola/git-cola/blob/v${version}/CHANGES.rst"; 85 license = lib.licenses.gpl2Plus; 86 maintainers = with lib.maintainers; [ bobvanderlinden ]; 87 mainProgram = "git-cola"; 88 }; 89}