about summary refs log tree commit diff
path: root/pkgs/os-specific/linux/psmouse-alps/default.nix
blob: b0d1aa965d4ad2308ce54bc611fc704852f7bedb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{ stdenv, fetchurl, kernelDev, zlib }:

let
  ver = "1.3";
  bname = "psmouse-alps-${ver}";
in
stdenv.mkDerivation {
  name = "psmouse-alps-${kernelDev.version}-${ver}";

  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
    make -C ${kernelDev}/lib/modules/${kernelDev.modDirVersion}/build \
      SUBDIRS=`pwd` INSTALL_PATH=$out
  '';

  installPhase = ''
    make -C ${kernelDev}/lib/modules/${kernelDev.modDirVersion}/build \
      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];
  };
}