Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 libsForQt5, 6 readline, 7 tcl, 8 python3, 9 copyDesktopItems, 10 makeDesktopItem, 11 12 sqlitestudio-plugins, 13 includeOfficialPlugins ? lib.meta.availableOn stdenv.hostPlatform sqlitestudio-plugins, 14}: 15stdenv.mkDerivation rec { 16 pname = "sqlitestudio"; 17 version = "3.4.17"; 18 19 src = fetchFromGitHub { 20 owner = "pawelsalawa"; 21 repo = "sqlitestudio"; 22 rev = version; 23 hash = "sha256-nGu1MYI3uaQ/3rc5LlixF6YEUU+pUsB6rn/yjFDGYf0="; 24 }; 25 26 nativeBuildInputs = [ 27 copyDesktopItems 28 ] 29 ++ (with libsForQt5.qt5; [ 30 qmake 31 qttools 32 wrapQtAppsHook 33 ]); 34 35 buildInputs = [ 36 readline 37 tcl 38 python3 39 ] 40 ++ (with libsForQt5.qt5; [ 41 qtbase 42 qtsvg 43 qtdeclarative 44 qtscript 45 ]); 46 47 qmakeFlags = [ 48 "./SQLiteStudio3" 49 "DEFINES+=NO_AUTO_UPDATES" 50 ] 51 ++ lib.optionals includeOfficialPlugins [ 52 "DEFINES+=PLUGINS_DIR=${sqlitestudio-plugins}/lib/sqlitestudio" 53 ]; 54 55 desktopItems = [ 56 (makeDesktopItem { 57 name = "sqlitestudio"; 58 desktopName = "SQLiteStudio"; 59 exec = "sqlitestudio"; 60 icon = "sqlitestudio"; 61 comment = "Database manager for SQLite"; 62 terminal = false; 63 startupNotify = false; 64 categories = [ "Development" ]; 65 }) 66 ]; 67 68 postInstall = '' 69 install -Dm755 \ 70 ./SQLiteStudio3/guiSQLiteStudio/img/sqlitestudio.svg \ 71 $out/share/pixmaps/sqlitestudio.svg 72 ''; 73 74 enableParallelBuilding = true; 75 76 meta = { 77 description = "Free, open source, multi-platform SQLite database manager"; 78 homepage = "https://sqlitestudio.pl/"; 79 license = lib.licenses.gpl3Only; 80 mainProgram = "sqlitestudio"; 81 platforms = lib.platforms.linux; 82 maintainers = with lib.maintainers; [ asterismono ]; 83 }; 84}