diff options
author | Anderson Torres <torres.anderson.85@protonmail.com> | 2024-02-24 23:46:41 -0300 |
---|---|---|
committer | Anderson Torres <torres.anderson.85@protonmail.com> | 2024-02-29 22:11:38 -0300 |
commit | 39ba389b87fd853a45e0807edc29b8ebc7638a3b (patch) | |
tree | 15861051922b42085ef1521b73a0b714a5081b12 /pkgs/by-name/lt/ltris/package.nix | |
parent | ad383118e36e49a2d916cbe32e5c7c11c836209f (diff) |
ltris: refactor
- finalAttrs design pattern - get rid of nested with - set meta.mainProgram
Diffstat (limited to 'pkgs/by-name/lt/ltris/package.nix')
-rw-r--r-- | pkgs/by-name/lt/ltris/package.nix | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/pkgs/by-name/lt/ltris/package.nix b/pkgs/by-name/lt/ltris/package.nix index 8cf581b376bf6..458c8d02f93b0 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; }; -} +}) |