2014-01-05 05:57:21 +04:00
|
|
|
{ stdenv, fetchurl, kernel, zlib }:
|
2013-06-13 00:55:01 +04:00
|
|
|
|
2013-06-14 01:25:32 +04:00
|
|
|
/* Only useful for kernels 3.2 to 3.5.
|
|
|
|
Fails to build in 3.8.
|
|
|
|
3.9 upstream already includes a proper alps driver for this */
|
|
|
|
|
2014-01-05 05:57:21 +04:00
|
|
|
assert builtins.compareVersions "3.8" kernel.version == 1;
|
|
|
|
|
2013-06-13 00:55:01 +04:00
|
|
|
let
|
|
|
|
ver = "1.3";
|
|
|
|
bname = "psmouse-alps-${ver}";
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
2014-01-05 05:57:21 +04:00
|
|
|
name = "psmouse-alps-${kernel.version}-${ver}";
|
2013-06-13 00:55:01 +04:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = http://www.dahetral.com/public-download/alps-psmouse-dlkm-for-3-2-and-3-5/at_download/file;
|
|
|
|
name = "${bname}-alt.tar.bz2";
|
|
|
|
sha256 = "1ghr8xcyidz31isxbwrbcr9rvxi4ad2idwmb3byar9n2ig116cxp";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
cd src/${bname}/src
|
2014-01-05 05:57:21 +04:00
|
|
|
make -C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build \
|
2013-06-13 00:55:01 +04:00
|
|
|
SUBDIRS=`pwd` INSTALL_PATH=$out
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2014-01-05 05:57:21 +04:00
|
|
|
make -C ${kernel.dev}/lib/modules/${kernel.modDirVersion}/build \
|
2013-06-13 00:55:01 +04:00
|
|
|
INSTALL_MOD_PATH=$out SUBDIRS=`pwd` modules_install
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "ALPS dlkm driver with all known touchpads";
|
|
|
|
homepage = http://www.dahetral.com/public-download/alps-psmouse-dlkm-for-3-2-and-3-5/view;
|
|
|
|
license = "GPLv2";
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
maintainers = with stdenv.lib.maintainers; [viric];
|
|
|
|
};
|
|
|
|
}
|