From 6853f4a2b4331acf09abfc1d96e9f8512a98df97 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Mon, 13 Oct 2025 00:13:33 +0200 Subject: [PATCH] ballerbug: modernize --- pkgs/by-name/ba/ballerburg/package.nix | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/pkgs/by-name/ba/ballerburg/package.nix b/pkgs/by-name/ba/ballerburg/package.nix index b6672185b6dc..1c3a003b68aa 100644 --- a/pkgs/by-name/ba/ballerburg/package.nix +++ b/pkgs/by-name/ba/ballerburg/package.nix @@ -11,20 +11,18 @@ }: let - icon = fetchurl { url = "https://baller.tuxfamily.org/king.png"; - sha256 = "1xq2h87s648wjpjl72ds3xnnk2jp8ghbkhjzh2g4hpkq2zdz90hy"; + hash = "sha256-HoL02xd4XkiegF/CueBDV4ppbR+6iUPllRwRow+CAvc="; }; - in -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "ballerburg"; version = "1.2.3"; src = fetchgit { url = "https://framagit.org/baller/ballerburg.git"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-4rO7ixLE+EV6zd0EryHU6QZeVoa6N4fvxwoJWa0aO70="; }; @@ -41,7 +39,7 @@ stdenv.mkDerivation rec { name = "Ballerburg"; desktopName = "Ballerburg SDL"; exec = "_NET_WM_ICON=ballerburg ballerburg"; - comment = meta.description; + comment = finalAttrs.meta.description; icon = "ballerburg"; categories = [ "Game" ]; }) @@ -57,15 +55,15 @@ stdenv.mkDerivation rec { done ''; - meta = with lib; { + meta = { description = "Classic cannon combat game"; mainProgram = "ballerburg"; longDescription = '' Two castles, separated by a mountain, try to defeat each other with their cannonballs, either by killing the opponent's king or by weakening the opponent enough so that the king capitulates.''; homepage = "https://baller.tuxfamily.org/"; - license = licenses.gpl3Plus; - maintainers = [ maintainers.j0hax ]; - platforms = platforms.all; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ j0hax ]; + platforms = lib.platforms.all; }; -} +})