python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / tools / oh-my-posh / default.nix
blobaed704a161d3c49ce00bef91886b26123e6bb098
1 { lib, buildGoModule, fetchFromGitHub, installShellFiles }:
3 buildGoModule rec {
4   pname = "oh-my-posh";
5   version = "12.13.0";
7   src = fetchFromGitHub {
8     owner = "jandedobbeleer";
9     repo = pname;
10     rev = "v${version}";
11     sha256 = "sha256-bGg0UqqplJpsJ2xOHmu6y8ixGxdDkWwZyRrgzrNBlIY=";
12   };
14   vendorSha256 = "sha256-OrtKFkWXqVoXKmN6BT8YbCNjR1gRTT4gPNwmirn7fjU=";
16   sourceRoot = "source/src";
18   nativeBuildInputs = [ installShellFiles ];
20   ldflags = [ "-s" "-w" "-X" "main.Version=${version}" ];
22   tags = [ "netgo" "osusergo" "static_build" ];
24   postInstall = ''
25     mkdir -p $out/share/oh-my-posh
26     cp -r ${src}/themes $out/share/oh-my-posh/
27     installShellCompletion --cmd oh-my-posh \
28       --bash <($out/bin/oh-my-posh completion bash) \
29       --fish <($out/bin/oh-my-posh completion fish) \
30       --zsh <($out/bin/oh-my-posh completion zsh)
31   '';
33   meta = with lib; {
34     description = "A prompt theme engine for any shell";
35     homepage = "https://ohmyposh.dev";
36     license = licenses.mit;
37     maintainers = with maintainers; [ lucperkins ];
38   };