summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2023-11-08 18:44:14 +0100
committerGitHub <noreply@github.com>2023-11-08 18:44:14 +0100
commit64b6e49275f6388284379624eff747b369469355 (patch)
tree3f3cc3c8d03a0ba737670ac3c5e07b865be8260d
parent3714f48d813154073c8dd772c99cb3c4cb94aeae (diff)
parent9288bd04336367eefcdb3dcbeaf75d38374a9f96 (diff)
downloadnixpkgs-64b6e49275f6388284379624eff747b369469355.tar
nixpkgs-64b6e49275f6388284379624eff747b369469355.tar.gz
nixpkgs-64b6e49275f6388284379624eff747b369469355.tar.bz2
nixpkgs-64b6e49275f6388284379624eff747b369469355.tar.lz
nixpkgs-64b6e49275f6388284379624eff747b369469355.tar.xz
nixpkgs-64b6e49275f6388284379624eff747b369469355.tar.zst
nixpkgs-64b6e49275f6388284379624eff747b369469355.zip
Merge pull request #250204 from JaviMerino/guilt
guilt: init at 0.37-rc1
-rw-r--r--maintainers/maintainer-list.nix6
-rw-r--r--pkgs/applications/version-management/guilt/darwin-fix.patch20
-rw-r--r--pkgs/applications/version-management/guilt/default.nix92
-rw-r--r--pkgs/applications/version-management/guilt/guilt-help-mandir.patch15
-rw-r--r--pkgs/top-level/all-packages.nix2
5 files changed, 135 insertions, 0 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index 98fc84d82e5..0c326c9bbf7 100644
--- a/maintainers/maintainer-list.nix
+++ b/maintainers/maintainer-list.nix
@@ -7998,6 +7998,12 @@
     githubId = 488556;
     name = "Javier Aguirre";
   };
+  javimerino = {
+    email = "merino.jav@gmail.com";
+    name = "Javi Merino";
+    github = "JaviMerino";
+    githubId = 44926;
+  };
   jayesh-bhoot = {
     name = "Jayesh Bhoot";
     email = "jb@jayeshbhoot.com";
diff --git a/pkgs/applications/version-management/guilt/darwin-fix.patch b/pkgs/applications/version-management/guilt/darwin-fix.patch
new file mode 100644
index 00000000000..54c11059be6
--- /dev/null
+++ b/pkgs/applications/version-management/guilt/darwin-fix.patch
@@ -0,0 +1,20 @@
+uname -s is used to determine the differences between the command line
+utilities like stat or awk in linux and darwin. However, in nix, guilt
+will be using the nix versions of this programs, not the ones
+installed in the system.  Therefore, guilt should use the command-line
+parameters that the linux forms of these commands expect, even if it
+is being run on Darwin.
+
+diff --git a/guilt b/guilt
+index bf50343..cfc9332 100755
+--- a/guilt
++++ b/guilt
+@@ -986,7 +986,7 @@ guards_file="$GUILT_DIR/$branch/guards"
+ pager="more"
+ [ ! -z "$PAGER" ] && pager="$PAGER"
+ 
+-UNAME_S=`uname -s`
++UNAME_S="Linux"
+ 
+ if [ -r "$GUILT_PATH/os.$UNAME_S" ]; then
+ 	. "$GUILT_PATH/os.$UNAME_S"
diff --git a/pkgs/applications/version-management/guilt/default.nix b/pkgs/applications/version-management/guilt/default.nix
new file mode 100644
index 00000000000..664db771e93
--- /dev/null
+++ b/pkgs/applications/version-management/guilt/default.nix
@@ -0,0 +1,92 @@
+{ asciidoc
+, docbook_xml_dtd_45
+, docbook_xsl
+, fetchFromGitHub
+, gawk
+, git
+, gnused
+, lib
+, makeWrapper
+, openssl
+, perl
+, stdenv
+, xmlto
+}:
+
+stdenv.mkDerivation rec {
+  pname = "guilt";
+  version = "0.37-rc1";
+
+  src = fetchFromGitHub {
+    owner = "jeffpc";
+    repo = "guilt";
+    rev = "v${version}";
+    sha256 = "sha256-7OgRbMGYWtGvrZxKfJe0CkpmU3AUkPebF5NyTsfXeGA=";
+  };
+
+  doCheck = true;
+
+  patches = [
+    ./guilt-help-mandir.patch
+    ./darwin-fix.patch
+  ];
+  nativeBuildInputs = [
+    asciidoc
+    docbook_xml_dtd_45
+    docbook_xsl
+    makeWrapper
+    perl
+    xmlto
+  ];
+  buildInputs = [
+    gawk
+    git
+    gnused
+  ] ++ lib.optionals stdenv.isDarwin [ openssl ];
+  makeFlags = [
+    "PREFIX=$(out)"
+  ];
+
+  postBuild = ''
+    make -j $NIX_BUILD_CORES doc
+  '';
+
+  preCheck = ''
+    patchShebangs regression/run-tests regression/*.sh
+  '';
+
+  postInstall = ''
+    make PREFIX=$out install-doc
+  '';
+
+  postFixup = ''
+    wrapProgram $out/bin/guilt --prefix PATH : ${lib.makeBinPath buildInputs}
+  '';
+
+  meta = with lib; {
+    description = "Manage patches like quilt, on top of a git repository";
+    longDescription = ''
+      Andrew Morton originally developed a set of scripts for
+      maintaining kernel patches outside of any SCM tool. Others
+      extended these into a suite called quilt]. The basic idea behind
+      quilt is to maintain patches instead of maintaining source
+      files. Patches can be added, removed or reordered, and they can
+      be refreshed as you fix bugs or update to a new base
+      revision. quilt is very powerful, but it is not integrated with
+      the underlying SCM tools. This makes it difficult to visualize
+      your changes.
+
+      Guilt allows one to use quilt functionality on top of a Git
+      repository. Changes are maintained as patches which are
+      committed into Git. Commits can be removed or reordered, and the
+      underlying patch can be refreshed based on changes made in the
+      working directory. The patch directory can also be placed under
+      revision control, so you can have a separate history of changes
+      made to your patches.
+    '';
+    homepage = "https://github.com/jeffpc/guilt";
+    maintainers = with lib.maintainers; [ javimerino ];
+    license = [ licenses.gpl2 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/applications/version-management/guilt/guilt-help-mandir.patch b/pkgs/applications/version-management/guilt/guilt-help-mandir.patch
new file mode 100644
index 00000000000..54f1149f291
--- /dev/null
+++ b/pkgs/applications/version-management/guilt/guilt-help-mandir.patch
@@ -0,0 +1,15 @@
+nixpkgs' post-installation fixup moves the pages to share/man.  Tell guilt-help so that it can find them.
+
+diff --git a/guilt-help b/guilt-help
+index 93442a3..b29e059 100755
+--- a/guilt-help
++++ b/guilt-help
+@@ -34,7 +34,7 @@ case $# in
+ 		;;
+ esac
+ 
+-MANDIR=`dirname $0`/../man
++MANDIR=`dirname $0`/../share/man
+ MANDIR=`(cd "$MANDIR"; pwd)`
+ exec man -M "$MANDIR" "$page"
+ 
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 2a33d360cdb..464e079de75 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -2506,6 +2506,8 @@ with pkgs;
 
   gst = callPackage ../applications/version-management/gst { };
 
+  guilt = callPackage ../applications/version-management/guilt { };
+
   gut = callPackage ../applications/version-management/gut { };
 
   hred = callPackage ../development/tools/hred { };