mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
ltris: refactor
- finalAttrs design pattern - get rid of nested with - set meta.mainProgram
This commit is contained in:
parent
ad383118e3
commit
39ba389b87
@ -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;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user