Commit 95b55810 authored by Marcin Serwin's avatar Marcin Serwin Committed by github-actions[bot]
Browse files

sourcehut.todosrht: 0.75.10 -> 0.77.5



Signed-off-by: default avatarMarcin Serwin <marcin@serwin.dev>
(cherry picked from commit 8ade1de1)
parent 2d62b456
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
diff --git a/go.mod b/go.mod
index a352cfd..ab4beae 100644
--- a/go.mod
+++ b/go.mod
@@ -5,7 +5,7 @@ go 1.22.5
 toolchain go1.24.0
 
 require (
-	git.sr.ht/~sircmpwn/core-go v0.0.0-20250306104433-8e729e7539f4
+	git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b
 	git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c
 	github.com/99designs/gqlgen v0.17.64
 	github.com/Masterminds/squirrel v1.5.4
diff --git a/go.sum b/go.sum
index 5342a85..50c87f1 100644
--- a/go.sum
+++ b/go.sum
@@ -1,5 +1,7 @@
 git.sr.ht/~sircmpwn/core-go v0.0.0-20250306104433-8e729e7539f4 h1:LvEcAyN0YDwqsa7QkFXne0bQEWAod6jAI2VIc+kk5sk=
 git.sr.ht/~sircmpwn/core-go v0.0.0-20250306104433-8e729e7539f4/go.mod h1:UHi3kXwgfZ/DIbMu5LeqZb3KrY/jsdUDefc8+3YWC3c=
+git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b h1:UuQxEJrh/NNdmaVcK34opEz7ypXnPyxeRcT7Aigz+7E=
+git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b/go.mod h1:UHi3kXwgfZ/DIbMu5LeqZb3KrY/jsdUDefc8+3YWC3c=
 git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c h1:v2opuaN0C5ZpuCifRNR9ZQ8V9IG+Ja80otK1MFj5RnI=
 git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c/go.mod h1:8neHEO3503w/rNtttnR0JFpQgM/GFhaafVwvkPsFIDw=
 git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3/go.mod h1:wMEGFFFNuPos7vHmWXfszqImLppbc0wEhh6JBfJIUgw=
+21 −17
Original line number Diff line number Diff line
@@ -10,47 +10,44 @@
  python,
  unzip,
  pythonOlder,
  setuptools,
  setuptools-scm,
}:

let
  version = "0.75.10";
  version = "0.77.5";
  gqlgen = import ./fix-gqlgen-trimpath.nix {
    inherit unzip;
    gqlgenVersion = "0.17.45";
    gqlgenVersion = "0.17.64";
  };

  src = fetchFromSourcehut {
    owner = "~sircmpwn";
    repo = "todo.sr.ht";
    rev = version;
    hash = "sha256-3dVZdupsygM7/6T1Mn7yRc776aa9pKgwF0hgZX6uVQ0=";
    hash = "sha256-P+ypiW3GHoMClBmW5lUNAG6/sydHHnFGyGajmC3WARg=";
  };

  patches = [ ./patches/core-go-update/todo/patch-deps.patch ];

  todosrht-api = buildGoModule (
    {
      inherit src version;
      inherit src version patches;
      pname = "todosrht-api";
      modRoot = "api";
      vendorHash = "sha256-fImOQLnQLHTrg5ikuYRZ+u+78exAiYA19DGQoUjQBOM=";
      vendorHash = "sha256-ny6cyUIgmupeU8SFP8+RSQU7DD3Lk+j+mZQBoXKv63I=";
    }
    // gqlgen
  );
in
buildPythonPackage rec {
  inherit src version;
  inherit src version patches;
  pname = "todosrht";
  pyproject = true;

  disabled = pythonOlder "3.7";

  postPatch = ''
    substituteInPlace Makefile \
      --replace "all: api" ""
  '';

  nativeBuildInputs = [
    setuptools
    setuptools-scm
  ];

  propagatedBuildInputs = [
@@ -58,13 +55,20 @@ buildPythonPackage rec {
    alembic
  ];

  preBuild = ''
    export PKGVER=${version}
    export SRHT_PATH=${srht}/${python.sitePackages}/srht
  env = {
    PKGVER = version;
    SRHT_PATH = "${srht}/${python.sitePackages}/srht";
    PREFIX = placeholder "out";
  };

  postBuild = ''
    make SASSC_INCLUDE=-I${srht}/share/sourcehut/scss/ all-share
  '';

  postInstall = ''
    ln -s ${todosrht-api}/bin/api $out/bin/todosrht-api
    ln -s ${todosrht-api}/bin/api $out/bin/todo.sr.ht-api
    install -Dm644 schema.sql $out/share/sourcehut/todo.sr.ht-schema.sql
    make install-share
  '';

  # pytest tests fail