From 5856247cfce6d935580f899858090fe5ff743942 Mon Sep 17 00:00:00 2001 From: Anna Aurora Date: Sat, 5 Nov 2022 12:30:38 +0100 Subject: [PATCH] snekim: init at 1.2.0 --- pkgs/games/snekim/default.nix | 34 +++++++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++-- 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 pkgs/games/snekim/default.nix diff --git a/pkgs/games/snekim/default.nix b/pkgs/games/snekim/default.nix new file mode 100644 index 000000000000..524f03252250 --- /dev/null +++ b/pkgs/games/snekim/default.nix @@ -0,0 +1,34 @@ +{ lib, nimPackages, fetchFromGitea, raylib }: + +nimPackages.buildNimPackage rec { + pname = "snekim"; + version = "1.2.0"; + + nimBinOnly = true; + + src = fetchFromGitea { + domain = "codeberg.org"; + owner = "annaaurora"; + repo = "snekim"; + rev = "v${version}"; + sha256 = "sha256-Qgvq4CkGvNppYFpITCCifOHtVQYRQJPEK3rTJXQkTvI="; + }; + + strictDeps = true; + + buildInputs = [ nimPackages.nimraylib-now raylib ]; + + nimFlags = [ "-d:nimraylib_now_shared" ]; + + postInstall = '' + install -D snekim.desktop -t $out/share/applications + install -D icons/hicolor/48x48/snekim.svg -t $out/share/icons/hicolor/48x48/apps + ''; + + meta = with lib; { + homepage = "https://codeberg.org/annaaurora/snekim"; + description = "A simple implementation of the classic snake game"; + license = licenses.lgpl3Only; + maintainers = with maintainers; [ annaaurora ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bd7c0f79dcd5..cff013d54512 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1622,6 +1622,8 @@ with pkgs; simplenes = callPackage ../applications/emulators/simplenes { }; + snekim = callPackage ../games/snekim { }; + snes9x = callPackage ../applications/emulators/snes9x { }; snes9x-gtk = callPackage ../applications/emulators/snes9x { @@ -14468,8 +14470,6 @@ with pkgs; nimlsp = callPackage ../development/tools/misc/nimlsp { }; - nimraylib-now = callPackage ../development/nim-packages/nimraylib-now { }; - neko = callPackage ../development/compilers/neko { }; nextpnr = callPackage ../development/compilers/nextpnr { };