zaphyra's git: tgcNUR

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

commit b52362472b4693fb33f32a33c6e2d690902371f7
parent 236a68ab5e47937968760ea2ff67df37234f4f80
Author: Katja Ramona Sophie Kwast (zaphyra) <git@zaphyra.eu>
Date: Thu, 21 Aug 2025 11:44:57 +0200

packages/{mautrix-telegramgo,shaderbg,wlsbg}: move `rev` and `srcHash` out of the fetcher to make overrides easier
4 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/packages/gomuks-web/package.nix b/packages/gomuks-web/package.nix
@@ -21,8 +21,8 @@ buildGoModule (finalAttrs: {
     src = fetchFromGitHub {
       owner = "tulir";
       repo = "gomuks";
-      rev = finalAttrs.rev;
       hash = finalAttrs.srcHash;
+      inherit (finalAttrs) rev;
     };
     patches = [
       ./0001-web-remove-underscore-from-gomuks.wasm.patch
diff --git a/packages/mautrix-telegramgo/package.nix b/packages/mautrix-telegramgo/package.nix
@@ -17,16 +17,17 @@ let
   cppStdLib = if stdenv.hostPlatform.isDarwin then "-lc++" else "-lstdc++";
 
 in
-buildGoModule rec {
+buildGoModule (finalAttrs: {
   pname = "mautrix-telegramgo";
+  version = "0.0.0-${builtins.substring 0 6 finalAttrs.rev}";
   rev = "3ae88caa8045a6d36da5afd46423038b3d7591fc";
-  version = "0.0.0-${builtins.substring 0 6 rev}";
-  hash = "sha256-o4mmYBkws+DpXksUmzkF0XdFPn+iKCKdoa4XbEOXqr4=";
+  srcHash = "sha256-o4mmYBkws+DpXksUmzkF0XdFPn+iKCKdoa4XbEOXqr4=";
 
   src = fetchFromGitHub {
     owner = "mautrix";
     repo = "telegramgo";
-    inherit rev hash;
+    hash = finalAttrs.srcHash;
+    inherit (finalAttrs) rev;
   };
 
   buildInputs = (lib.optional (!withGoolm) olm) ++ (lib.optional withGoolm stdenv.cc.cc.lib);

@@ -46,4 +47,4 @@ buildGoModule rec {
     maintainers = [ tgcMaintainers.zaphyra ];
     mainProgram = "mautrix-telegram";
   };
-}
+})
diff --git a/packages/shaderbg/package.nix b/packages/shaderbg/package.nix
@@ -17,6 +17,7 @@ stdenv.mkDerivation (finalAttrs: {
   pname = "shaderbg";
   version = "0.0.0-unstable-2023-03-16";
   rev = "af9827d20bfe1956dd88fb2202b38ed0de705305";
+  srcHash = "sha256-/HtbS+vn69oEDVP4HDBvnmpkGRLz62j8lCZx+plrUeI=";
 
   buildInputs = [
     meson

@@ -31,8 +32,8 @@ stdenv.mkDerivation (finalAttrs: {
   src = fetchFromSourcehut {
     owner = "~mstoeckl";
     repo = finalAttrs.pname;
-    rev = finalAttrs.rev;
-    hash = "sha256-/HtbS+vn69oEDVP4HDBvnmpkGRLz62j8lCZx+plrUeI=";
+    hash = finalAttrs.srcHash;
+    inherit (finalAttrs) rev;
   };
 
   meta = {
diff --git a/packages/wlsbg/package.nix b/packages/wlsbg/package.nix
@@ -21,6 +21,8 @@
 stdenv.mkDerivation (finalAttrs: {
   pname = "wlsbg";
   version = "3.3.7";
+  rev = "v${finalAttrs.version}";
+  srcHash = "sha256-e0eOLsfU4wrz8Ck/iWwSnimTSYICmN/3vKeObmSE6zA=";
 
   nativeBuildInputs = [
     meson

@@ -43,8 +45,8 @@ stdenv.mkDerivation (finalAttrs: {
   src = fetchFromGitHub {
     owner = "Sublimeful";
     repo = finalAttrs.pname;
-    rev = "v${finalAttrs.version}";
-    hash = "sha256-e0eOLsfU4wrz8Ck/iWwSnimTSYICmN/3vKeObmSE6zA=";
+    hash = finalAttrs.srcHash;
+    inherit (finalAttrs) rev;
   };
 
   meta = {