nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at netboot-syslinux-multiplatform 54 lines 1.8 kB view raw
1{ lib, stdenv, fetchurl, makeDesktopItem, copyDesktopItems, SDL, SDL_mixer, freepats }: 2 3stdenv.mkDerivation rec { 4 pname = "abuse"; 5 version = "0.8"; 6 7 src = fetchurl { 8 url = "http://abuse.zoy.org/raw-attachment/wiki/download/${pname}-${version}.tar.gz"; 9 sha256 = "0104db5fd2695c9518583783f7aaa7e5c0355e27c5a803840a05aef97f9d3488"; 10 }; 11 12 configureFlags = [ 13 "--with-x" 14 "--with-assetdir=$(out)/orig" 15 # The "--enable-debug" is to work around a segfault on start, see https://bugs.archlinux.org/task/52915. 16 "--enable-debug" 17 ]; 18 19 desktopItems = [ (makeDesktopItem { 20 name = "abuse"; 21 exec = "abuse"; 22 icon = "abuse"; 23 desktopName = "Abuse"; 24 comment = "Side-scroller action game that pits you against ruthless alien killers"; 25 categories = [ "Game" "ActionGame" ]; 26 }) ]; 27 28 postInstall = '' 29 mkdir $out/etc 30 echo -e "dir ${freepats}\nsource ${freepats}/freepats.cfg" > $out/etc/timidity.cfg 31 32 mv $out/bin/abuse $out/bin/.abuse-bin 33 substituteAll "${./abuse.sh}" $out/bin/abuse 34 chmod +x $out/bin/abuse 35 36 install -Dm644 doc/abuse.png $out/share/pixmaps/abuse.png 37 ''; 38 39 nativeBuildInputs = [ copyDesktopItems ]; 40 buildInputs = [ SDL SDL_mixer freepats ]; 41 42 meta = with lib; { 43 description = "Side-scroller action game that pits you against ruthless alien killers"; 44 homepage = "http://abuse.zoy.org/"; 45 license = with licenses; [ unfree ]; 46 # Most of abuse is free (public domain, GPL2+, WTFPL), however the creator 47 # of its sfx and music only gave Debian permission to redistribute the 48 # files. Our friends from Debian thought about it some more: 49 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=648272 50 maintainers = with maintainers; [ iblech ]; 51 platforms = platforms.unix; 52 broken = stdenv.isDarwin; 53 }; 54}