1{ stdenv, fetchurl, pciutils }:
2
3stdenv.mkDerivation {
4 name = "i810switch-0.6.5";
5
6 phases = "unpackPhase installPhase";
7
8 installPhase = "
9 sed -i -e 's+/usr++' Makefile
10 sed -i -e 's+^\\(.*putenv(\"PATH=\\).*$+\\1${pciutils}/sbin\");+' i810switch.c
11 make clean
12 make install DESTDIR=\${out}
13 ";
14
15 src = fetchurl {
16 url = http://www16.plala.or.jp/mano-a-mano/i810switch/i810switch-0.6.5.tar.gz;
17 sha256 = "d714840e3b14e1fa9c432c4be0044b7c008d904dece0d611554655b979cad4c3";
18 };
19
20 meta = {
21 description = "A utility for switching between the LCD and external VGA display on Intel graphics cards";
22 homepage = http://www16.plala.or.jp/mano-a-mano/i810switch.html;
23 license = stdenv.lib.licenses.gpl2;
24 platforms = stdenv.lib.platforms.linux;
25 };
26}