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

sourcehut.pastesrht: 0.15.4 -> 0.16.1



Signed-off-by: default avatarMarcin Serwin <marcin@serwin.dev>
(cherry picked from commit 11aa8593)
parent 8e03048e
Loading
Loading
Loading
Loading
+20 −17
Original line number Diff line number Diff line
@@ -8,49 +8,46 @@
  pyyaml,
  python,
  pythonOlder,
  setuptools,
  setuptools-scm,
  unzip,
}:

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

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

  src = fetchFromSourcehut {
    owner = "~sircmpwn";
    repo = "paste.sr.ht";
    rev = version;
    hash = "sha256-M38hAMRdMzcqxJv7j7foOIYEImr/ZYz/lbYOF9R9g2M=";
    hash = "sha256-SWtkE2/sTTJo0zAVFRfsA7fVF359OvgiHOT+yRaiads=";
  };

  pastesrht-api = buildGoModule (
    {
      inherit src version;
      inherit src version patches;
      pname = "pastesrht-api";
      modRoot = "api";
      vendorHash = "sha256-vt5nSPcx+Y/SaWcqjV38DTL3ZtzmdjbkJYMv5Fhhnq4=";
      vendorHash = "sha256-uVqxPa1YggPgdSzGzXxVNdf4dM2DPGDXajkSXz4NhFM=";
    }
    // gqlgen
  );
in
buildPythonPackage rec {
  inherit src version;
  inherit src version patches;
  pname = "pastesrht";
  pyproject = true;

  disabled = pythonOlder "3.7";

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

  nativeBuildInputs = [
    pip
    setuptools
    setuptools-scm
  ];

  propagatedBuildInputs = [
@@ -58,14 +55,20 @@ buildPythonPackage rec {
    pyyaml
  ];

  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 ${pastesrht-api}/bin/api $out/bin/pastesrht-api
    ln -s ${pastesrht-api}/bin/api $out/bin/paste.sr.ht-api
    make install-share
  '';

  pythonImportsCheck = [ "pastesrht" ];
+25 −0
Original line number Diff line number Diff line
diff --git a/go.mod b/go.mod
index bc39fc4..bd01e53 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-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 61766aa..e01c045 100644
--- a/go.sum
+++ b/go.sum
@@ -1,5 +1,7 @@
 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=