From 0396be8262c4507b83eb9dbc1b101621ca4fa7b7 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sun, 22 Sep 2024 20:14:51 -0300 Subject: [PATCH 1/4] ophis: refactor - get rid of python3Packages.callPackage - get rid of rec - fix version format --- pkgs/development/compilers/ophis/default.nix | 66 ++++++++++++-------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 40 insertions(+), 28 deletions(-) diff --git a/pkgs/development/compilers/ophis/default.nix b/pkgs/development/compilers/ophis/default.nix index e1945c9b2802..43febd6002bf 100644 --- a/pkgs/development/compilers/ophis/default.nix +++ b/pkgs/development/compilers/ophis/default.nix @@ -1,30 +1,42 @@ -{ lib, buildPythonApplication, fetchFromGitHub }: +{ + lib, + fetchFromGitHub, + python3Packages, + unstableGitUpdater, +}: -buildPythonApplication rec { - pname = "ophis"; - version = "unstable-2019-04-13"; +let + self = python3Packages.buildPythonApplication { + pname = "ophis"; + version = "0-unstable-2019-04-13"; - src = fetchFromGitHub { - owner = "michaelcmartin"; - repo = "Ophis"; - rev = "99f074da278d4ec80689c0e22e20c5552ea12512"; - sha256 = "2x8vwLTSngqQqmVrVh/mM4peATgaRqOSwrfm5XCkg/g="; + src = fetchFromGitHub { + owner = "michaelcmartin"; + repo = "Ophis"; + rev = "99f074da278d4ec80689c0e22e20c5552ea12512"; + hash = "sha256-2x8vwLTSngqQqmVrVh/mM4peATgaRqOSwrfm5XCkg/g="; + }; + + sourceRoot = "${self.src.name}/src"; + + passthru = { + updateScript = unstableGitUpdater { }; + }; + + meta = { + homepage = "http://michaelcmartin.github.io/Ophis/"; + description = "Cross-assembler for the 6502 series of microprocessors"; + longDescription = '' + Ophis is an assembler for the 6502 microprocessor - the famous chip used + in the vast majority of the classic 8-bit computers and consoles. Its + primary design goals are code readability and output flexibility - Ophis + has successfully been used to create programs for the Nintendo + Entertainment System, the Atari 2600, and the Commodore 64. + ''; + license = lib.licenses.mit; + mainProgram = "ophis"; + maintainers = with lib.maintainers; [ AndersonTorres ]; + }; }; - - sourceRoot = "${src.name}/src"; - - meta = with lib; { - homepage = "http://michaelcmartin.github.io/Ophis/"; - description = "Cross-assembler for the 6502 series of microprocessors"; - mainProgram = "ophis"; - longDescription = '' - Ophis is an assembler for the 6502 microprocessor - the famous chip used - in the vast majority of the classic 8-bit computers and consoles. Its - primary design goals are code readability and output flexibility - Ophis - has successfully been used to create programs for the Nintendo - Entertainment System, the Atari 2600, and the Commodore 64. - ''; - license = licenses.mit; - maintainers = with maintainers; [ AndersonTorres ]; - }; -} +in +self diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7e806f98b32b..bd0998b9b288 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4647,7 +4647,7 @@ with pkgs; ophcrack-cli = ophcrack.override { enableGui = false; }; - ophis = python3Packages.callPackage ../development/compilers/ophis { }; + ophis = callPackage ../development/compilers/ophis { }; open-interpreter = with python3Packages; toPythonApplication open-interpreter; From ad8bd9ff48ed55b162eb6922e298da82ecb1b3fb Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Thu, 21 Nov 2024 20:23:32 -0300 Subject: [PATCH 2/4] ophis: migrate to by-name --- .../ophis/default.nix => by-name/op/ophis/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{development/compilers/ophis/default.nix => by-name/op/ophis/package.nix} (100%) diff --git a/pkgs/development/compilers/ophis/default.nix b/pkgs/by-name/op/ophis/package.nix similarity index 100% rename from pkgs/development/compilers/ophis/default.nix rename to pkgs/by-name/op/ophis/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bd0998b9b288..5084d597fa8b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4647,8 +4647,6 @@ with pkgs; ophcrack-cli = ophcrack.override { enableGui = false; }; - ophis = callPackage ../development/compilers/ophis { }; - open-interpreter = with python3Packages; toPythonApplication open-interpreter; openhantek6022 = libsForQt5.callPackage ../applications/science/electronics/openhantek6022 { }; From 39878626c4aef03346c27e8d1083e2aa484de027 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sat, 30 Nov 2024 16:30:38 -0300 Subject: [PATCH 3/4] ophis: remove AndersonTorres from maintainers --- pkgs/by-name/op/ophis/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/op/ophis/package.nix b/pkgs/by-name/op/ophis/package.nix index 43febd6002bf..745bf1d3fc16 100644 --- a/pkgs/by-name/op/ophis/package.nix +++ b/pkgs/by-name/op/ophis/package.nix @@ -35,7 +35,7 @@ let ''; license = lib.licenses.mit; mainProgram = "ophis"; - maintainers = with lib.maintainers; [ AndersonTorres ]; + maintainers = with lib.maintainers; [ ]; }; }; in From 0b9965801d9f4373e06771f7e9a325b58f7b4e34 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sun, 22 Sep 2024 20:32:03 -0300 Subject: [PATCH 4/4] ophis: 0-unstable-2019-04-13 -> 2.2-unstable-2024-07-28 --- pkgs/by-name/op/ophis/package.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/op/ophis/package.nix b/pkgs/by-name/op/ophis/package.nix index 745bf1d3fc16..a3f93a76da3f 100644 --- a/pkgs/by-name/op/ophis/package.nix +++ b/pkgs/by-name/op/ophis/package.nix @@ -8,16 +8,17 @@ let self = python3Packages.buildPythonApplication { pname = "ophis"; - version = "0-unstable-2019-04-13"; + version = "2.2-unstable-2024-07-28"; + pyproject = true; src = fetchFromGitHub { owner = "michaelcmartin"; repo = "Ophis"; - rev = "99f074da278d4ec80689c0e22e20c5552ea12512"; - hash = "sha256-2x8vwLTSngqQqmVrVh/mM4peATgaRqOSwrfm5XCkg/g="; + rev = "6a5e5a586832e828b598e8162457e673a6c38275"; + hash = "sha256-cxgSgAypS02AO9vjYjNWDY/cx7kxLt1Bdw8HGgGGBhU="; }; - sourceRoot = "${self.src.name}/src"; + build-system = [ python3Packages.setuptools ]; passthru = { updateScript = unstableGitUpdater { };