From a335198d4dbd036980b1b8f324a0f2c9e6f4c9a9 Mon Sep 17 00:00:00 2001
From: "Yestin L. Harrison" <yestin@ylh.io>
Date: Tue, 6 Dec 2022 02:34:41 -0800
Subject: [PATCH] plan9port: 2021-10-19 -> 2022-09-12

the new version stamps out further path-related annoyances, though
it does require explicitly giving PLAN9_TARGET during buildPhase
(everything moves to $out during installPhase anyway, where
./INSTALL works it out unassisted).
---
 pkgs/tools/system/plan9port/default.nix | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pkgs/tools/system/plan9port/default.nix b/pkgs/tools/system/plan9port/default.nix
index 3e52d10a240b..b4a277eeec4e 100644
--- a/pkgs/tools/system/plan9port/default.nix
+++ b/pkgs/tools/system/plan9port/default.nix
@@ -7,13 +7,13 @@
 
 stdenv.mkDerivation rec {
   pname = "plan9port";
-  version = "2021-10-19";
+  version = "2022-09-12";
 
   src = fetchFromGitHub {
     owner = "9fans";
     repo = pname;
-    rev = "d0d440860f2000a1560abb3f593cdc325fcead4c";
-    hash = "sha256-2aYXqPGwrReyFPrLDtEjgQd/RJjpOfI3ge/tDocYpRQ=";
+    rev = "ffbdd1aa20c8a20a8e9dcd3cec644b6dfa3c6acb";
+    hash = "sha256-Lq5B4VYUetkHwhFX2EaLr33wR1aLIiVn8OBobxjFt7I=";
   };
 
   postPatch = ''
@@ -67,7 +67,7 @@ stdenv.mkDerivation rec {
 
   buildPhase = ''
     runHook preBuild
-    ./INSTALL -b
+    PLAN9_TARGET=$out/plan9 ./INSTALL -b
     runHook postBuild
   '';