about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorndowens <ndowens04@gmail.com>2017-03-19 16:07:12 -0500
committerndowens <ndowens04@gmail.com>2017-03-19 16:31:14 -0500
commitd6114f6c6bd74c68829a4a586464b9a1633c76ac (patch)
treef154091e6a31e35304863c9133bd4b09f850d835 /pkgs
parent13447dde558dcf3ec5b2f131cab7228741672a93 (diff)
downloadnixlib-d6114f6c6bd74c68829a4a586464b9a1633c76ac.tar
nixlib-d6114f6c6bd74c68829a4a586464b9a1633c76ac.tar.gz
nixlib-d6114f6c6bd74c68829a4a586464b9a1633c76ac.tar.bz2
nixlib-d6114f6c6bd74c68829a4a586464b9a1633c76ac.tar.lz
nixlib-d6114f6c6bd74c68829a4a586464b9a1633c76ac.tar.xz
nixlib-d6114f6c6bd74c68829a4a586464b9a1633c76ac.tar.zst
nixlib-d6114f6c6bd74c68829a4a586464b9a1633c76ac.zip
mg: 20110905 -> 20161005; Remove un-needed configure patch
mg: 20110905 -> 20161005
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/editors/mg/configure.patch35
-rw-r--r--pkgs/applications/editors/mg/default.nix29
2 files changed, 15 insertions, 49 deletions
diff --git a/pkgs/applications/editors/mg/configure.patch b/pkgs/applications/editors/mg/configure.patch
deleted file mode 100644
index 11105299eb4b..000000000000
--- a/pkgs/applications/editors/mg/configure.patch
+++ /dev/null
@@ -1,35 +0,0 @@
---- configure.old	2013-07-30 19:42:51.000000000 +0200
-+++ configure	2013-07-30 19:47:26.000000000 +0200
-@@ -163,31 +163,7 @@
-     echo 'Fails.'
- fi
- 
--
--if [ ! -r /usr/include/term.h ]; then
--    note 'term.h'
--    if [ -r /usr/include/ncurses/term.h ]; then
--	echo "Found in /usr/include/ncurses"
--	extraflags="$extraflags -I/usr/include/ncurses"
--    else
--	for i in pkg local; do
--	    if [ -r /usr/$i/include/term.h ]; then
--		echo "Found in /usr/$i/include"
--		extralibs="$extralibs -L/usr/$i/lib"
--		extraflags="$extraflags -I/usr/$i/include"
--		break
--	    else
--		false
--	    fi
--	done ||
--	{
--	    echo 'Not found!' >&2
--	    echo 'Do you have the ncurses devel package installed?' >&2
--	    echo 'If you know where term.h is, please email the author!' >&2
--	    exit 1
--	}
--    fi
--fi
-+extraflags="$extraflags $NIX_CFLAGS_COMPILE"
- 
- note 'base and dirname'
- if gcc_defines "__GLIBC__" || gcc_defines "__CYGWIN__" ; then
diff --git a/pkgs/applications/editors/mg/default.nix b/pkgs/applications/editors/mg/default.nix
index 95a6205125b0..b8bfd40c079b 100644
--- a/pkgs/applications/editors/mg/default.nix
+++ b/pkgs/applications/editors/mg/default.nix
@@ -1,19 +1,19 @@
-{ fetchurl, stdenv, ncurses }:
+{ fetchurl, stdenv, ncurses, pkgconfig, libbsd }:
 stdenv.mkDerivation rec {
-  name = "mg-20110905";
+  name = "mg-${version}";
+  version = "20161005";
 
   src = fetchurl {
-    url = http://homepage.boetes.org/software/mg/mg-20110905.tar.gz;
-    sha256 = "0ac2c7wy5kkcflm7cmiqm5xhb5c4yfw3i33iln8civ1yd9z7vlqw";
+    url = "http://homepage.boetes.org/software/mg/${name}.tar.gz";
+    sha256 = "0qaydk2cy765n9clghmi5gdnpwn15y2v0fj6r0jcm0v7d89vbz5p";
   };
 
-  dontAddPrefix = true;
-
-  patches = [ ./configure.patch ];
-  patchFlags = "-p0";
-
   NIX_CFLAGS_COMPILE = "-Wno-error";
-  buildFlags = [ "CC=cc" ];
+  
+  preConfigure = ''
+    substituteInPlace GNUmakefile \
+      --replace /usr/bin/pkg-config ${pkgconfig}/bin/pkg-config
+      '';
 
   installPhase = ''
     mkdir -p $out/bin
@@ -22,12 +22,13 @@ stdenv.mkDerivation rec {
     cp mg.1 $out/share/man/man1
   '';
 
-  buildInputs = [ ncurses ];
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ ncurses libbsd ];
 
-  meta = {
+  meta = with stdenv.lib; {
     homepage = http://homepage.boetes.org/software/mg/;
     description = "Micro GNU/emacs, a portable version of the mg maintained by the OpenBSD team";
-    license = stdenv.lib.licenses.publicDomain;
-    platforms = stdenv.lib.platforms.all;
+    license = licenses.publicDomain;
+    platforms = platforms.all;
   };
 }