zaphyra's git: tgcNUR

fork of https://git.transgirl.cafe/zaphoid/tgc-nix-user-repository

commit afb3d06c87aab3f19f62098b48d0747ba9501844
parent 59cb93ffa9270b9df6e1d709baa7da7a17084579
Author: Katja Ramona Sophie Kwast (zaphyra) <git@zaphyra.eu>
Date: Fri, 22 Aug 2025 12:46:00 +0200

packages: add pre/post hooks
4 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/packages/deppa/package.nix b/packages/deppa/package.nix
@@ -5,6 +5,7 @@
   lib,
   ...
 }:
+
 buildGoModule {
   pname = "deppa";
   version = "1.2";
diff --git a/packages/gomuks-web/package.nix b/packages/gomuks-web/package.nix
@@ -44,12 +44,20 @@ buildGoModule (finalAttrs: {
       doCheck = false;
 
       buildPhase = ''
+        runHook preBuild
+
         GOOS=js GOARCH=wasm go build -tags goolm -ldflags "${lib.concatStringsSep " " finalAttrs.ldflags}" -o ./gomuks.wasm ./cmd/wasmuks
+
+        runHook postBuild
       '';
 
       installPhase = ''
+        runHook preInstall
+
         mkdir -p $out
         cp gomuks.wasm $out
+
+        runHook postInstall
       '';
     };
 

@@ -60,7 +68,11 @@ buildGoModule (finalAttrs: {
     '';
 
     installPhase = ''
+      runHook preInstall
+
       cp -r dist $out
+
+      runHook postInstall
     '';
   });
 
diff --git a/packages/gotosocial-unstable/package.nix b/packages/gotosocial-unstable/package.nix
@@ -38,11 +38,17 @@ unstable.buildGo125Module (finalAttrs: {
     yarnLock = "${finalAttrs.src}/web/source/yarn.lock";
 
     configurePhase = ''
+      runHook preConfigure
+
       cp -r $node_modules node_modules
       chmod +w -R node_modules
+
+      runHook postConfigure
     '';
 
     buildPhase = ''
+      runHook preBuild
+
       mkdir -p ./web/source ./web/assets
 
       cp -r $src/web/source/. ./web/source

@@ -51,6 +57,8 @@ unstable.buildGo125Module (finalAttrs: {
       export NODE_OPTIONS=--openssl-legacy-provider
       node ./node_modules/ts-patch/bin/ts-patch.js install
       yarn --offline --cwd ./web/source build
+
+      runHook postBuild
     '';
 
     distPhase = "true";

@@ -94,7 +102,9 @@ unstable.buildGo125Module (finalAttrs: {
 
   installCheckPhase = ''
     runHook preCheck
+
     $out/bin/gotosocial --help
+
     runHook postCheck
   '';
 
diff --git a/packages/oneKpaq/package.nix b/packages/oneKpaq/package.nix
@@ -32,10 +32,14 @@ clangStdenv.mkDerivation (finalAttrs: {
   ];
 
   installPhase = ''
+    runHook preInstall
+
     mkdir -p $out/bin
     cp ./onekpaq $out/bin
     cp ./onekpaq.py $out/bin/onekpaq.py
     ln -s $out/bin/onekpaq $out/bin/onekpaq_encode
+
+    runHook postInstall
   '';
 
   meta = {