at master 105 lines 2.2 kB view raw
1{ 2 mkDerivation, 3 lib, 4 fetchFromGitHub, 5 fetchpatch, 6 brotli, 7 lz4, 8 pyotherside, 9 python3, 10 python3Packages, 11 qtbase, 12 qtcharts, 13 qmake, 14 qttools, 15 rdbtools, 16 snappy, 17 wrapQtAppsHook, 18 zstd, 19}: 20 21let 22 rdbtools-patched = rdbtools.overridePythonAttrs (oldAttrs: { 23 # Add required additional flag for resp-app 24 patches = oldAttrs.patches or [ ] ++ [ 25 (fetchpatch { 26 name = "Add-flag-to-parse-only-key-names.patch"; 27 url = "https://github.com/uglide/redis-rdb-tools/commit/b74946e6fbca589947ef0186429d5ce45a074b87.patch"; 28 hash = "sha256-1gjqB/IDSsAbrwzWSezlAW/2SYr6BFm1QJ2HAHK2fFs="; 29 }) 30 ]; 31 }); 32in 33mkDerivation rec { 34 pname = "RESP.app"; 35 version = "2022.5"; 36 37 src = fetchFromGitHub { 38 owner = "RedisInsight"; 39 repo = "RedisDesktopManager"; 40 fetchSubmodules = true; 41 rev = version; 42 hash = "sha256-5eI3J2RsYE5Ejb1r8YkgzmGX2FyaCLFD0lc10J+fOT4="; 43 }; 44 45 nativeBuildInputs = [ 46 python3Packages.wrapPython 47 qmake 48 wrapQtAppsHook 49 ]; 50 51 buildInputs = [ 52 brotli 53 lz4 54 pyotherside 55 python3 56 qtbase 57 qtcharts 58 qttools 59 snappy 60 zstd 61 ] 62 ++ pythonPath; 63 64 pythonPath = with python3Packages; [ 65 bitstring 66 cbor 67 msgpack 68 phpserialize 69 rdbtools-patched 70 python-lzf 71 ]; 72 73 postPatch = '' 74 substituteInPlace src/resp.pro \ 75 --replace 'which ccache' "false" \ 76 --replace 'target.files = $$DESTDIR/resp' "${placeholder "src"}/bin/linux/release/resp" \ 77 --replace '/opt/resp_app' "${placeholder "out"}" \ 78 --replace 'target.path = $$LINUX_INSTALL_PATH' 'target.path = $$LINUX_INSTALL_PATH/bin' \ 79 --replace '/usr/' "$out/" 80 rm -r 3rdparty/snappy 81 ''; 82 83 qmakeFlags = [ 84 "SYSTEM_LZ4=1" 85 "SYSTEM_ZSTD=1" 86 "SYSTEM_SNAPPY=1" 87 "SYSTEM_BROTLI=1" 88 "VERSION=${version}" 89 "src/resp.pro" 90 ]; 91 92 preFixup = '' 93 buildPythonPath "$pythonPath" 94 qtWrapperArgs+=(--prefix PYTHONPATH : "$program_PYTHONPATH") 95 ''; 96 97 meta = with lib; { 98 description = "Cross-platform Developer GUI for Redis"; 99 mainProgram = "resp"; 100 homepage = "https://resp.app/"; 101 license = licenses.gpl3Only; 102 platforms = platforms.linux; 103 maintainers = [ ]; 104 }; 105}