From 0204775a5fc99872c5cd10ad746f0ed1aded4124 Mon Sep 17 00:00:00 2001 From: Felix Maurer Date: Thu, 6 Jul 2023 00:04:50 +0200 Subject: [PATCH 1/3] stgit: use regular libiconv The darwin specific libiconv is not needed. --- pkgs/applications/version-management/stgit/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/version-management/stgit/default.nix b/pkgs/applications/version-management/stgit/default.nix index 3012bf47057e..92f6e70090ce 100644 --- a/pkgs/applications/version-management/stgit/default.nix +++ b/pkgs/applications/version-management/stgit/default.nix @@ -13,6 +13,7 @@ , git , perl , darwin +, libiconv }: rustPlatform.buildRustPackage rec { @@ -36,7 +37,7 @@ rustPlatform.buildRustPackage rec { nativeCheckInputs = [ git perl ] ++ lib.optionals stdenv.isDarwin [ - darwin.system_cmds darwin.libiconv + darwin.system_cmds libiconv ]; patches = [ From 838a29507b76da3e9cd10a9929441769850c320b Mon Sep 17 00:00:00 2001 From: Felix Maurer Date: Thu, 6 Jul 2023 00:06:19 +0200 Subject: [PATCH 2/3] stgit: Use phases from stdenv Instead of overwriting the full build/check/install phases, use the phases from stdenv. They allow to control the build by just setting a few variables for the targets and a single one for the flags needed to be passed to make. Additionally, they behave well with the rest of the build system, e.g., they run the hooks correctly. Also, the MAN_BASE_PATH is not used in the stgit build process and the installed man pages work fine without it, so remove it. --- .../version-management/stgit/default.nix | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/version-management/stgit/default.nix b/pkgs/applications/version-management/stgit/default.nix index 92f6e70090ce..e08f10c32fc7 100644 --- a/pkgs/applications/version-management/stgit/default.nix +++ b/pkgs/applications/version-management/stgit/default.nix @@ -59,24 +59,22 @@ rustPlatform.buildRustPackage rec { ${docbook_xml_dtd_45}/xml/dtd/docbook/docbookx.dtd ''; - makeFlags = lib.strings.concatStringsSep " " [ + makeFlags = [ "prefix=${placeholder "out"}" - "MAN_BASE_URL=${placeholder "out"}/share/man" "XMLTO_EXTRA=--skip-validation" "PERL_PATH=${perl}/bin/perl" ]; - buildPhase = '' - make all ${makeFlags} - ''; + dontCargoBuild = true; + buildFlags = [ "all" ]; - checkPhase = '' - make test ${makeFlags} - ''; + dontCargoCheck = true; + checkTarget = "test"; - installPhase = '' - make install install-man install-html ${makeFlags} + dontCargoInstall = true; + installTargets = [ "install" "install-man" "install-html" ]; + postInstall = '' wrapProgram $out/bin/stg --prefix PATH : ${lib.makeBinPath [ git ]} installShellCompletion --cmd stg \ From e98124d0b36bd9fd332addbce4ce4ea4b285285a Mon Sep 17 00:00:00 2001 From: Felix Maurer Date: Fri, 28 Jul 2023 02:09:42 +0200 Subject: [PATCH 3/3] stgit: 2.3.0 -> 2.3.2 The new version contains small fixes and some updated dependencies. One of the fixes was previously added as a patch and can now be removed. Release notes: https://github.com/stacked-git/stgit/releases/tag/v2.3.1 Release notes: https://github.com/stacked-git/stgit/releases/tag/v2.3.2 --- ...ix-use-canonical-Message-ID-spelling.patch | 249 ------------------ .../version-management/stgit/default.nix | 11 +- 2 files changed, 3 insertions(+), 257 deletions(-) delete mode 100644 pkgs/applications/version-management/stgit/0001-fix-use-canonical-Message-ID-spelling.patch diff --git a/pkgs/applications/version-management/stgit/0001-fix-use-canonical-Message-ID-spelling.patch b/pkgs/applications/version-management/stgit/0001-fix-use-canonical-Message-ID-spelling.patch deleted file mode 100644 index 71cab8fc283e..000000000000 --- a/pkgs/applications/version-management/stgit/0001-fix-use-canonical-Message-ID-spelling.patch +++ /dev/null @@ -1,249 +0,0 @@ -From c500ebe5a51da4eecba0c88d9a335e7a659e7ecb Mon Sep 17 00:00:00 2001 -From: Peter Grayson -Date: Sun, 18 Jun 2023 15:00:19 -0400 -Subject: fix: use canonical Message-ID spelling - -This change aligns with a change in git 2.41.0 to consistently spell -"Message-ID" instead of "Message-Id". - -The test suite is updated to accommodate both spellings, since such headers -are case insensitive. ---- - Documentation/stg.txt | 2 +- - completion/stgit.zsh | 2 +- - src/cmd/email/format.rs | 2 +- - src/cmd/email/send.rs | 2 +- - src/cmd/import.rs | 6 +++--- - t/t1800-import.sh | 2 +- - t/t1801-import-email.sh | 32 ++++++++++++++++---------------- - 7 files changed, 24 insertions(+), 24 deletions(-) - -diff --git a/Documentation/stg.txt b/Documentation/stg.txt -index fb4c08fb..20b75ce2 100644 ---- a/Documentation/stg.txt -+++ b/Documentation/stg.txt -@@ -302,7 +302,7 @@ N.B. Set 'commit.gpgsign' to determine whether patch commits themselves are GPG - See linkgit:git-config[1] for more information about 'commit.gpgsign'. - - stgit.import.message-id:: -- When set to 'true', create 'Message-Id:' trailer in the patch description of patches -+ When set to 'true', create 'Message-ID:' trailer in the patch description of patches - imported from email using linkstg:import[]. - - stgit.keepoptimized:: -diff --git a/completion/stgit.zsh b/completion/stgit.zsh -index 797d9044..de818242 100644 ---- a/completion/stgit.zsh -+++ b/completion/stgit.zsh -@@ -717,7 +717,7 @@ _stg-import() { - '--replace[replace unapplied patches in series]' - '--reject[leave rejected hunks in .rej files]' - '--keep-cr[do not remove CR from email lines ending with CRLF]' -- '--message-id[create Message-Id trailer from email header]' -+ '--message-id[create Message-ID trailer from email header]' - '(-d --showdiff)'{-d,--showdiff}'[show patch content in editor buffer]' - ':file:_files' - + '(source)' -diff --git a/src/cmd/email/format.rs b/src/cmd/email/format.rs -index f385b48a..b30af9c0 100644 ---- a/src/cmd/email/format.rs -+++ b/src/cmd/email/format.rs -@@ -323,7 +323,7 @@ fn message_options() -> Vec { - .long_help( - "Controls addition of `In-Reply-To` and `References` headers to make \ - the second and subsequent mails appear as replies to the first. Also \ -- controls generation of the `Message-Id` header to reference.\n\ -+ controls generation of the `Message-ID` header to reference.\n\ - \n\ - The optional