ctucx.git: nixfiles

ctucx' nixfiles

commit 93de66a1892bbe2801c9435369e16de308b7f058
parent 4fec2471aede6f6c944b7c1b5cb9b54425961f1f
Author: Leah (ctucx) <git@ctu.cx>
Date: Thu, 26 Oct 2023 08:40:19 +0200

pkgs/gotosocial: update version (0.11.0 -> 0.12.1)
1 file changed, 14 insertions(+), 11 deletions(-)
M
pkgs/gotosocial/default.nix
|
25
++++++++++++++-----------
diff --git a/pkgs/gotosocial/default.nix b/pkgs/gotosocial/default.nix
@@ -1,38 +1,41 @@
-{ applyPatches, fetchFromGitHub, mkYarnPackage, buildGoModule, lib, ffmpeg, makeWrapper, installShellFiles, ... }:
+{ pkgs, applyPatches, fetchFromGitHub, mkYarnPackage, buildGoModule, lib, ffmpeg, makeWrapper, installShellFiles, ... }:
 
-buildGoModule rec {
+pkgs.unstable.buildGo121Module rec {
   pname   = "gotosocial";
-  version = "0.11.0-${builtins.substring 0 6 rev}";
-  rev     = "815b5291e034864052771cd3561fea479027e00f";
+  version = "0.12.1-${builtins.substring 0 6 rev}";
+  rev     = "5fdc005061c773fda6e0da32abcc6f79ddee80ed";
+
 
   src = applyPatches {
     src = fetchFromGitHub {
       owner  = "superseriousbusiness";
       repo   = "gotosocial";
       inherit rev;
-      sha256 = "sha256-qbq5pDvG2L1s6BG+sh7eagcFNH/DWyANMQaAl2WcQzE";
+      sha256 = "sha256-4iNvlNjq8sQr++Z+QSY17bHxFd5bxOH4abMFEAh5W9w";
     };
     patches = [];
   };
 
   frontend-assets =  mkYarnPackage {
     name        = "${pname}_${version}-frontend-assets";
-    src         = "${src}/web";
+    src         = src;
 
     packageJSON = "${src}/web/source/package.json";
     yarnLock    = "${src}/web/source/yarn.lock";
 
     buildPhase = ''
-      mkdir assets source
-      cp -r $src/assets/. ./assets
-      cp -r $src/source/. ./source
+      mkdir -p ./web/source ./web/assets
+
+      cp -r $src/web/source/. ./web/source
+      cp -r $src/web/assets/. ./web/assets
+
 
       export NODE_OPTIONS=--openssl-legacy-provider
-      BUDO_BUILD=1 node ./source
+      yarn --offline --cwd ./web/source build
     '';
 
     distPhase    = "true";
-    installPhase = "cp -r assets $out";
+    installPhase = "cp -r ./web/assets $out";
   };
 
   ldflags = ["-s" "-w" "-extldflags '-static'" "-X 'main.Commit=${rev}'" "-X 'main.Version=${version}'"];