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

sourcehut.metasrht: 0.69.8 -> 0.72.11

(cherry picked from commit 83b3f1d9)
parent 2caf79ff
Loading
Loading
Loading
Loading
+21 −17
Original line number Diff line number Diff line
@@ -16,47 +16,44 @@
  unzip,
  pip,
  pythonOlder,
  setuptools,
  setuptools-scm,
}:
let
  version = "0.69.8";
  version = "0.72.11";
  gqlgen = import ./fix-gqlgen-trimpath.nix {
    inherit unzip;
    gqlgenVersion = "0.17.43";
    gqlgenVersion = "0.17.64";
  };

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

  src = fetchFromSourcehut {
    owner = "~sircmpwn";
    repo = "meta.sr.ht";
    rev = version;
    hash = "sha256-K7p6cytkPYgUuYr7BVfU/+sVbSr2YEmreIDnTatUMyk=";
    hash = "sha256-dh+9wSQLL69xZ2Elmkyb9vEwpE7U7szz62VVS/0IM7Q=";
  };

  metasrht-api = buildGoModule (
    {
      inherit src version;
      inherit src version patches;
      pname = "metasrht-api";
      modRoot = "api";
      vendorHash = "sha256-vIkUK1pigVU8vZL5xpHLeinOga5eXXHTuDkHxwUz6uM=";
      vendorHash = "sha256-z4gRqI05t3m7ANyDJHmBcOCW476IG/eTfLetPRPbqtg=";
    }
    // gqlgen
  );
in
buildPythonPackage rec {
  pname = "metasrht";
  inherit version src;
  inherit version src patches;
  pyproject = true;

  disabled = pythonOlder "3.7";

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

  nativeBuildInputs = [
    pip
    setuptools
    setuptools-scm
  ];

  propagatedBuildInputs = [
@@ -71,14 +68,21 @@ buildPythonPackage rec {
    zxcvbn
  ];

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

  pythonImportsCheck = [ "metasrht" ];
+26 −0
Original line number Diff line number Diff line
diff --git a/go.mod b/go.mod
index 463f022..a7dc400 100644
--- a/go.mod
+++ b/go.mod
@@ -8,7 +8,7 @@ require (
 	git.sr.ht/~emersion/go-oauth2 v0.0.0-20240217160856-2e0d6e20b088
 	git.sr.ht/~emersion/gqlclient v0.0.0-20230820050442-8873fe0204b9
 	git.sr.ht/~sircmpwn/abused v0.0.0-20240216134550-21e8606c6f89
-	git.sr.ht/~sircmpwn/core-go v0.0.0-20250311090327-1e3cd785af1e
+	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 9c08b1a..abf1a58 100644
--- a/go.sum
+++ b/go.sum
@@ -6,6 +6,8 @@ git.sr.ht/~sircmpwn/abused v0.0.0-20240216134550-21e8606c6f89 h1:usW1i77LjfTfNzX
 git.sr.ht/~sircmpwn/abused v0.0.0-20240216134550-21e8606c6f89/go.mod h1:A+FTCDOSRA0naGMcM9OenO7kMhBxj+Kbd+4nBpg6NO4=
 git.sr.ht/~sircmpwn/core-go v0.0.0-20250311090327-1e3cd785af1e h1:epi/OdTKtazVbHHn1Qunx+nSHt96+xBBiNgs+SgRGwo=
 git.sr.ht/~sircmpwn/core-go v0.0.0-20250311090327-1e3cd785af1e/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=