summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorMichael Raitza <spacefrogg-github@meterriblecrew.net>2015-06-22 14:40:55 +0200
committerRok Garbas <rok@garbas.si>2015-06-22 18:11:05 +0200
commit7907a8bcba6fe50e1f7fa8f8ee6a98df884031ad (patch)
tree1f72fe7190a5bec38bddb29804254213058d09c4 /pkgs/development
parentf10c6bef56deee84d5170ba2e78199a433b22250 (diff)
downloadnixlib-7907a8bcba6fe50e1f7fa8f8ee6a98df884031ad.tar
nixlib-7907a8bcba6fe50e1f7fa8f8ee6a98df884031ad.tar.gz
nixlib-7907a8bcba6fe50e1f7fa8f8ee6a98df884031ad.tar.bz2
nixlib-7907a8bcba6fe50e1f7fa8f8ee6a98df884031ad.tar.lz
nixlib-7907a8bcba6fe50e1f7fa8f8ee6a98df884031ad.tar.xz
nixlib-7907a8bcba6fe50e1f7fa8f8ee6a98df884031ad.tar.zst
nixlib-7907a8bcba6fe50e1f7fa8f8ee6a98df884031ad.zip
dialog: init at 1.2-20150225, closes #8457
 Generate ncurses dialogs from shell scripts.
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/libraries/ncurses/default.nix5
-rw-r--r--pkgs/development/tools/misc/dialog/default.nix41
2 files changed, 45 insertions, 1 deletions
diff --git a/pkgs/development/libraries/ncurses/default.nix b/pkgs/development/libraries/ncurses/default.nix
index bea4754a1f53..9df56212ad2c 100644
--- a/pkgs/development/libraries/ncurses/default.nix
+++ b/pkgs/development/libraries/ncurses/default.nix
@@ -160,5 +160,8 @@ stdenv.mkDerivation rec {
     maintainers = with maintainers; [ wkennington ];
   };
 
-  passthru.ldflags = if unicode then "-lncursesw" else "-lncurses";
+  passthru = {
+    ldflags = if unicode then "-lncursesw" else "-lncurses";
+    inherit unicode abiVersion;
+  };
 }
diff --git a/pkgs/development/tools/misc/dialog/default.nix b/pkgs/development/tools/misc/dialog/default.nix
new file mode 100644
index 000000000000..d70f409f3430
--- /dev/null
+++ b/pkgs/development/tools/misc/dialog/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchurl, ncurses, gettext
+, withLibrary ? false, libtool
+, unicodeSupport ? true
+}:
+
+let optional = stdenv.lib.optional;
+    optStr = stdenv.lib.optionalString;
+    buildShared = !stdenv.isDarwin;
+in
+
+assert withLibrary -> libtool != null;
+assert unicodeSupport -> ncurses.unicode && ncurses != null;
+
+stdenv.mkDerivation rec {
+  name = "dialog-${version}";
+  version = "1.2-20150225";
+
+  src = fetchurl {
+    url = "ftp://invisible-island.net/dialog/${name}.tgz";
+    sha256 = "6844b13a7a1fea568a8d5bb3004e1af90888cd4a5e8c2ded2c38f34fcc7397ff";
+  };
+
+  buildInputs = [ ncurses ];
+
+  configureFlags = ''
+    --disable-rpath-hacks
+    ${optStr withLibrary "--with-libtool"}
+    --with-libtool-opts=${optStr buildShared "-shared"}
+    --with-ncurses${optStr unicodeSupport "w"}
+  '';
+
+  installTargets = "install${optStr withLibrary "-full"}";
+
+  meta = {
+    homepage = http://invisible-island.net/dialog/dialog.html;
+    description = "Display dialog boxes from shell";
+    license = stdenv.lib.licenses.lgpl21Plus;
+    maintainers = [ stdenv.lib.maintainers.spacefrogg ];
+    platforms = stdenv.lib.platforms.all;
+  };
+}