From ad383118e36e49a2d916cbe32e5c7c11c836209f Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sun, 25 Feb 2024 16:19:40 -0300 Subject: [PATCH 1/3] ltris: migrate to by-name --- .../lgames/ltris/default.nix => by-name/lt/ltris/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{games/lgames/ltris/default.nix => by-name/lt/ltris/package.nix} (100%) diff --git a/pkgs/games/lgames/ltris/default.nix b/pkgs/by-name/lt/ltris/package.nix similarity index 100% rename from pkgs/games/lgames/ltris/default.nix rename to pkgs/by-name/lt/ltris/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 37a6bfb96058..1a49351dccb9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -37090,8 +37090,6 @@ with pkgs; lpairs2 = callPackage ../games/lgames/lpairs2 { }; - ltris = callPackage ../games/lgames/ltris { }; - maelstrom = callPackage ../games/maelstrom { }; mar1d = callPackage ../games/mar1d { } ; From 39ba389b87fd853a45e0807edc29b8ebc7638a3b Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sat, 24 Feb 2024 23:46:41 -0300 Subject: [PATCH 2/3] ltris: refactor - finalAttrs design pattern - get rid of nested with - set meta.mainProgram --- pkgs/by-name/lt/ltris/package.nix | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/pkgs/by-name/lt/ltris/package.nix b/pkgs/by-name/lt/ltris/package.nix index 8cf581b376bf..458c8d02f93b 100644 --- a/pkgs/by-name/lt/ltris/package.nix +++ b/pkgs/by-name/lt/ltris/package.nix @@ -1,17 +1,17 @@ { lib -, stdenv -, fetchurl , SDL , SDL_mixer , directoryListingUpdater +, fetchurl +, stdenv }: -stdenv.mkDerivation rec { - pname = "ltris"; +stdenv.mkDerivation (finalAttrs: { + pname = "lgames-ltris"; version = "1.2.7"; src = fetchurl { - url = "mirror://sourceforge/lgames/${pname}-${version}.tar.gz"; + url = "mirror://sourceforge/lgames/ltris-${finalAttrs.version}.tar.gz"; hash = "sha256-EpHGpkLQa57hU6wKLnhVosmD6DnGGPGilN8E2ClSXLA="; }; @@ -23,17 +23,18 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; passthru.updateScript = directoryListingUpdater { - inherit pname version; + inherit (finalAttrs) pname version; url = "https://lgames.sourceforge.io/LTris/"; extraRegex = "(?!.*-win(32|64)).*"; }; - meta = with lib; { + meta = { homepage = "https://lgames.sourceforge.io/LTris/"; description = "Tetris clone from the LGames series"; - license = licenses.gpl2Plus; - maintainers = with maintainers; [ AndersonTorres ciil ]; + license = with lib.licenses; [ gpl2Plus ]; + mainProgram = "ltris"; + maintainers = with lib.maintainers; [ AndersonTorres ]; inherit (SDL.meta) platforms; broken = stdenv.isDarwin; }; -} +}) From 79b7518a2ed76c624a2bf06b9452a451266571e7 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sun, 25 Feb 2024 00:30:59 -0300 Subject: [PATCH 3/3] ltris: 1.2.7 -> 1.2.8 --- pkgs/by-name/lt/ltris/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/lt/ltris/package.nix b/pkgs/by-name/lt/ltris/package.nix index 458c8d02f93b..82137b2fbec6 100644 --- a/pkgs/by-name/lt/ltris/package.nix +++ b/pkgs/by-name/lt/ltris/package.nix @@ -8,11 +8,11 @@ stdenv.mkDerivation (finalAttrs: { pname = "lgames-ltris"; - version = "1.2.7"; + version = "1.2.8"; src = fetchurl { url = "mirror://sourceforge/lgames/ltris-${finalAttrs.version}.tar.gz"; - hash = "sha256-EpHGpkLQa57hU6wKLnhVosmD6DnGGPGilN8E2ClSXLA="; + hash = "sha256-2e5haaU2pqkBk82qiF/3HQgSBVPHP09UwW+TQqpGUqA="; }; buildInputs = [