Unverified Commit e4e95ef5 authored by rewine's avatar rewine Committed by GitHub
Browse files

Merge pull request #306539 from katexochen/waypoint/remove

waypoint: remove
parents ae912928 97a30dcf
Loading
Loading
Loading
Loading
+0 −82
Original line number Diff line number Diff line
{ lib, buildGoModule, fetchFromGitHub, go-bindata, installShellFiles }:

buildGoModule rec {
  pname = "waypoint";
  version = "0.11.4";

  src = fetchFromGitHub {
    owner = "hashicorp";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-Zn11mVQV8lN62BVYfhXauKets7/mIqA0r+mG2TkRyPk=";
  };

  vendorHash = "sha256-z0qe8zSQ9PopGeyvMDhRpU+3jUgHoh+8jTsYGLPk3i4=";

  nativeBuildInputs = [ go-bindata installShellFiles ];

  # GIT_{COMMIT,DIRTY} filled in blank to prevent trying to run git and ending up blank anyway
  buildPhase = ''
    runHook preBuild
    make bin GIT_DESCRIBE="v${version}" GIT_COMMIT="" GIT_DIRTY=""
    runHook postBuild
  '';

  doCheck = false;

  installPhase = ''
    runHook preInstall

    local INSTALL="$out/bin/waypoint"
    install -D waypoint $out/bin/waypoint

    # waypoint's completion install command alters your <something>rc files
    # below is the equivalent of what it injects

    # Write to a file as it doesn't like EOF within <()
    cat > waypoint.fish <<EOF
    function __complete_waypoint
      set -lx COMP_LINE (commandline -cp)
      test -z (commandline -ct)
      and set COMP_LINE "$COMP_LINE "
      $INSTALL
    end
    complete -f -c waypoint -a "(__complete_waypoint)"
    EOF
    installShellCompletion --cmd waypoint \
      --bash <(echo "complete -C $INSTALL waypoint") \
      --fish <(cat waypoint.fish) \
      --zsh <(echo "complete -o nospace -C $INSTALL waypoint")

    runHook postInstall
  '';

  doInstallCheck = true;
  installCheckPhase = ''
    runHook preInstallCheck
    # `version` tries to write to ~/.config/waypoint
    export HOME="$TMPDIR"

    $out/bin/waypoint --help
    $out/bin/waypoint version | grep "CLI: v${version}"
    runHook postInstallCheck
  '';

  # Binary is static
  dontPatchELF = true;
  dontPatchShebangs = true;

  meta = with lib; {
    homepage = "https://waypointproject.io";
    changelog = "https://github.com/hashicorp/waypoint/blob/v${version}/CHANGELOG.md";
    description = "A tool to build, deploy, and release any application on any platform";
    mainProgram = "waypoint";
    longDescription = ''
      Waypoint allows developers to define their application build, deploy, and
      release lifecycle as code, reducing the time to deliver deployments
      through a consistent and repeatable workflow.
    '';
    license = licenses.mpl20;
    maintainers = with maintainers; [ winpat jk techknowlogick ];
  };
}
+1 −0
Original line number Diff line number Diff line
@@ -1311,6 +1311,7 @@ mapAliases ({
    'wayfireApplications-unwrapped.wcm' has been renamed to/replaced by 'wayfirePlugins.wcm'
    'wayfireApplications-unwrapped.wlroots' has been removed
  ''; # Add 2023-07-29
  waypoint = throw "waypoint has been removed from nixpkgs as the upstream project was archived"; # Added 2024-04-24
  wcm = throw "'wcm' has been renamed to/replaced by 'wayfirePlugins.wcm'"; # Add 2023-07-29
  webkitgtk_5_0 = throw "'webkitgtk_5_0' has been superseded by 'webkitgtk_6_0'"; # Added 2023-02-25
  wineWayland = wine-wayland;
+0 −2
Original line number Diff line number Diff line
@@ -4074,8 +4074,6 @@ with pkgs;
  wiimms-iso-tools = callPackage ../tools/filesystems/wiimms-iso-tools { };
  waypoint = callPackage ../applications/networking/cluster/waypoint { };
  xc = callPackage ../development/tools/xc { };
  ios-webkit-debug-proxy = callPackage ../development/mobile/ios-webkit-debug-proxy { };