Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 copyDesktopItems, 3 fetchurl, 4 glib, 5 adwaita-icon-theme, 6 gtk3, 7 jre, 8 lib, 9 makeDesktopItem, 10 stdenv, 11 wrapGAppsHook3, 12}: 13 14stdenv.mkDerivation rec { 15 pname = "deepgit"; 16 version = "4.4"; 17 18 src = fetchurl { 19 url = "https://www.syntevo.com/downloads/deepgit/deepgit-linux-${ 20 lib.replaceStrings [ "." ] [ "_" ] version 21 }.tar.gz"; 22 hash = "sha256-ILqwXDyW7/hZzoSxxaxv4bF5xsB/JFaOBYAJFb7xmdk="; 23 }; 24 25 nativeBuildInputs = [ 26 copyDesktopItems 27 wrapGAppsHook3 28 ]; 29 30 buildInputs = [ 31 adwaita-icon-theme 32 gtk3 33 jre 34 ]; 35 36 preFixup = '' 37 gappsWrapperArgs+=( 38 --prefix LD_LIBRARY_PATH : ${ 39 lib.makeLibraryPath [ 40 glib 41 gtk3 42 ] 43 } 44 --set DEEPGIT_JAVA_HOME ${jre} 45 ) 46 patchShebangs bin/deepgit.sh 47 ''; 48 49 desktopItems = [ 50 (makeDesktopItem rec { 51 name = pname; 52 desktopName = "DeepGit"; 53 keywords = [ "git" ]; 54 comment = "Git-Client"; 55 categories = [ 56 "Development" 57 "RevisionControl" 58 ]; 59 terminal = false; 60 startupNotify = true; 61 startupWMClass = desktopName; 62 exec = pname; 63 mimeTypes = [ 64 "x-scheme-handler/${pname}" 65 "x-scheme-handler/sourcetree" 66 ]; 67 icon = pname; 68 }) 69 ]; 70 71 installPhase = '' 72 runHook preInstall 73 74 mkdir -pv $out/{bin,share/icons/hicolor/scalable/apps/} 75 cp -a lib license.html $out 76 mv bin/deepgit.sh $out/bin/deepgit 77 78 for icon_size in 32 48 64 128 256; do 79 path=$icon_size'x'$icon_size 80 icon=bin/deepgit-$icon_size.png 81 mkdir -p $out/share/icons/hicolor/$path/apps 82 cp $icon $out/share/icons/hicolor/$path/apps/deepgit.png 83 done 84 85 runHook postInstall 86 ''; 87 88 meta = with lib; { 89 description = "Tool to investigate the history of source code"; 90 homepage = "https://www.syntevo.com/deepgit"; 91 changelog = "https://www.syntevo.com/deepgit/changelog.txt"; 92 license = licenses.unfree; 93 maintainers = with maintainers; [ urandom ]; 94 platforms = platforms.linux; 95 mainProgram = "deepgit"; 96 }; 97}