From f08394436a4a187ff3aa4837ce88e946438b419a Mon Sep 17 00:00:00 2001 From: Peter Schuller Date: Sat, 20 Jan 2018 22:47:57 -0800 Subject: [PATCH] flameshot: init at 0.5.0 --- lib/maintainers.nix | 1 + pkgs/tools/misc/flameshot/default.nix | 39 +++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 42 insertions(+) create mode 100644 pkgs/tools/misc/flameshot/default.nix diff --git a/lib/maintainers.nix b/lib/maintainers.nix index f839d025129e..b186742fcdfd 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -607,6 +607,7 @@ schmitthenner = "Fabian Schmitthenner "; schneefux = "schneefux "; schristo = "Scott Christopher "; + scode = "Peter Schuller "; scolobb = "Sergiu Ivanov "; sdll = "Sasha Illarionov "; SeanZicari = "Sean Zicari "; diff --git a/pkgs/tools/misc/flameshot/default.nix b/pkgs/tools/misc/flameshot/default.nix new file mode 100644 index 000000000000..55aa146d301d --- /dev/null +++ b/pkgs/tools/misc/flameshot/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchFromGitHub, qtbase, qmake, qttools }: + +stdenv.mkDerivation rec { + name = "flameshot-${version}"; + version = "0.5.0"; + + nativeBuildInputs = [ qmake qttools ]; + 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 { + owner = "lupoDharkael"; + repo = "flameshot"; + rev = "v${version}"; + sha256 = "1fy4il7rdj294l9cs642hx23bry25j9phn37274r2b87hwzy1rrv"; + }; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + description = "Powerful yet simple to use screenshot software"; + homepage = https://github.com/lupoDharkael/flameshot; + maintainers = [ maintainers.scode ]; + license = stdenv.lib.licenses.gpl3; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8db63bcd3c7d..09cd5378bfdb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15197,6 +15197,8 @@ with pkgs; flac = callPackage ../applications/audio/flac { }; + flameshot = libsForQt5.callPackage ../tools/misc/flameshot { }; + flashplayer = callPackage ../applications/networking/browsers/mozilla-plugins/flashplayer { debug = config.flashplayer.debug or false; };