diff --git a/nixos/doc/manual/from_md/release-notes/rl-2305.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2305.section.xml index 242841a56b6..12023ce0797 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2305.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2305.section.xml @@ -132,6 +132,14 @@ before upgrading their systems. + + + git-bug has been updated to at least + version 0.8.0, which includes backwards incompatible changes. + The git-bug-migration package can be used + to upgrade existing repositories. + + The EC2 image module no longer fetches instance metadata in diff --git a/nixos/doc/manual/release-notes/rl-2305.section.md b/nixos/doc/manual/release-notes/rl-2305.section.md index b5c74836ef4..c2ba8658d69 100644 --- a/nixos/doc/manual/release-notes/rl-2305.section.md +++ b/nixos/doc/manual/release-notes/rl-2305.section.md @@ -44,6 +44,8 @@ In addition to numerous new and upgraded packages, this release has the followin - `podman` now uses the `netavark` network stack. Users will need to delete all of their local containers, images, volumes, etc, by running `podman system reset --force` once before upgrading their systems. +- `git-bug` has been updated to at least version 0.8.0, which includes backwards incompatible changes. The `git-bug-migration` package can be used to upgrade existing repositories. + - The EC2 image module no longer fetches instance metadata in stage-1. This results in a significantly smaller initramfs, since network drivers no longer need to be included, and faster boots, since metadata fetching can happen in parallel with startup of other services. This breaks services which rely on metadata being present by the time stage-2 is entered. Anything which reads EC2 metadata from `/etc/ec2-metadata` should now have an `after` dependency on `fetch-ec2-metadata.service` diff --git a/pkgs/applications/version-management/git-bug-migration/default.nix b/pkgs/applications/version-management/git-bug-migration/default.nix new file mode 100644 index 00000000000..53c496ae009 --- /dev/null +++ b/pkgs/applications/version-management/git-bug-migration/default.nix @@ -0,0 +1,34 @@ +{ lib, buildGoModule, fetchFromGitHub, git }: +buildGoModule rec { + pname = "git-bug-migration"; + version = "0.3.4"; + + src = fetchFromGitHub { + owner = "MichaelMure"; + repo = "git-bug-migration"; + rev = "v${version}"; + hash = "sha256-IOBgrU3C0ZHD2wx9LRVgKEJzDlUj6z2UXlHGU3tdTdQ="; + }; + + vendorSha256 = "sha256-Hid9OK91LNjLmDHam0ZlrVQopVOsqbZ+BH2rfQi5lS0="; + + checkInputs = [ git ]; + + ldflags = [ + "-X main.GitExactTag=${version}" + "-X main.GitLastTag=${version}" + ]; + + preCheck = '' + export HOME=$(mktemp -d) + git config --global user.name 'Nixpkgs Test User' + git config --global user.email 'nobody@localhost' + ''; + + meta = with lib; { + description = "Tool for upgrading repositories using git-bug to new versions"; + homepage = "https://github.com/MichaelMure/git-bug-migration"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ DeeUnderscore ]; + }; +} diff --git a/pkgs/applications/version-management/git-bug/default.nix b/pkgs/applications/version-management/git-bug/default.nix index b85681a73cd..45c0557c30a 100644 --- a/pkgs/applications/version-management/git-bug/default.nix +++ b/pkgs/applications/version-management/git-bug/default.nix @@ -1,42 +1,43 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub, installShellFiles }: buildGoModule rec { pname = "git-bug"; - version = "0.8.0"; # the `rev` below pins the version of the source to get - rev = "v0.8.0"; + version = "0.8.0"; src = fetchFromGitHub { - inherit rev; owner = "MichaelMure"; repo = "git-bug"; + rev = "v${version}"; sha256 = "12byf6nsamwz0ssigan1z299s01cyh8bhgj86bibl90agd4zs9n8"; }; vendorSha256 = "sha256-32kNDoBE50Jx1Ef9YwhDk7nd3CaTSnHPlu7PgWPUGfE="; + nativeBuildInputs = [ installShellFiles ]; + doCheck = false; + excludedPackages = [ "doc" "misc" ]; + ldflags = [ - "-X github.com/MichaelMure/git-bug/commands.GitCommit=${rev}" + "-X github.com/MichaelMure/git-bug/commands.GitCommit=v${version}" "-X github.com/MichaelMure/git-bug/commands.GitLastTag=${version}" "-X github.com/MichaelMure/git-bug/commands.GitExactTag=${version}" ]; postInstall = '' - install -D -m 0644 misc/completion/bash/git-bug "$out/share/bash-completion/completions/git-bug" - install -D -m 0644 misc/completion/zsh/git-bug "$out/share/zsh/site-functions/git-bug" - install -D -m 0644 -t "$out/share/man/man1" doc/man/* + installShellCompletion \ + --bash misc/completion/bash/git-bug \ + --zsh misc/completion/zsh/git-bug \ + --fish misc/completion/fish/git-bug - # not sure why the following executables are in $out/bin/ - rm -f $out/bin/cmd - rm -f $out/bin/completion - rm -f $out/bin/doc + installManPage doc/man/* ''; meta = with lib; { description = "Distributed bug tracker embedded in Git"; homepage = "https://github.com/MichaelMure/git-bug"; - license = licenses.gpl3Only; - maintainers = with maintainers; [ royneary ]; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ royneary DeeUnderscore ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 71c46f08d63..48097badba5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1692,6 +1692,8 @@ with pkgs; git-bug = callPackage ../applications/version-management/git-bug { }; + git-bug-migration = callPackage ../applications/version-management/git-bug-migration { }; + git-chglog = callPackage ../applications/version-management/git-chglog { }; git-cinnabar = callPackage ../applications/version-management/git-cinnabar {