nixpkgs/pkgs/development/tools/oh-my-posh/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
1.0 KiB
Nix
Raw Normal View History

2022-09-24 18:27:00 +00:00
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
2022-08-01 15:21:38 +00:00
buildGoModule rec {
pname = "oh-my-posh";
2022-11-08 04:30:53 +00:00
version = "12.13.0";
2022-08-01 15:21:38 +00:00
src = fetchFromGitHub {
owner = "jandedobbeleer";
repo = pname;
rev = "v${version}";
2022-11-08 04:30:53 +00:00
sha256 = "sha256-bGg0UqqplJpsJ2xOHmu6y8ixGxdDkWwZyRrgzrNBlIY=";
2022-08-01 15:21:38 +00:00
};
2022-10-18 00:33:13 +00:00
vendorSha256 = "sha256-OrtKFkWXqVoXKmN6BT8YbCNjR1gRTT4gPNwmirn7fjU=";
2022-08-01 15:21:38 +00:00
sourceRoot = "source/src";
2022-09-24 18:27:00 +00:00
nativeBuildInputs = [ installShellFiles ];
2022-08-01 15:21:38 +00:00
ldflags = [ "-s" "-w" "-X" "main.Version=${version}" ];
tags = [ "netgo" "osusergo" "static_build" ];
postInstall = ''
mkdir -p $out/share/oh-my-posh
cp -r ${src}/themes $out/share/oh-my-posh/
2022-09-24 18:27:00 +00:00
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)
'';
2022-08-01 15:21:38 +00:00
meta = with lib; {
description = "A prompt theme engine for any shell";
homepage = "https://ohmyposh.dev";
license = licenses.mit;
maintainers = with maintainers; [ lucperkins ];
};
}