summary refs log tree commit diff
path: root/pkgs/servers/gpm
diff options
context:
space:
mode:
authorWilliam A. Kennington III <william@wkennington.com>2015-04-30 15:31:11 -0700
committerWilliam A. Kennington III <william@wkennington.com>2015-04-30 18:49:27 -0700
commitc06df0b0641bdce639d6224fea3e3e9153b16e63 (patch)
treecdba2135ae93686aa369834526d37c8da0025651 /pkgs/servers/gpm
parentf537943f271daec8970ebf8e0706f71cf0088027 (diff)
downloadnixpkgs-c06df0b0641bdce639d6224fea3e3e9153b16e63.tar
nixpkgs-c06df0b0641bdce639d6224fea3e3e9153b16e63.tar.gz
nixpkgs-c06df0b0641bdce639d6224fea3e3e9153b16e63.tar.bz2
nixpkgs-c06df0b0641bdce639d6224fea3e3e9153b16e63.tar.lz
nixpkgs-c06df0b0641bdce639d6224fea3e3e9153b16e63.tar.xz
nixpkgs-c06df0b0641bdce639d6224fea3e3e9153b16e63.tar.zst
nixpkgs-c06df0b0641bdce639d6224fea3e3e9153b16e63.zip
gpm: Refactor
Diffstat (limited to 'pkgs/servers/gpm')
-rw-r--r--pkgs/servers/gpm/default.nix26
1 files changed, 14 insertions, 12 deletions
diff --git a/pkgs/servers/gpm/default.nix b/pkgs/servers/gpm/default.nix
index 011b0b8ff49..a9fac485f90 100644
--- a/pkgs/servers/gpm/default.nix
+++ b/pkgs/servers/gpm/default.nix
@@ -1,4 +1,8 @@
-{ stdenv, fetchurl, automake, autoconf, libtool, flex, bison, ncurses, texinfo }:
+{ stdenv, fetchurl, automake, autoconf, libtool, flex, bison, texinfo
+
+# Optional Dependencies
+, ncurses ? null
+}:
 
 stdenv.mkDerivation rec {
   name = "gpm-1.20.7";
@@ -8,31 +12,29 @@ stdenv.mkDerivation rec {
     sha256 = "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh";
   };
 
-  buildInputs = [ automake autoconf libtool flex bison ncurses texinfo ];
+  nativeBuildInputs = [ automake autoconf libtool flex bison texinfo ];
+  buildInputs = [ ncurses ];
 
   preConfigure = ''
     ./autogen.sh
-    sed -e 's/[$](MKDIR)/mkdir -p /' -i doc/Makefile.in
   '';
 
   configureFlags = [
     "--sysconfdir=/etc"
     "--localstatedir=/var"
+    (if ncurses == null then "--without-curses" else "--with-curses")
   ];
 
-  # Its configure script does not allow --disable-static
-  # Disabling this, we make cross-builds easier, because having
-  # cross-built static libraries we either have to disable stripping
-  # or fixing the gpm users, because there -lgpm will fail.
+  # Provide libgpm.so for compatability
   postInstall = ''
-    rm -f $out/lib/*.a
-    ln -s $out/lib/libgpm.so.2 $out/lib/libgpm.so
+    ln -sv $out/lib/libgpm.so.2 $out/lib/libgpm.so
   '';
 
-  meta = {
+  meta = with stdenv.lib; {
     homepage = http://www.nico.schottelius.org/software/gpm/;
     description = "A daemon that provides mouse support on the Linux console";
-    platforms = stdenv.lib.platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.eelco ];
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ eelco wkennington ];
   };
 }