summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/graphics/gmic/default.nix4
-rw-r--r--pkgs/tools/misc/pdd/default.nix34
-rw-r--r--pkgs/tools/networking/ngrok-2/default.nix17
-rw-r--r--pkgs/tools/package-management/nix-review/default.nix31
-rw-r--r--pkgs/tools/security/apg/default.nix7
-rw-r--r--pkgs/tools/security/apg/phony-install-target.patch11
-rw-r--r--pkgs/tools/text/discount/default.nix4
-rw-r--r--pkgs/tools/typesetting/ted/default.nix84
8 files changed, 181 insertions, 11 deletions
diff --git a/pkgs/tools/graphics/gmic/default.nix b/pkgs/tools/graphics/gmic/default.nix
index cbfdd56cca10..a8c491b049ff 100644
--- a/pkgs/tools/graphics/gmic/default.nix
+++ b/pkgs/tools/graphics/gmic/default.nix
@@ -2,11 +2,11 @@
 
 stdenv.mkDerivation rec {
   name = "gmic-${version}";
-  version = "2.2.0";
+  version = "2.2.1";
 
   src = fetchurl {
     url = "http://gmic.eu/files/source/gmic_${version}.tar.gz";
-    sha256 = "0yvb9iwwmjxvck2in3ymqszaddz502v2ryk50qs0wskhbhdh96c7";
+    sha256 = "0iac1zaix2zv1dfp45ca0wk9pj6k02gf8l1vmg820z8jd12pa19w";
   };
 
   nativeBuildInputs = [ pkgconfig ];
diff --git a/pkgs/tools/misc/pdd/default.nix b/pkgs/tools/misc/pdd/default.nix
new file mode 100644
index 000000000000..d362bccb993e
--- /dev/null
+++ b/pkgs/tools/misc/pdd/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchFromGitHub, buildPythonApplication, dateutil }:
+
+buildPythonApplication rec {
+  pname = "pdd";
+  version = "1.1";
+
+  src = fetchFromGitHub {
+    owner = "jarun";
+    repo = "pdd";
+    rev = "v${version}";
+    sha256 = "1nb64vdlym4najjyfxq1nprqcwgrwnqj1mml0fcg20hrgbjm4bf2";
+  };
+
+  format = "other";
+
+  propagatedBuildInputs = [ dateutil ];
+
+  installFlags = [ "PREFIX=$(out)" ];
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/jarun/pdd";
+    description = "Tiny date, time diff calculator";
+    longDescription = ''
+      There are times you want to check how old you are (in years, months, days)
+      or how long you need to wait for the next flash sale or the number of days
+      left of your notice period in your current job. pdd (Python3 Date Diff) is
+      a small cmdline utility to calculate date and time difference. If no
+      program arguments are specified it shows the current date, time and
+      timezone.
+    '';
+    maintainers = [ maintainers.infinisil ];
+    license = licenses.gpl3;
+  };
+}
diff --git a/pkgs/tools/networking/ngrok-2/default.nix b/pkgs/tools/networking/ngrok-2/default.nix
index 031161da4d57..23725fb2d874 100644
--- a/pkgs/tools/networking/ngrok-2/default.nix
+++ b/pkgs/tools/networking/ngrok-2/default.nix
@@ -1,31 +1,38 @@
 { stdenv, fetchurl, unzip }:
 
+with stdenv.lib;
+
 stdenv.mkDerivation rec {
   name = "ngrok-${version}";
   version = "2.2.8";
 
-  src = if stdenv.system == "i686-linux" then fetchurl {
+  src = if stdenv.isLinux && stdenv.isi686 then fetchurl {
     url = "https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-i386.tgz";
     sha256 = "0s5ymlaxrvm13q3mlvfirh74sx60qh56c5sgdma2r7q5qlsq41xg";
-  } else if stdenv.system == "x86_64-linux" then fetchurl {
+  } else if stdenv.isLinux && stdenv.isx86_64 then fetchurl {
     url = "https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.tgz";
     sha256 = "1mn9iwgy6xzrjihikwc2k2j59igqmph0cwx17qp0ziap9lp5xxad";
+  } else if stdenv.isDarwin then fetchurl {
+    url = "https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-darwin-386.zip";
+    sha256 = "0yfd250b55wcpgqd00rqfaa7a82f35fmybb31q5xwdbgc2i47pbh";
   } else throw "platform ${stdenv.system} not supported!";
 
   sourceRoot = ".";
 
+  nativeBuildInputs = optional stdenv.isDarwin unzip;
+
   installPhase = ''
     install -D ngrok $out/bin/ngrok
   '';
 
-  meta = with stdenv.lib; {
+  meta = {
     description = "ngrok";
     longDescription = ''
       Allows you to expose a web server running on your local machine to the internet.
     '';
     homepage = https://ngrok.com/;
-    license = stdenv.lib.licenses.unfree;
-    platforms = [ "i686-linux" "x86_64-linux" ];
+    license = licenses.unfree;
+    platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
     maintainers = [ maintainers.bobvanderlinden ];
   };
 }
diff --git a/pkgs/tools/package-management/nix-review/default.nix b/pkgs/tools/package-management/nix-review/default.nix
new file mode 100644
index 000000000000..3dc452db3e26
--- /dev/null
+++ b/pkgs/tools/package-management/nix-review/default.nix
@@ -0,0 +1,31 @@
+{ stdenv
+, python3
+, fetchFromGitHub
+, nix
+, makeWrapper
+}:
+
+python3.pkgs.buildPythonApplication rec {
+  pname = "nix-review";
+  version = "0.1.0";
+
+  src = fetchFromGitHub {
+    owner = "Mic92";
+    repo = "nix-review";
+    rev = version;
+    sha256 = "1kafp3x95dklydy5224w0a292rd8pv30lz6z5ddk6y7zg3fsxrcr";
+  };
+
+  buildInputs = [ makeWrapper ];
+
+  preFixup = ''
+    wrapProgram $out/bin/nix-review --prefix PATH : ${nix}/bin
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Review pull-requests on https://github.com/NixOS/nixpkgs";
+    homepage = https://github.com/Mic92/nix-review;
+    license = licenses.mit;
+    maintainers = [ maintainers.mic92 ];
+  };
+}
diff --git a/pkgs/tools/security/apg/default.nix b/pkgs/tools/security/apg/default.nix
index 04b29bcf8f7c..db490c7822f8 100644
--- a/pkgs/tools/security/apg/default.nix
+++ b/pkgs/tools/security/apg/default.nix
@@ -10,7 +10,10 @@ stdenv.mkDerivation rec {
   '';
   makeFlags = stdenv.lib.optionals stdenv.isDarwin ["CC=cc"];
 
-  patches = [ ./apg.patch ];
+  patches = [
+    ./apg.patch
+    ./phony-install-target.patch
+  ];
 
   postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
     sed -i -e 's|APG_CLIBS += -lcrypt|APG_CLIBS += -L${openssl.out}/lib -lcrypto|' Makefile
@@ -64,6 +67,6 @@ stdenv.mkDerivation rec {
     homepage = http://www.adel.nursat.kz/apg/;
     license = stdenv.lib.licenses.bsd3;
     maintainers = with stdenv.lib.maintainers; [ astsmtl ];
-    platforms = stdenv.lib.platforms.linux;
+    platforms = stdenv.lib.platforms.unix;
   };
 }
diff --git a/pkgs/tools/security/apg/phony-install-target.patch b/pkgs/tools/security/apg/phony-install-target.patch
new file mode 100644
index 000000000000..9edf50b4b599
--- /dev/null
+++ b/pkgs/tools/security/apg/phony-install-target.patch
@@ -0,0 +1,11 @@
+diff -ur a/Makefile b/Makefile
+--- a/Makefile	2003-08-08 00:40:39.000000000 +0900
++++ b/Makefile	2018-04-05 22:29:39.284191020 +0900
+@@ -142,6 +142,7 @@
+ 	strip ${CS_PROGNAME}
+ 	strip ${BFM_PROGNAME}
+ 
++.PHONY: install
+ install:
+ 	if test -x ./apg; then \
+ ./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \
diff --git a/pkgs/tools/text/discount/default.nix b/pkgs/tools/text/discount/default.nix
index 8a1de29b0d9c..81b88ff8d835 100644
--- a/pkgs/tools/text/discount/default.nix
+++ b/pkgs/tools/text/discount/default.nix
@@ -1,12 +1,12 @@
 {stdenv, fetchurl}:
 
 stdenv.mkDerivation rec {
-  version = "2.2.3";
+  version = "2.2.3a";
   name = "discount-${version}";
 
   src = fetchurl {
     url = "http://www.pell.portland.or.us/~orc/Code/discount/discount-${version}.tar.bz2";
-    sha256 = "17797xiaq0kk152pj4rvd9grg4i518x3glnwg1lgl8rry3dbrzx8";
+    sha256 = "0m09x9dd75d3pqvmrwr0kqw3dm2x3ss9clj5fxf7lq79lbyxbxbm";
   };
 
   patches = ./fix-configure-path.patch;
diff --git a/pkgs/tools/typesetting/ted/default.nix b/pkgs/tools/typesetting/ted/default.nix
new file mode 100644
index 000000000000..b60cbcf22ad0
--- /dev/null
+++ b/pkgs/tools/typesetting/ted/default.nix
@@ -0,0 +1,84 @@
+{ stdenv, fetchurl, pkgconfig, zlib, pcre, xorg, libjpeg, libtiff, libpng, gtk2, libpaper, makeWrapper, ghostscript }:
+
+stdenv.mkDerivation rec {
+  name = "${pname}-${version}";
+  pname = "ted";
+  version = "2.23";
+
+  src = fetchurl {
+    url = "http://ftp.nluug.nl/pub/editors/${pname}/${name}.src.tar.gz";
+    sha256 = "0v1ipynyjklb3chd1vq26a21sjjg66sir57gi2kkrbwnpk195a9z";
+  };
+
+  preConfigure = ''
+    mkdir pkgconfig-append
+    pushd pkgconfig-append
+
+    # ted looks for libtiff, not libtiff-4 in its pkg-config invokations
+    cp ${libtiff.dev}/lib/pkgconfig/libtiff-4.pc libtiff.pc
+
+    # ted needs a libpaper pkg-config file
+    cat > libpaper.pc << EOF
+    prefix=${libpaper}
+    libdir=${libpaper}/lib
+    includedir=${libpaper}/include
+    exec_prefix=\''${prefix}
+
+    Name: libpaper
+    Version: ${libpaper.version}
+    Description: ${libpaper.meta.description}
+    Libs: -L\''${libdir} -lpaper
+    Cflags: -I\''${includedir}
+    EOF
+
+    export PKG_CONFIG_PATH="$PWD:$PKG_CONFIG_PATH"
+
+    popd
+  '';
+
+  makeFlags = [ "CONFIGURE_OPTIONS=--with-GTK" "CONFIGURE_OPTIONS+=--prefix=$(out)" "compile.shared" ];
+
+  installPhase = ''
+    runHook preInstall
+
+    make tedPackage/makefile
+    pushd tedPackage
+    substituteInPlace makefile --replace /usr ""
+    make PKGDESTDIR=$out datadir
+    popd
+
+    pushd $out/share/Ted/examples
+    for f in rtf2*.sh
+    do
+        makeWrapper "$PWD/$f" "$out/bin/$f" --prefix PATH : $out/bin:${stdenv.lib.makeBinPath [ ghostscript ]}
+    done
+    popd
+
+    cp -v Ted/Ted $out/bin
+
+    runHook postInstall
+  '';
+
+  buildInputs = [ pkgconfig zlib pcre xorg.xlibsWrapper xorg.libXpm libjpeg libtiff libpng gtk2 libpaper makeWrapper ];
+
+  meta = with stdenv.lib; {
+    description = "Ted, an easy rich text processor";
+    longDescription = ''
+      Ted is a text processor running under X Windows on Unix/Linux systems.
+      Ted was developed as a standard easy light weight word processor, having
+      the role of Wordpad on MS-Windows. Since then, Ted has evolved to a real
+      word processor. It still has the same easy appearance and the same speed
+      as the original. The possibility to type a letter, a note or a report
+      with a simple light weight program on a Unix/Linux machine is clearly
+      missing. Ted was made to make it possible to edit rich text documents on
+      Unix/Linux in a wysiwyg way. RTF files from Ted are fully compatible with
+      MS-Word. Additionally, Ted also is an RTF to PostScript and an RTF to
+      Acrobat PDF converter.
+    '';
+    homepage    = https://nllgg.nl/Ted/;
+    license     = licenses.gpl2;
+    platforms   = platforms.all;
+    broken      = stdenv.isDarwin;
+    maintainers = with maintainers; [ obadz ];
+  };
+}