From f8b7805dd07f7f890e82efd2aea79c00a2f7eb98 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Tue, 16 Jan 2024 22:02:22 -0300 Subject: [PATCH 1/3] stella: migrate to by-name --- .../stella/default.nix => by-name/st/stella/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{applications/emulators/stella/default.nix => by-name/st/stella/package.nix} (100%) diff --git a/pkgs/applications/emulators/stella/default.nix b/pkgs/by-name/st/stella/package.nix similarity index 100% rename from pkgs/applications/emulators/stella/default.nix rename to pkgs/by-name/st/stella/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f228f7fb96e9..5a595e8b22fd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2848,8 +2848,6 @@ with pkgs; withGtk = true; }; - stella = callPackage ../applications/emulators/stella { }; - tamatool = callPackage ../applications/emulators/tamatool { }; termtekst = callPackage ../applications/emulators/termtekst { }; From cc790c2f89ef3c86067457331d251646ed3f54e9 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Tue, 16 Jan 2024 22:04:59 -0300 Subject: [PATCH 2/3] stella: refactor - finalAttrs design pattern - get rid of nested with - meta.changelog and meta.mainProgram --- pkgs/by-name/st/stella/package.nix | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/pkgs/by-name/st/stella/package.nix b/pkgs/by-name/st/stella/package.nix index 593845cca61c..0358e8392518 100644 --- a/pkgs/by-name/st/stella/package.nix +++ b/pkgs/by-name/st/stella/package.nix @@ -1,22 +1,23 @@ { lib -, stdenv +, SDL2 , fetchFromGitHub , pkg-config -, SDL2 +, stdenv }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "stella"; version = "6.7"; src = fetchFromGitHub { owner = "stella-emu"; - repo = pname; - rev = version; + repo = "stella"; + rev = finalAttrs.version; hash = "sha256-E8vbBbsVMOSY3iSSE+UCwBwmfHU7Efmre1cYlexVZ+E="; }; nativeBuildInputs = [ + SDL2 pkg-config ]; @@ -24,7 +25,9 @@ stdenv.mkDerivation rec { SDL2 ]; - meta = with lib;{ + strictDeps = true; + + meta = { homepage = "https://stella-emu.github.io/"; description = "An open-source Atari 2600 VCS emulator"; longDescription = '' @@ -38,8 +41,10 @@ stdenv.mkDerivation rec { As of its 3.5 release, Stella is officially donationware. ''; - license = licenses.gpl2Plus; - maintainers = with maintainers; [ AndersonTorres ]; - platforms = platforms.unix; + changelog = "https://github.com/stella-emu/stella/releases/tag/${finalAttrs.src.rev}"; + license = with lib.licenses; [ gpl2Plus ]; + mainProgram = "stella"; + maintainers = with lib.maintainers; [ AndersonTorres ]; + platforms = lib.platforms.unix; }; -} +}) From e676f6d49c7efc89b83f9a5744c0b19943535668 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Tue, 16 Jan 2024 22:26:06 -0300 Subject: [PATCH 3/3] stella: 6.7 -> 6.7.1 Now with system (non-vendored) sqlite support! --- pkgs/by-name/st/stella/package.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/st/stella/package.nix b/pkgs/by-name/st/stella/package.nix index 0358e8392518..f6c863bc95df 100644 --- a/pkgs/by-name/st/stella/package.nix +++ b/pkgs/by-name/st/stella/package.nix @@ -1,19 +1,20 @@ { lib , SDL2 , fetchFromGitHub +, sqlite , pkg-config , stdenv }: stdenv.mkDerivation (finalAttrs: { pname = "stella"; - version = "6.7"; + version = "6.7.1"; src = fetchFromGitHub { owner = "stella-emu"; repo = "stella"; rev = finalAttrs.version; - hash = "sha256-E8vbBbsVMOSY3iSSE+UCwBwmfHU7Efmre1cYlexVZ+E="; + hash = "sha256-4z6rFF6XqfyS9zZ4ByvTZi7cSqxpF4EcLffPbId5ppg="; }; nativeBuildInputs = [ @@ -23,6 +24,7 @@ stdenv.mkDerivation (finalAttrs: { buildInputs = [ SDL2 + sqlite ]; strictDeps = true;