summary refs log tree commit diff
path: root/pkgs/tools/misc/flameshot/default.nix
diff options
context:
space:
mode:
authorPeter Schuller <peter.schuller@infidyne.com>2018-01-20 22:47:57 -0800
committerPeter Schuller <peter.schuller@infidyne.com>2018-01-21 10:56:40 -0800
commitf08394436a4a187ff3aa4837ce88e946438b419a (patch)
tree047f02270a064330adc19ea0acd9d5a73c90ec6a /pkgs/tools/misc/flameshot/default.nix
parent0beabe4a815bc8d4343c7c8e62f2ceeec3971bd7 (diff)
downloadnixpkgs-f08394436a4a187ff3aa4837ce88e946438b419a.tar
nixpkgs-f08394436a4a187ff3aa4837ce88e946438b419a.tar.gz
nixpkgs-f08394436a4a187ff3aa4837ce88e946438b419a.tar.bz2
nixpkgs-f08394436a4a187ff3aa4837ce88e946438b419a.tar.lz
nixpkgs-f08394436a4a187ff3aa4837ce88e946438b419a.tar.xz
nixpkgs-f08394436a4a187ff3aa4837ce88e946438b419a.tar.zst
nixpkgs-f08394436a4a187ff3aa4837ce88e946438b419a.zip
flameshot: init at 0.5.0
Diffstat (limited to 'pkgs/tools/misc/flameshot/default.nix')
-rw-r--r--pkgs/tools/misc/flameshot/default.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/tools/misc/flameshot/default.nix b/pkgs/tools/misc/flameshot/default.nix
new file mode 100644
index 00000000000..55aa146d301
--- /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;
+  };
+}