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