summary refs log tree commit diff
path: root/pkgs/tools/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/graphics')
-rw-r--r--pkgs/tools/graphics/graphviz/default.nix7
-rw-r--r--pkgs/tools/graphics/imgur-screenshot/default.nix29
2 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/tools/graphics/graphviz/default.nix b/pkgs/tools/graphics/graphviz/default.nix
index fbf1c114d0a6..5635e3a69ff7 100644
--- a/pkgs/tools/graphics/graphviz/default.nix
+++ b/pkgs/tools/graphics/graphviz/default.nix
@@ -38,6 +38,13 @@ stdenv.mkDerivation rec {
     ]
     ++ stdenv.lib.optional (xorg == null) "--without-x";
 
+  postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
+    for foo in cmd/dot/Makefile.in cmd/edgepaint/Makefile.in \
+                    cmd/mingle/Makefile.in plugin/gdiplus/Makefile.in; do
+      substituteInPlace "$foo" --replace "-lstdc++" "-lc++"
+    done
+  '';
+
   preBuild = ''
     sed -e 's@am__append_5 *=.*@am_append_5 =@' -i lib/gvc/Makefile
   '';
diff --git a/pkgs/tools/graphics/imgur-screenshot/default.nix b/pkgs/tools/graphics/imgur-screenshot/default.nix
new file mode 100644
index 000000000000..d1badc735095
--- /dev/null
+++ b/pkgs/tools/graphics/imgur-screenshot/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchFromGitHub, makeWrapper, curl, gnugrep, libnotify, scrot, which, xclip }:
+
+let deps = stdenv.lib.makeSearchPath "bin" [ curl gnugrep libnotify scrot which xclip ];
+in stdenv.mkDerivation rec {
+  version = "1.5.4";
+  name = "imgur-screenshot-${version}";
+
+  src = fetchFromGitHub {
+    owner = "jomo";
+    repo = "imgur-screenshot";
+    rev = "v${version}";
+    sha256 = "1ff88mvrd0b7nmrkjljs3rnprk5ih0iif92dn39s3vnag3fp9f10";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    install -Dm755 imgur-screenshot.sh $out/bin/imgur-screenshot
+    wrapProgram $out/bin/imgur-screenshot --prefix PATH ':' ${deps}
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A tool for easy screencapping and uploading to imgur.";
+    homepage = "https://https://github.com/jomo/imgur-screenshot/";
+    platforms = platforms.linux;
+    license = licenses.mit;
+    maintainers = with maintainers; [ lw ];
+  };
+}
\ No newline at end of file