ctucx.git: nixfiles

ctucx' nixfiles

commit 4fec2471aede6f6c944b7c1b5cb9b54425961f1f
parent 3e5347a77a620b7db7a1a0099401007215e3f7fe
Author: Leah (ctucx) <git@ctu.cx>
Date: Thu, 26 Oct 2023 08:39:00 +0200

pkgs: add `masto-fe-standalone`
3 files changed, 32 insertions(+), 4 deletions(-)
diff --git a/pkgs/masto-fe-standalone/0001-public-auth.js-hardcode-instance-url.patch b/pkgs/masto-fe-standalone/0001-public-auth.js-hardcode-instance-url.patch
@@ -0,0 +1,25 @@
+From 40aaff52b3989ffc67a1f53f69ab5374e8780d61 Mon Sep 17 00:00:00 2001
+From: "Leah (ctucx)" <git@ctu.cx>
+Date: Wed, 25 Oct 2023 10:29:48 +0200
+Subject: [PATCH] public/auth.js: hardcode instance-url
+
+---
+ public/auth.js | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/public/auth.js b/public/auth.js
+index 6066b6896..d49281c72 100644
+--- a/public/auth.js
++++ b/public/auth.js
+@@ -3,7 +3,7 @@ document.addEventListener("DOMContentLoaded", async function() {
+ });
+ 
+ async function ready() {
+-  const domain = localStorage.getItem('domain');
++  const domain = "fedi.ctu.cx";
+   let accessToken = localStorage.getItem(`access_token`);
+ 
+   if (domain) document.getElementById('instance').value = domain;
+-- 
+2.40.1
+
diff --git a/pkgs/masto-fe-standalone/default.nix b/pkgs/masto-fe-standalone/default.nix
@@ -3,20 +3,22 @@
 stdenv.mkDerivation rec {
   pname   = "mastoFE-standalone";
   version = "0.0.0-${builtins.substring 0 6 rev}";
-  rev     = "65325a63fbcb456c1a9ea5d3e4684efcfde453b3";
+  rev     = "3962700726f58d946d5a6eed9e9bea63b8c2eb04";
 
   src = applyPatches {
     src = fetchgit {
       url = "https://iceshrimp.dev/iceshrimp/masto-fe-standalone";
       inherit rev;
-      sha256 = "sha256-7irOp5HMLNC6/rnLArjjvIF5p2NJ09TXx0QdKHS44qY";
+      sha256 = "sha256-ed6qb5IiqHQEtGHbexqivf+x4aF1JYBZKPKtG5Ao6Gg";
     };
-    patches = [];
+    patches = [
+      ./0001-public-auth.js-hardcode-instance-url.patch
+    ];
   };
 
   yarnOfflineCache = fetchYarnDeps {
     yarnLock = "${src}/yarn.lock";
-    hash = "sha256-qg6hQNMGL7M+FOI89vIz+l3Xxd69LuWnbxuUw/on054=";
+    hash = "sha256-ddEx2aBshkq83zcycOHUqg/CteCJTiE0jb3LCZdj5Z8=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/overlay.nix b/pkgs/overlay.nix
@@ -18,5 +18,6 @@ final: prev:
   homebridge             = final.callPackage ./homebridge {};
   agenix                 = final.callPackage ./agenix {};
   matrix-sliding-sync    = final.callPackage ./matrix-sliding-sync.nix {};
+  mastoFE-standalone     = final.callPackage ./masto-fe-standalone {};
 
 }