Merge pull request #55323 from Mic92/flameshot
flameshot: fix executable path in dbus service
This commit is contained in:
commit
61029df66a
@ -1,25 +1,14 @@
|
|||||||
{ stdenv, fetchFromGitHub, qtbase, qmake, qttools, qtsvg }:
|
{ stdenv, fetchFromGitHub, qtbase, qmake, qttools, qtsvg }:
|
||||||
|
|
||||||
|
# To use `flameshot gui`, you will also need to put flameshot in `services.dbus.packages`
|
||||||
|
# in configuration.nix so that the daemon gets launched properly:
|
||||||
|
#
|
||||||
|
# services.dbus.packages = [ pkgs.flameshot ];
|
||||||
|
# environment.systemPackages = [ pkgs.flameshot ];
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "flameshot-${version}";
|
name = "flameshot-${version}";
|
||||||
version = "0.6.0";
|
version = "0.6.0";
|
||||||
|
|
||||||
nativeBuildInputs = [ qmake qttools qtsvg ];
|
|
||||||
buildInputs = [ qtbase ];
|
|
||||||
|
|
||||||
qmakeFlags = [
|
|
||||||
# flameshot.pro assumes qmake is being run in a git checkout and uses it
|
|
||||||
# to determine the version being built. Let's replace that.
|
|
||||||
"VERSION=${version}"
|
|
||||||
"PREFIX=/"
|
|
||||||
];
|
|
||||||
patchPhase = ''
|
|
||||||
sed -i 's/VERSION =/#VERSION =/g' flameshot.pro
|
|
||||||
sed -i 's,USRPATH = /usr/local,USRPATH = /,g' flameshot.pro
|
|
||||||
'';
|
|
||||||
|
|
||||||
installFlags = [ "INSTALL_ROOT=$(out)" ];
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "lupoDharkael";
|
owner = "lupoDharkael";
|
||||||
repo = "flameshot";
|
repo = "flameshot";
|
||||||
@ -27,6 +16,22 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "193szslh55v44jzxzx5g9kxhl8p8di7vbcnxlid4acfidhnvgazm";
|
sha256 = "193szslh55v44jzxzx5g9kxhl8p8di7vbcnxlid4acfidhnvgazm";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ qmake qttools qtsvg ];
|
||||||
|
buildInputs = [ qtbase ];
|
||||||
|
|
||||||
|
qmakeFlags = [ "PREFIX=${placeholder "out"}" ];
|
||||||
|
|
||||||
|
preConfigure = ''
|
||||||
|
# flameshot.pro assumes qmake is being run in a git checkout.
|
||||||
|
git() { echo ${version}; }
|
||||||
|
export -f git
|
||||||
|
'';
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
substituteInPlace $out/share/dbus-1/services/org.dharkael.Flameshot.service \
|
||||||
|
--replace "/usr/local" "$out"
|
||||||
|
'';
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user