2022-09-30 11:47:45 +00:00
|
|
|
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "oh-my-posh";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "12.16.0";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jandedobbeleer";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-11-21 17:40:18 +00:00
|
|
|
sha256 = "sha256-YrrOwTLVgxoriVgVDmn99ORSh04os0q/QnfBXtTtl5g=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
vendorSha256 = "sha256-OrtKFkWXqVoXKmN6BT8YbCNjR1gRTT4gPNwmirn7fjU=";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
sourceRoot = "source/src";
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
ldflags = [ "-s" "-w" "-X" "main.Version=${version}" ];
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
tags = [ "netgo" "osusergo" "static_build" ];
|
|
|
|
|
|
|
|
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)
|
|
|
|
'';
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A prompt theme engine for any shell";
|
|
|
|
homepage = "https://ohmyposh.dev";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ lucperkins ];
|
|
|
|
};
|
|
|
|
}
|