From 17ecbea5ff67f8c7ccf169ce2f75d2c2c6a971e8 Mon Sep 17 00:00:00 2001 From: Hugh O'Brien Date: Mon, 3 Jul 2023 13:31:04 -0400 Subject: [PATCH] patcher9x: init at 0.8.50 --- pkgs/development/tools/patcher9x/default.nix | 47 ++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 49 insertions(+) create mode 100644 pkgs/development/tools/patcher9x/default.nix diff --git a/pkgs/development/tools/patcher9x/default.nix b/pkgs/development/tools/patcher9x/default.nix new file mode 100644 index 000000000000..33dad487b3f6 --- /dev/null +++ b/pkgs/development/tools/patcher9x/default.nix @@ -0,0 +1,47 @@ +{ fasm, lib, stdenv, fetchFromGitHub }: + +stdenv.mkDerivation (finalAttr: { + name = "patcher9x"; + version = "0.8.50"; + + srcs = [ + (fetchFromGitHub { + owner = "JHRobotics"; + repo = "patcher9x"; + rev = "v${finalAttr.version}"; + hash = "sha256-TZw2+R7Dzojzxzal1Wp8jhe5gwU4CfZDROITi5Z+auo="; + name = "src"; + }) + + (fetchFromGitHub { + owner = "JHRobotics"; + repo = "nocrt"; + rev = "f65cc7ef2a3cccd6264b2eb265d7fffbecb06ba4"; + hash = "sha256-oeHcK9zYMDWk5sWfzYqLtC3MAJVtcaDJy4PvUGrxiPE="; + name = "nocrt"; + }) + ]; + + buildInputs = [ fasm ]; + sourceRoot = "src"; + hardeningDisable = [ "fortify" ]; + + preBuild = '' + rmdir nocrt + ln -s ../nocrt . + ''; + + installPhase = '' + runHook preInstall + install -D patcher9x $out/bin/patcher9x + runHook postInstall + ''; + + meta = with lib; { + description = "Patch for Windows 95/98/98 SE/Me to fix CPU issues"; + homepage = "https://github.com/JHRobotics/patcher9x"; + license = licenses.mit; + maintainers = with maintainers; [ hughobrien ]; + platforms = platforms.linux; + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8113bdf45046..bd0bf746406c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -935,6 +935,8 @@ with pkgs; pacup = python3Packages.callPackage ../tools/package-management/pacup { }; + patcher9x = callPackage ../development/tools/patcher9x { }; + perseus-cli = callPackage ../development/tools/perseus-cli { inherit (darwin.apple_sdk.frameworks) CoreServices; };