Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 77 lines 2.2 kB view raw
1{ stdenv 2, lib 3, fetchurl 4, fetchzip 5, copyDesktopItems 6, gccmakedep 7, imake 8, installShellFiles 9, libX11 10, libXext 11, makeDesktopItem 12}: 13 14let 15 debian-extras = fetchzip { 16 url = "mirror://debian/pool/main/k/koules/koules_1.4-27.debian.tar.xz"; 17 hash = "sha256-g0Z6C1YSZL6N2eYUuZgXkPDoOLc4e9jAFL3ivk3OAS8="; 18 }; 19in 20stdenv.mkDerivation rec { 21 pname = "koules"; 22 version = "1.4"; 23 24 src = fetchurl { 25 url = "https://www.ucw.cz/~hubicka/koules/packages/${pname}${version}-src.tar.gz"; 26 hash = "sha256-w2+T/q/uvVmYO/RBACQOZ6hKi6yr1+5SjJMEbe/kohs="; 27 }; 28 29 nativeBuildInputs = [ imake gccmakedep installShellFiles copyDesktopItems ]; 30 buildInputs = [ libX11 libXext ]; 31 32 # Debian maintains lots of patches for koules. Let's include all of them. 33 prePatch = '' 34 patches="$patches $(cat ${debian-extras}/patches/series | sed 's|^|${debian-extras}/patches/|')" 35 ''; 36 37 postPatch = '' 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 41 ''; 42 43 preBuild = '' 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 47 ''; 48 49 installPhase = '' 50 runHook preInstall 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 56 runHook postInstall 57 ''; 58 59 desktopItems = [ 60 (makeDesktopItem { 61 desktopName = "Koules"; 62 name = "koules"; 63 exec = "xkoules"; 64 icon = "koules"; 65 comment = "Push your enemies away, but stay away from obstacles"; 66 categories = [ "Game" "ArcadeGame" ]; 67 }) 68 ]; 69 70 meta = with lib; { 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; 76 }; 77}