From f0b2a9d5a90df42edf57f3db280cb336ce932bca Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Mon, 5 Aug 2024 00:40:34 -0300 Subject: [PATCH 1/4] tinyemu: remove jhhuh from meta.maintainers [inactivity] [no orphans] --- pkgs/applications/emulators/tinyemu/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/emulators/tinyemu/default.nix b/pkgs/applications/emulators/tinyemu/default.nix index 31dbfc9c23db..15a431adb633 100644 --- a/pkgs/applications/emulators/tinyemu/default.nix +++ b/pkgs/applications/emulators/tinyemu/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { purpose is to be small and simple while being complete. ''; license = with licenses; [ mit bsd2 ]; - maintainers = with maintainers; [ jhhuh AndersonTorres ]; + maintainers = with maintainers; [ AndersonTorres ]; platforms = platforms.linux; }; } From dc7494cb63a4308a5f09cf2833ed6ac01056487c Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Mon, 5 Aug 2024 10:10:38 -0300 Subject: [PATCH 2/4] tinyemu: rework - finalAttrs - strictDeps - no nested with --- .../emulators/tinyemu/default.nix | 39 ++++++++++++++----- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/emulators/tinyemu/default.nix b/pkgs/applications/emulators/tinyemu/default.nix index 15a431adb633..f9591033a3d3 100644 --- a/pkgs/applications/emulators/tinyemu/default.nix +++ b/pkgs/applications/emulators/tinyemu/default.nix @@ -6,41 +6,62 @@ , openssl }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "tinyemu"; version = "2019-12-21"; src = fetchurl { - url = "https://bellard.org/tinyemu/${pname}-${version}.tar.gz"; + url = "https://bellard.org/tinyemu/tinyemu-${finalAttrs.version}.tar.gz"; hash = "sha256-voNR8hIYGbMXL87c5csYJvoSyH2ht+2Y8mnT6AKgVVU="; }; + nativeBuildInputs = [ + SDL + ]; + buildInputs = [ SDL curl openssl ]; + strictDeps = true; + makeFlags = [ "CC:=$(CC)" "STRIP:=$(STRIP)" - "DESTDIR=$(out)" - "bindir=/bin" + "bindir=$(out)/bin" ]; preInstall = '' mkdir -p "$out/bin" ''; - meta = with lib; { + meta = { homepage = "https://bellard.org/tinyemu/"; description = "System emulator for the RISC-V and x86 architectures"; longDescription = '' TinyEMU is a system emulator for the RISC-V and x86 architectures. Its purpose is to be small and simple while being complete. + + Main features: + + - RISC-V system emulator supporting the RV128IMAFDQC base ISA (user level + ISA version 2.2, priviledged architecture version 1.10) including: + - 32/64/128 bit integer registers + - 32/64/128 bit floating point instructions (using the SoftFP Library) + - Compressed instructions + - Dynamic XLEN change + - x86 system emulator based on KVM + - VirtIO console, network, block device, input and 9P filesystem + - Graphical display with SDL + - JSON configuration file + - Remote HTTP block device and filesystem + - Small code, easy to modify, few external dependancies + - Javascript version running Linux and Windows 2000. ''; - license = with licenses; [ mit bsd2 ]; - maintainers = with maintainers; [ AndersonTorres ]; - platforms = platforms.linux; + license = with lib.licenses; [ mit bsd2 ]; + maintainers = with lib.maintainers; [ AndersonTorres ]; + platforms = lib.platforms.unix; }; -} +}) From 670188a7742c96566859f87ae9a43818624c7000 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Mon, 5 Aug 2024 10:15:46 -0300 Subject: [PATCH 3/4] tinyemu: nixfmt-rfc-style --- .../emulators/tinyemu/default.nix | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/emulators/tinyemu/default.nix b/pkgs/applications/emulators/tinyemu/default.nix index f9591033a3d3..b36a0462c9d1 100644 --- a/pkgs/applications/emulators/tinyemu/default.nix +++ b/pkgs/applications/emulators/tinyemu/default.nix @@ -1,9 +1,10 @@ -{ lib -, stdenv -, fetchurl -, SDL -, curl -, openssl +{ + lib, + stdenv, + fetchurl, + SDL, + curl, + openssl, }: stdenv.mkDerivation (finalAttrs: { @@ -15,9 +16,7 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-voNR8hIYGbMXL87c5csYJvoSyH2ht+2Y8mnT6AKgVVU="; }; - nativeBuildInputs = [ - SDL - ]; + nativeBuildInputs = [ SDL ]; buildInputs = [ SDL @@ -60,7 +59,10 @@ stdenv.mkDerivation (finalAttrs: { - Small code, easy to modify, few external dependancies - Javascript version running Linux and Windows 2000. ''; - license = with lib.licenses; [ mit bsd2 ]; + license = with lib.licenses; [ + mit + bsd2 + ]; maintainers = with lib.maintainers; [ AndersonTorres ]; platforms = lib.platforms.unix; }; From 43a84add2c037d1b54af66da09e8451133192cee Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Mon, 5 Aug 2024 10:13:15 -0300 Subject: [PATCH 4/4] tinyemu: migrate to by-name --- .../tinyemu/default.nix => by-name/ti/tinyemu/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{applications/emulators/tinyemu/default.nix => by-name/ti/tinyemu/package.nix} (100%) diff --git a/pkgs/applications/emulators/tinyemu/default.nix b/pkgs/by-name/ti/tinyemu/package.nix similarity index 100% rename from pkgs/applications/emulators/tinyemu/default.nix rename to pkgs/by-name/ti/tinyemu/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6d08ebeca01e..1920be93dc09 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2754,8 +2754,6 @@ with pkgs; tiny8086 = callPackage ../applications/emulators/tiny8086 { }; - tinyemu = callPackage ../applications/emulators/tinyemu { }; - uae = callPackage ../applications/emulators/uae { }; vbam = callPackage ../applications/emulators/vbam { };