15 debian-extras = fetchzip {
16 url = "mirror://debian/pool/main/k/koules/koules_1.4-27.debian.tar.xz";
17 hash = "sha256-g0Z6C1YSZL6N2eYUuZgXkPDoOLc4e9jAFL3ivk3OAS8=";
20 stdenv.mkDerivation rec {
25 url = "https://www.ucw.cz/~hubicka/koules/packages/${pname}${version}-src.tar.gz";
26 hash = "sha256-w2+T/q/uvVmYO/RBACQOZ6hKi6yr1+5SjJMEbe/kohs=";
29 nativeBuildInputs = [ imake gccmakedep installShellFiles copyDesktopItems ];
30 buildInputs = [ libX11 libXext ];
32 # Debian maintains lots of patches for koules. Let's include all of them.
34 patches="$patches $(cat ${debian-extras}/patches/series | sed 's|^|${debian-extras}/patches/|')"
38 # We do not want to depend on that particular font to be available in the
39 # xserver, hence substitute it by a font which is always available
40 sed -ie 's:-schumacher-clean-bold-r-normal--8-80-75-75-c-80-\*iso\*:fixed:' xlib/init.c
44 cp xkoules.6 xkoules.man # else "make" will not succeed
45 sed -ie "s:^SOUNDDIR\s*=.*:SOUNDDIR=$out/lib:" Makefile
46 sed -ie "s:^KOULESDIR\s*=.*:KOULESDIR=$out:" Makefile
51 install -Dm755 xkoules $out/bin/xkoules
52 install -Dm755 koules.sndsrv.linux $out/lib/koules.sndsrv.linux
53 install -m644 sounds/* $out/lib/
54 install -Dm644 Koules.xpm $out/share/pixmaps/koules.xpm
55 installManPage xkoules.6
61 desktopName = "Koules";
65 comment = "Push your enemies away, but stay away from obstacles";
66 categories = [ "Game" "ArcadeGame" ];
71 homepage = "https://www.ucw.cz/~hubicka/koules/English/";
72 description = "Fast arcade game based on the fundamental law of body attraction";
73 license = licenses.gpl2Plus;
74 maintainers = [ maintainers.iblech ];
75 platforms = platforms.linux;