nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit 9c1a27052d8580472249711e56e6d30ae1ac4e13
parent 751fca43899466c649ca1c53e4be0e148695d7c3
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Wed,  7 Oct 2020 10:59:09 +0300

Add ascii-dash

Diffstat:
Mpkgs/default.nix | 4++++
Apkgs/games/ascii-dash/default.nix | 42++++++++++++++++++++++++++++++++++++++++++
2 files changed, 46 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -175,6 +175,10 @@ lib.makeScope newScope ( xfractint = callPackage ./tools/xfractint { }; zdict = callPackage ./tools/dict/zdict { }; + ### GAMES + + ascii-dash = callPackage ./games/ascii-dash { }; + ### SERVERS dict2rest = callPackage ./servers/dict2rest { }; diff --git a/pkgs/games/ascii-dash/default.nix b/pkgs/games/ascii-dash/default.nix @@ -0,0 +1,42 @@ +{ stdenv, fetchurl, cmake, unzip, ncurses5, SDL, SDL_mixer }: + +stdenv.mkDerivation rec { + pname = "ascii-dash"; + version = "1.2.1"; + + src = fetchurl { + url = "mirror://sourceforge/ascii-dash/ASCII-DASH-${version}.zip"; + sha256 = "0mm04rz6a7kraprh7yjh5qmv9kd237lh85mknnm2nm6ff3mx6pf6"; + }; + + postPatch = '' + substituteInPlace ascii-gfx/main.cpp \ + --replace "boing.wav" "$out/share/ascii-dash/sounds/boing.wav" + substituteInPlace dash.cpp \ + --replace "sounds/" "$out/share/ascii-dash/sounds/" + substituteInPlace dash_physics.cpp \ + --replace "sounds/" "$out/share/ascii-dash/sounds/" + substituteInPlace main.cpp \ + --replace "data/" "$out/share/ascii-dash/data/" + ''; + + nativeBuildInputs = [ cmake unzip ]; + + buildInputs = [ ncurses5 SDL SDL_mixer ]; + + NIX_CFLAGS_COMPILE = [ "-Wno-error=stringop-truncation" ]; + + installPhase = '' + install -Dm755 main $out/bin/ascii-dash + + mkdir -p $out/share/ascii-dash + cp -r ../{data,sounds} $out/share/ascii-dash + ''; + + meta = with stdenv.lib; { + description = "Remake of BOULDER DASH with NCurses"; + homepage = "https://ascii-dash.sourceforge.io/"; + license = licenses.mit; + platforms = platforms.unix; + }; +}