2014-01-05 01:57:21 +00:00
|
|
|
{stdenv, fetchurl, kernel, ncurses, fxload}:
|
2008-02-01 23:58:39 +00:00
|
|
|
|
2008-06-20 18:17:27 +00:00
|
|
|
let
|
|
|
|
|
|
|
|
# A patch to fix A/V sync, and to allow video to be played
|
|
|
|
# (e.g. using MPlayer) while the AVI is being recorded.
|
|
|
|
gorecordAV = fetchurl {
|
|
|
|
url = http://colabti.org/convertx/patch-av-aviheader.diff;
|
|
|
|
sha256 = "04qk58qigzwfdnn3mr3pg28qx4r89nlzdhgkvfipz36bsny23r50";
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
|
2008-02-01 23:58:39 +00:00
|
|
|
stdenv.mkDerivation {
|
2014-01-05 01:57:21 +00:00
|
|
|
name = "wis-go7007-0.9.8-${kernel.version}";
|
2008-02-01 23:58:39 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = http://gentoo.osuosl.org/distfiles/wis-go7007-linux-0.9.8.tar.bz2;
|
|
|
|
sha256 = "06lvlz42c5msvwc081p8vjcbv8qq1j1g1myxhh27xi8zi06n1mzg";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = map fetchurl [
|
|
|
|
{ url = "http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/media-tv/wis-go7007/files/wis-go7007-0.9.8-kernel-2.6.17.diff?rev=1.1";
|
|
|
|
sha256 = "0cizbg82fdl5byhvpkdx64qa02xcahdyddi2l2jn95sxab28a5yg";
|
|
|
|
}
|
2008-06-20 17:00:12 +00:00
|
|
|
{ url = "http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/media-tv/wis-go7007/files/wis-go7007-0.9.8-fix-udev.diff?rev=1.2";
|
|
|
|
sha256 = "1985lcb7gh5zsf3lm0b43zd6q0cb9q4z376n9q060bh99yw6m0w1";
|
|
|
|
}
|
2008-02-01 23:58:39 +00:00
|
|
|
{ url = "http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/media-tv/wis-go7007/files/snd.patch?rev=1.1";
|
|
|
|
sha256 = "0a6dz1l16pz1fk77s3awxh635cacbivfcfnd1carbx5jp2gq3jna";
|
|
|
|
}
|
2008-08-21 07:43:38 +00:00
|
|
|
{ url = "http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/media-tv/wis-go7007/files/wis-go7007-2.6.26-nopage.diff?rev=1.1";
|
|
|
|
sha256 = "18ks6dm9nnliab9ncgxx5nhw528vhwg83byps8wjsbadd3wzwym3";
|
|
|
|
}
|
2008-06-20 16:09:14 +00:00
|
|
|
{ url = http://home.comcast.net/~bender647/go7007/wis-go7007-2.6.24-no_algo_control.diff;
|
|
|
|
sha256 = "1a7jkcsnzagir3wpsj60pjrr9wgfaqq21jlmq6s0qg9hqg4nzbvf";
|
|
|
|
}
|
2008-06-20 18:17:27 +00:00
|
|
|
] ++ [
|
|
|
|
# http://nikosapi.org/wiki/index.php/WIS_Go7007_Linux_driver#wis-streamer_fails_to_find_the_ALSA_audio_node_and_emulated_OSS_device_node
|
|
|
|
./alsa.patch
|
2008-06-20 17:00:12 +00:00
|
|
|
];
|
2008-02-01 23:58:39 +00:00
|
|
|
|
|
|
|
buildInputs = [ncurses];
|
|
|
|
|
2008-06-20 18:17:27 +00:00
|
|
|
postPatch = ''
|
|
|
|
(cd apps && patch < ${gorecordAV}) || false
|
|
|
|
'';
|
|
|
|
|
2008-02-01 23:58:39 +00:00
|
|
|
preBuild = ''
|
|
|
|
includeDir=$TMPDIR/scratch
|
|
|
|
substituteInPlace Makefile \
|
2008-02-04 08:36:10 +00:00
|
|
|
--replace '$(DESTDIR)$(KSRC)/include/linux' $includeDir \
|
|
|
|
--replace '$(DESTDIR)$(FIRMWARE_DIR)' '$(FIRMWARE_DIR)'
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $includeDir
|
|
|
|
mkdir -p $out/etc/hotplug/usb
|
|
|
|
mkdir -p $out/etc/udev/rules.d
|
2008-02-01 23:58:39 +00:00
|
|
|
|
2014-01-05 01:57:21 +00:00
|
|
|
makeFlagsArray=(KERNELSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source \
|
2015-08-24 22:27:06 +00:00
|
|
|
FIRMWARE_DIR=$out/lib/firmware FXLOAD=${fxload}/sbin/fxload \
|
2008-02-01 23:58:39 +00:00
|
|
|
DESTDIR=$out SKIP_DEPMOD=1 \
|
|
|
|
USE_UDEV=y)
|
|
|
|
''; # */
|
|
|
|
|
2008-02-04 08:36:10 +00:00
|
|
|
postInstall = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/bin
|
2008-02-04 08:36:10 +00:00
|
|
|
cp apps/gorecord apps/modet $out/bin/
|
|
|
|
'';
|
|
|
|
|
2008-02-01 23:58:39 +00:00
|
|
|
meta = {
|
|
|
|
description = "Kernel module for the Micronas GO7007, used in a number of USB TV devices";
|
|
|
|
homepage = http://oss.wischip.com/;
|
2014-01-05 01:57:21 +00:00
|
|
|
broken = true;
|
2008-02-01 23:58:39 +00:00
|
|
|
};
|
|
|
|
}
|