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

sourcehut.listssrht: 0.57.18 -> 0.62.3

(cherry picked from commit b0fdbb36)
parent 8a3d510d
Loading
Loading
Loading
Loading
+21 −17
Original line number Diff line number Diff line
@@ -12,48 +12,45 @@
  unzip,
  pip,
  pythonOlder,
  setuptools,
  setuptools-scm,
}:

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

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

  src = fetchFromSourcehut {
    owner = "~sircmpwn";
    repo = "lists.sr.ht";
    rev = version;
    hash = "sha256-l+QPocnwHTjrU+M0wnm4tBrbz8KmSb6DovC+skuAnLc=";
    hash = "sha256-HU3hnKdIoseCo1/lt3GIOQ5d3joykN11/Bzvk4xvH4Y=";
  };

  listssrht-api = buildGoModule (
    {
      inherit src version;
      inherit src version patches;
      pname = "listssrht-api";
      modRoot = "api";
      vendorHash = "sha256-UeVs/+uZNtv296bzXIBio2wcg3Uzu3fBM4APzF9O0hY=";
      vendorHash = "sha256-XKDEr8ESs9oBh7DKu2jgPEMDY99nN25inkNwU/rrza8=";
    }
    // gqlgen
  );
in
buildPythonPackage rec {
  inherit src version;
  inherit src version patches;
  pname = "listssrht";
  pyproject = true;

  disabled = pythonOlder "3.7";

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

  nativeBuildInputs = [
    pip
    setuptools
    setuptools-scm
  ];

  propagatedBuildInputs = [
@@ -65,13 +62,20 @@ buildPythonPackage rec {
    emailthreads
  ];

  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 ${listssrht-api}/bin/api $out/bin/listssrht-api
    ln -s ${listssrht-api}/bin/api $out/bin/lists.sr.ht-api
    install -Dm644 schema.sql $out/share/sourcehut/lists.sr.ht-schema.sql
    make install-share
  '';

  pythonImportsCheck = [ "listssrht" ];
+26 −0
Original line number Diff line number Diff line
diff --git a/go.mod b/go.mod
index da34484..24757a0 100644
--- a/go.mod
+++ b/go.mod
@@ -6,7 +6,7 @@ toolchain go1.24.0
 
 require (
 	git.sr.ht/~emersion/go-emailthreads v0.0.0-20230220165133-75c43015b6c2
-	git.sr.ht/~sircmpwn/core-go v0.0.0-20250304085405-cbf919e45b5b
+	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 4590dd5..0c49985 100644
--- a/go.sum
+++ b/go.sum
@@ -2,6 +2,8 @@ git.sr.ht/~emersion/go-emailthreads v0.0.0-20230220165133-75c43015b6c2 h1:5CkkRD
 git.sr.ht/~emersion/go-emailthreads v0.0.0-20230220165133-75c43015b6c2/go.mod h1:CQUF7XpyupxjwxlNX3PHRCYL+N2COXTRRRS4MgM49R4=
 git.sr.ht/~sircmpwn/core-go v0.0.0-20250304085405-cbf919e45b5b h1:d76irAQODAtl5G1zmKfwf60544fyGz74YT9k+7yYVxc=
 git.sr.ht/~sircmpwn/core-go v0.0.0-20250304085405-cbf919e45b5b/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=