aboutsummaryrefslogtreecommitdiff
path: root/pkgs/stgit/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/stgit/default.nix')
-rw-r--r--pkgs/stgit/default.nix64
1 files changed, 64 insertions, 0 deletions
diff --git a/pkgs/stgit/default.nix b/pkgs/stgit/default.nix
new file mode 100644
index 0000000..da4f7ec
--- /dev/null
+++ b/pkgs/stgit/default.nix
@@ -0,0 +1,64 @@
1# Taken from nixpkgs repository
2{ lib
3, fetchFromGitHub
4, installShellFiles
5, python3Packages
6, asciidoc
7, docbook_xsl
8, git
9, perl
10, xmlto
11}:
12
13python3Packages.buildPythonApplication rec {
14 pname = "stgit";
15 version = "1.1";
16
17 src = fetchFromGitHub {
18 owner = "stacked-git";
19 repo = "stgit";
20 rev = "v${version}";
21 sha256 = "sha256-gfPf1yRmx1Mn1TyCBWmjQJBgXLlZrDcew32C9o6uNYk=";
22 };
23
24 nativeBuildInputs = [ installShellFiles asciidoc xmlto docbook_xsl ];
25
26 format = "other";
27
28 checkInputs = [ git perl ];
29
30 postPatch = ''
31 for f in Documentation/*.xsl; do
32 substituteInPlace $f \
33 --replace http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl \
34 ${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl \
35 --replace http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl \
36 ${docbook_xsl}/xml/xsl/docbook/html/docbook.xsl
37 done
38 '';
39
40 makeFlags = [
41 "prefix=${placeholder "out"}"
42 "MAN_BASE_URL=${placeholder "out"}/share/man"
43 "XMLTO_EXTRA=--skip-validation"
44 ];
45
46 buildFlags = [ "all" ];
47
48 checkTarget = "test";
49 checkFlags = [ "PERL_PATH=${perl}/bin/perl" ];
50
51 installTargets = [ "install" ];
52 postInstall = ''
53 installShellCompletion \
54 --zsh $out/share/stgit/completion/stgit.zsh
55 '';
56
57 meta = with lib; {
58 description = "A patch manager implemented on top of Git";
59 homepage = "https://stacked-git.github.io/";
60 license = licenses.gpl2Only;
61 platforms = platforms.unix;
62 maintainers = with maintainers; [ jshholland ];
63 };
64}