From b6d07eb8ad392dbcae8e22117320430ab45683d7 Mon Sep 17 00:00:00 2001 From: Georg Haas Date: Tue, 24 Mar 2020 13:36:29 +0100 Subject: [PATCH 1/2] teeworlds: python2 -> python3 --- pkgs/games/teeworlds/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/games/teeworlds/default.nix b/pkgs/games/teeworlds/default.nix index ff0dfad51a60..99357f20a99d 100644 --- a/pkgs/games/teeworlds/default.nix +++ b/pkgs/games/teeworlds/default.nix @@ -1,4 +1,4 @@ -{ fetchFromGitHub, stdenv, cmake, pkgconfig, python, alsaLib +{ fetchFromGitHub, stdenv, cmake, pkgconfig, python3, alsaLib , libX11, libGLU, SDL2, lua5_3, zlib, freetype, wavpack }: @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkgconfig ]; buildInputs = [ - python alsaLib libX11 libGLU SDL2 lua5_3 zlib freetype wavpack + python3 alsaLib libX11 libGLU SDL2 lua5_3 zlib freetype wavpack ]; meta = { From 1d42440eb2d1baf3cf7663828a3f7cba291f1ddd Mon Sep 17 00:00:00 2001 From: Georg Haas Date: Tue, 24 Mar 2020 13:37:12 +0100 Subject: [PATCH 2/2] teeworlds: add desktop icon and menu item --- pkgs/games/teeworlds/default.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/games/teeworlds/default.nix b/pkgs/games/teeworlds/default.nix index 99357f20a99d..13918d2f7a52 100644 --- a/pkgs/games/teeworlds/default.nix +++ b/pkgs/games/teeworlds/default.nix @@ -1,5 +1,5 @@ { fetchFromGitHub, stdenv, cmake, pkgconfig, python3, alsaLib -, libX11, libGLU, SDL2, lua5_3, zlib, freetype, wavpack +, libX11, libGLU, SDL2, lua5_3, zlib, freetype, wavpack, icoutils }: stdenv.mkDerivation rec { @@ -21,12 +21,21 @@ stdenv.mkDerivation rec { '#define DATA_DIR "${placeholder "out"}/share/teeworlds/data"' ''; - nativeBuildInputs = [ cmake pkgconfig ]; + nativeBuildInputs = [ cmake pkgconfig icoutils ]; buildInputs = [ python3 alsaLib libX11 libGLU SDL2 lua5_3 zlib freetype wavpack ]; + postInstall = '' + # Convert and install desktop icon + mkdir -p $out/share/pixmaps + icotool --extract --index 1 --output $out/share/pixmaps/teeworlds.png $src/other/icons/teeworlds.ico + + # Install menu item + install -D $src/other/teeworlds.desktop $out/share/applications/teeworlds.desktop + ''; + meta = { description = "Retro multiplayer shooter game";