Unverified Commit f2ea9a9f authored by Mario Rodas's avatar Mario Rodas Committed by GitHub
Browse files

Merge pull request #192805 from r-ryantm/auto-update/oh-my-posh

oh-my-posh: 9.4.0 -> 10.1.0
parents f2500749 eaad4f9e
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
{ lib, buildGoModule, fetchFromGitHub }:
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:

buildGoModule rec {
  pname = "oh-my-posh";
  version = "9.4.0";
  version = "10.1.0";

  src = fetchFromGitHub {
    owner = "jandedobbeleer";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-biMqihvGW+rsNhM/kXQb3px5aRtyvAI0cxDQ9KDK7y4=";
    sha256 = "sha256-Cbgpmew+2O59+7pvMv0QD0bi9f6cdWN1zAa9wUdJ1qM=";
  };

  vendorSha256 = "sha256-A4+sshIzPla7udHfnMmbFqn+fW3SOCrI6g7tArzmh1E=";

  sourceRoot = "source/src";

  nativeBuildInputs = [ installShellFiles ];

  ldflags = [ "-s" "-w" "-X" "main.Version=${version}" ];

  tags = [ "netgo" "osusergo" "static_build" ];
@@ -22,6 +24,10 @@ buildGoModule rec {
  postInstall = ''
    mkdir -p $out/share/oh-my-posh
    cp -r ${src}/themes $out/share/oh-my-posh/
    installShellCompletion --cmd oh-my-posh \
      --bash <($out/bin/oh-my-posh completion bash) \
      --fish <($out/bin/oh-my-posh completion fish) \
      --zsh <($out/bin/oh-my-posh completion zsh)
  '';

  meta = with lib; {