Merge pull request #200557 from teutat3s/fix/redis-desktop-manager

This commit is contained in:
Sandro 2022-11-15 20:30:07 +01:00 committed by GitHub
commit 82b202d382
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 105 additions and 86 deletions

View File

@ -1,85 +0,0 @@
{ stdenv, mkDerivation, lib, fetchFromGitHub, fetchFromGitiles, pkg-config, libssh2
, qtbase, qtdeclarative, qtgraphicaleffects, qtimageformats, qtquickcontrols2
, qtsvg, qttools, qtquick1, qtcharts
, qmake
}:
let
breakpad_lss = fetchFromGitiles {
url = "https://chromium.googlesource.com/linux-syscall-support";
rev = "08056836f2b4a5747daff75435d10d649bed22f6";
sha256 = "1ryshs2nyxwa0kn3rlbnd5b3fhna9vqm560yviddcfgdm2jyg0hz";
};
in
mkDerivation rec {
pname = "redis-desktop-manager";
version = "0.9.1";
src = fetchFromGitHub {
owner = "uglide";
repo = "RedisDesktopManager";
fetchSubmodules = true;
rev = version;
sha256 = "0yd4i944d4blw8jky0nxl7sfkkj975q4d328rdcbhizwvf6dx81f";
};
nativeBuildInputs = [ pkg-config qmake ];
buildInputs = [
libssh2 qtbase qtdeclarative qtgraphicaleffects qtimageformats
qtquick1 qtquickcontrols2 qtsvg qttools qtcharts
];
dontUseQmakeConfigure = true;
dontWrapQtApps = true;
NIX_CFLAGS_COMPILE = [ "-Wno-error=deprecated" ];
# Disable annoying update reminder
postPatch = ''
sed -i s/'^\s*initUpdater();'/'\/\/initUpdater():'/ src/app/app.cpp
'';
buildPhase = ''
srcdir=$PWD
cat <<EOF > src/version.h
#ifndef RDM_VERSION
#define RDM_VERSION "${version}-120"
#endif // !RDM_VERSION
EOF
cd $srcdir/3rdparty/gbreakpad
cp -r ${breakpad_lss} src/third_party/lss
chmod +w -R src/third_party/lss
touch README
cd $srcdir/3rdparty/crashreporter
qmake CONFIG+=release DESTDIR="$srcdir/rdm/bin/linux/release" QMAKE_LFLAGS_RPATH=""
make
cd $srcdir/3rdparty/gbreakpad
./configure
make
cd $srcdir/src
qmake
make
'';
installPhase = ''
mkdir -p $out/bin
instdir="$srcdir/bin/linux/release"
cp $instdir/rdm $out/bin
'';
meta = with lib; {
broken = (stdenv.isLinux && stdenv.isAarch64);
description = "Cross-platform open source Redis DB management tool";
homepage = "https://redisdesktop.com/";
license = licenses.gpl3Only;
platforms = platforms.linux;
maintainers = with maintainers; [ cstrahan ];
};
}

View File

@ -0,0 +1,103 @@
{ stdenv
, mkDerivation
, lib
, fetchFromGitHub
, fetchpatch
, brotli
, lz4
, pyotherside
, python3
, python3Packages
, qtbase
, qtcharts
, qmake
, qttools
, rdbtools
, snappy
, wrapQtAppsHook
, zstd
}:
let
rdbtools-patched = rdbtools.overridePythonAttrs (oldAttrs: {
# Add required additional flag for resp-app
patches = [
(fetchpatch {
name = "Add-flag-to-parse-only-key-names.patch";
url = "https://github.com/uglide/redis-rdb-tools/commit/b74946e6fbca589947ef0186429d5ce45a074b87.patch";
hash = "sha256-1gjqB/IDSsAbrwzWSezlAW/2SYr6BFm1QJ2HAHK2fFs=";
})
];
});
in
mkDerivation rec {
pname = "RESP.app";
version = "2022.5";
src = fetchFromGitHub {
owner = "RedisInsight";
repo = "RedisDesktopManager";
fetchSubmodules = true;
rev = version;
sha256 = "sha256-5eI3J2RsYE5Ejb1r8YkgzmGX2FyaCLFD0lc10J+fOT4=";
};
nativeBuildInputs = [
python3Packages.wrapPython
qmake
wrapQtAppsHook
];
buildInputs = [
brotli
lz4
pyotherside
python3
qtbase
qtcharts
qttools
snappy
zstd
] ++ pythonPath;
pythonPath = with python3Packages; [
bitstring
cbor
msgpack
phpserialize
rdbtools-patched
python-lzf
];
postPatch = ''
substituteInPlace src/resp.pro \
--replace 'which ccache' "false" \
--replace 'target.files = $$DESTDIR/resp' "${placeholder "src"}/bin/linux/release/resp" \
--replace '/opt/resp_app' "${placeholder "out"}" \
--replace 'target.path = $$LINUX_INSTALL_PATH' 'target.path = $$LINUX_INSTALL_PATH/bin' \
--replace '/usr/' "$out/"
'';
qmakeFlags = [
"SYSTEM_LZ4=1"
"SYSTEM_ZSTD=1"
"SYSTEM_SNAPPY=1"
"SYSTEM_BROTLI=1"
"VERSION=${version}"
"src/resp.pro"
];
preFixup = ''
buildPythonPath "$pythonPath"
qtWrapperArgs+=(--prefix PYTHONPATH : "$program_PYTHONPATH")
'';
meta = with lib; {
description = "Cross-platform Developer GUI for Redis";
homepage = "https://resp.app/";
license = licenses.gpl3Only;
platforms = platforms.linux;
maintainers = with maintainers; [ cstrahan ];
};
}

View File

@ -1272,6 +1272,7 @@ mapAliases ({
readline62 = throw "readline-6.2 is no longer supported in nixpkgs, please use 'readline' for main supported version"; # Added 2022-02-20
readline80 = throw "readline-8.0 is no longer supported in nixpkgs, please use 'readline' for main supported version or 'readline81' for most recent version"; # Added 2021-04-22
redkite = throw "redkite was archived by upstream"; # Added 2021-04-12
redis-desktop-manager = throw "'redis-desktop-manager' has been renamed to/replaced by 'resp-app'"; # Added 2022-11-10
redshift-wlr = throw "redshift-wlr has been replaced by gammastep"; # Added 2021-12-25
reicast = throw "reicast has been removed from nixpkgs as it is unmaintained, please use flycast instead"; # Added 2022-03-07

View File

@ -37028,7 +37028,7 @@ with pkgs;
r128gain = callPackage ../applications/audio/r128gain { };
redis-desktop-manager = libsForQt5.callPackage ../applications/misc/redis-desktop-manager { };
resp-app = libsForQt5.callPackage ../applications/misc/resp-app { };
robin-map = callPackage ../development/libraries/robin-map { };