diff --git a/pkgs/development/nim-packages/nimraylib-now/default.nix b/pkgs/development/nim-packages/nimraylib-now/default.nix new file mode 100644 index 000000000000..9610ac7afa66 --- /dev/null +++ b/pkgs/development/nim-packages/nimraylib-now/default.nix @@ -0,0 +1,20 @@ +{ lib, nimPackages, fetchFromGitHub }: + +nimPackages.buildNimPackage rec { + pname = "nimraylib-now"; + version = "0.15.0"; + + src = fetchFromGitHub { + owner = "greenfork"; + repo = "nimraylib_now"; + rev = "v${version}"; + sha256 = "sha256-18YiAzJ46dpD5JN+gH0MWKchZ5YLPBNcm9eVFnyy2Sw="; + }; + + meta = with lib; { + homepage = "https://github.com/greenfork/nimraylib_now"; + description = "The Ultimate Raylib gaming library wrapper for Nim"; + license = licenses.mit; + maintainers = with maintainers; [ annaaurora ]; + }; +} 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 c164274351e6..1552d9fcfa7a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2300,6 +2300,8 @@ with pkgs; simplenes = callPackage ../applications/emulators/simplenes { }; + snekim = callPackage ../games/snekim { }; + snes9x = callPackage ../applications/emulators/snes9x { }; snes9x-gtk = callPackage ../applications/emulators/snes9x { diff --git a/pkgs/top-level/nim-packages.nix b/pkgs/top-level/nim-packages.nix index 0b7eb960b7a5..9d20a473dc6a 100644 --- a/pkgs/top-level/nim-packages.nix +++ b/pkgs/top-level/nim-packages.nix @@ -102,6 +102,8 @@ lib.makeScope newScope (self: snappy = callPackage ../development/nim-packages/snappy { inherit (pkgs) snappy; }; + nimraylib-now = callPackage ../development/nim-packages/nimraylib-now { }; + spry = callPackage ../development/nim-packages/spry { }; spryvm = callPackage ../development/nim-packages/spryvm { };