+21
-16
pkgs/applications/version-management/sourcehut/man.nix
+21
-16
pkgs/applications/version-management/sourcehut/man.nix
···
9
9
unzip,
10
10
pip,
11
11
pythonOlder,
12
-
setuptools,
12
+
setuptools-scm,
13
13
}:
14
14
15
15
let
16
-
version = "0.16.5";
16
+
version = "0.18.1";
17
17
gqlgen = import ./fix-gqlgen-trimpath.nix {
18
18
inherit unzip;
19
-
gqlgenVersion = "0.17.43";
19
+
gqlgenVersion = "0.17.64";
20
20
};
21
+
22
+
patches = [ ./patches/core-go-update/man/patch-deps.patch ];
21
23
22
24
src = fetchFromSourcehut {
23
25
owner = "~sircmpwn";
24
26
repo = "man.sr.ht";
25
27
rev = version;
26
-
hash = "sha256-JFMtif2kIE/fs5PNcQtkJikAFNszgZTU7BG/8fTncTI=";
28
+
hash = "sha256-c2xFC1pmOSGGMP4RVOmgFogj7CY2kHrADsWsm7M5ZK4=";
27
29
};
28
30
29
31
mansrht-api = buildGoModule (
30
32
{
31
-
inherit src version;
33
+
inherit src version patches;
32
34
pname = "mansrht-api";
33
35
modRoot = "api";
34
-
vendorHash = "sha256-GVN11nEJqIHh8MtKvIXe4zcUwJph9eTSkJ2R+ufD+ic=";
36
+
vendorHash = "sha256-jKNHZrFydp3+cD8MR2izzE8bi4H2uT/7+x/wmPkEIIc=";
35
37
}
36
38
// gqlgen
37
39
);
38
40
in
39
41
buildPythonPackage rec {
40
-
inherit src version;
42
+
inherit src version patches;
41
43
pname = "mansrht";
42
44
pyproject = true;
43
45
44
46
disabled = pythonOlder "3.7";
45
47
46
-
postPatch = ''
47
-
substituteInPlace Makefile --replace "all: api" ""
48
-
'';
49
-
50
48
nativeBuildInputs = [
51
49
pip
52
-
setuptools
50
+
setuptools-scm
53
51
];
54
52
55
53
propagatedBuildInputs = [
···
57
55
pygit2
58
56
];
59
57
60
-
preBuild = ''
61
-
export PKGVER=${version}
62
-
export SRHT_PATH=${srht}/${python.sitePackages}/srht
58
+
env = {
59
+
PKGVER = version;
60
+
SRHT_PATH = "${srht}/${python.sitePackages}/srht";
61
+
PREFIX = placeholder "out";
62
+
};
63
+
64
+
postBuild = ''
65
+
make SASSC_INCLUDE=-I${srht}/share/sourcehut/scss/ all-share
63
66
'';
64
67
65
68
postInstall = ''
66
-
ln -s ${mansrht-api}/bin/api $out/bin/mansrht-api
69
+
ln -s ${mansrht-api}/bin/api $out/bin/man.sr.ht-api
70
+
install -Dm644 schema.sql $out/share/sourcehut/man.sr.ht-schema.sql
71
+
make install-share
67
72
'';
68
73
69
74
pythonImportsCheck = [ "mansrht" ];
+25
pkgs/applications/version-management/sourcehut/patches/core-go-update/man/patch-deps.patch
+25
pkgs/applications/version-management/sourcehut/patches/core-go-update/man/patch-deps.patch
···
1
+
diff --git a/go.mod b/go.mod
2
+
index 21c7713..8f158a2 100644
3
+
--- a/go.mod
4
+
+++ b/go.mod
5
+
@@ -5,7 +5,7 @@ go 1.22.5
6
+
toolchain go1.24.0
7
+
8
+
require (
9
+
- git.sr.ht/~sircmpwn/core-go v0.0.0-20250304085405-cbf919e45b5b
10
+
+ git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b
11
+
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c
12
+
github.com/99designs/gqlgen v0.17.64
13
+
github.com/vektah/gqlparser/v2 v2.5.23
14
+
diff --git a/go.sum b/go.sum
15
+
index f67a555..a366a60 100644
16
+
--- a/go.sum
17
+
+++ b/go.sum
18
+
@@ -1,5 +1,7 @@
19
+
git.sr.ht/~sircmpwn/core-go v0.0.0-20250304085405-cbf919e45b5b h1:d76irAQODAtl5G1zmKfwf60544fyGz74YT9k+7yYVxc=
20
+
git.sr.ht/~sircmpwn/core-go v0.0.0-20250304085405-cbf919e45b5b/go.mod h1:UHi3kXwgfZ/DIbMu5LeqZb3KrY/jsdUDefc8+3YWC3c=
21
+
+git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b h1:UuQxEJrh/NNdmaVcK34opEz7ypXnPyxeRcT7Aigz+7E=
22
+
+git.sr.ht/~sircmpwn/core-go v0.0.0-20250311210855-6ba248d8be1b/go.mod h1:UHi3kXwgfZ/DIbMu5LeqZb3KrY/jsdUDefc8+3YWC3c=
23
+
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c h1:v2opuaN0C5ZpuCifRNR9ZQ8V9IG+Ja80otK1MFj5RnI=
24
+
git.sr.ht/~sircmpwn/dowork v0.0.0-20241216125407-2b00aa42322c/go.mod h1:8neHEO3503w/rNtttnR0JFpQgM/GFhaafVwvkPsFIDw=
25
+
git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3/go.mod h1:wMEGFFFNuPos7vHmWXfszqImLppbc0wEhh6JBfJIUgw=