mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 20:39:04 +02:00
qsyncthingtray: fix program paths
We need this for qsyncthingtray to be able to detect the processes as well.
This commit is contained in:
parent
0843ad10fd
commit
29d9f0e624
|
@ -1,25 +1,44 @@
|
||||||
{ stdenv, fetchFromGitHub
|
{ stdenv, lib, fetchFromGitHub, procps ? null
|
||||||
, qtbase, qtwebengine
|
, qtbase, qtwebengine, qtwebkit
|
||||||
, qmakeHook }:
|
, cmake, makeQtWrapper
|
||||||
|
, syncthing, syncthing-inotify ? null
|
||||||
|
, preferQWebView ? false }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "0.5.7";
|
version = "0.5.7";
|
||||||
name = "qsyncthingtray-${version}";
|
name = "qsyncthingtray-${version}";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "sieren";
|
owner = "sieren";
|
||||||
repo = "QSyncthingTray";
|
repo = "QSyncthingTray";
|
||||||
rev = "${version}";
|
rev = "${version}";
|
||||||
sha256 = "0crrdpdmlc4ahkvp5znzc4zhfwsdih655q1kfjf0g231mmynxhvq";
|
sha256 = "0crrdpdmlc4ahkvp5znzc4zhfwsdih655q1kfjf0g231mmynxhvq";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ qtbase qtwebengine ];
|
buildInputs = [ qtbase qtwebengine ] ++ lib.optional preferQWebView qtwebkit;
|
||||||
nativeBuildInputs = [ qmakeHook ];
|
nativeBuildInputs = [ cmake makeQtWrapper ];
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
postInstall = ''
|
cmakeFlags = lib.optional preferQWebView "-DQST_BUILD_WEBKIT=1";
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
${lib.optionalString stdenv.isLinux ''
|
||||||
|
substituteInPlace includes/platforms/linux/posixUtils.hpp \
|
||||||
|
--replace '"/usr/local/bin/syncthing"' '"${syncthing}/bin/syncthing"' \
|
||||||
|
--replace '"/usr/local/bin/syncthing-inotify"' '"${syncthing-inotify}/bin/syncthing-inotify"' \
|
||||||
|
--replace '"pgrep -x' '"${procps}/bin/pgrep -x'
|
||||||
|
''}
|
||||||
|
|
||||||
|
${lib.optionalString stdenv.isDarwin ''
|
||||||
|
substituteInPlace includes/platforms/darwin/macUtils.hpp \
|
||||||
|
--replace '"/usr/local/bin/syncthing"' '"${syncthing}/bin/syncthing"'
|
||||||
|
''}
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = let qst = "qsyncthingtray"; in ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp binary/QSyncthingTray $out/bin
|
install -m755 QSyncthingTray $out/bin/${qst}
|
||||||
|
ln -s $out/bin/${qst} $out/bin/QSyncthingTray
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
@ -31,7 +50,7 @@ stdenv.mkDerivation rec {
|
||||||
Written in C++ with Qt.
|
Written in C++ with Qt.
|
||||||
'';
|
'';
|
||||||
license = licenses.lgpl3;
|
license = licenses.lgpl3;
|
||||||
maintainers = with maintainers; [ zraexy ];
|
maintainers = with maintainers; [ zraexy peterhoeg ];
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
broken = builtins.compareVersions qtbase.version "5.7.0" >= 0;
|
broken = builtins.compareVersions qtbase.version "5.7.0" >= 0;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue