From 94bb01d2747bd1acc6b81f9a753574cdc852ff62 Mon Sep 17 00:00:00 2001 From: Sam Estep Date: Wed, 3 Jun 2026 21:12:59 +0000 Subject: [PATCH] pacman-game: build for Linux too, not just Darwin Assisted-by: Claude:opus-4.8 --- pkgs/by-name/pa/pacman-game/package.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/pa/pacman-game/package.nix b/pkgs/by-name/pa/pacman-game/package.nix index 4a2c7c43f0b4..7193d81598e3 100644 --- a/pkgs/by-name/pa/pacman-game/package.nix +++ b/pkgs/by-name/pa/pacman-game/package.nix @@ -1,4 +1,5 @@ { + installShellFiles, lib, stdenv, fetchFromGitHub, @@ -7,6 +8,8 @@ stdenv.mkDerivation (finalAttrs: { pname = "pacman-game"; version = "0-unstable-2017-01-30"; + strictDeps = true; + __structuredAttrs = true; src = fetchFromGitHub { owner = "justinjo"; @@ -15,10 +18,18 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-2GwIv8XMbd8WZBaPp4tOblAzku49UilHmv6bG9A1y+4="; }; + # The upstream Makefile hardcodes clang++, which is the default compiler on + # Darwin but not on Linux. Use the stdenv compiler so it builds everywhere. + postPatch = '' + substituteInPlace Makefile --replace-fail "clang++" "c++" + ''; + + nativeBuildInputs = [ installShellFiles ]; + installPhase = '' runHook preInstall - install -Dm755 pacman $out/bin/pacman + installBin pacman runHook postInstall ''; @@ -27,7 +38,7 @@ stdenv.mkDerivation (finalAttrs: { description = "Command line pacman game"; homepage = "https://github.com/justinjo/Pacman"; license = lib.licenses.unlicense; - platforms = lib.platforms.darwin; + platforms = lib.platforms.unix; maintainers = with lib.maintainers; [ ethancedwards8 ]; mainProgram = "pacman"; };