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 21:27:00 +03:00
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
2022-08-01 18:21:38 +03:00
buildGoModule rec {
pname = "oh-my-posh";
2022-10-13 22:51:44 +03:00
version = "12.2.0";
2022-08-01 18:21:38 +03:00
src = fetchFromGitHub {
owner = "jandedobbeleer";
repo = pname;
rev = "v${version}";
2022-10-13 22:51:44 +03:00
sha256 = "sha256-zWoM9STdyJbgNqX5FQ70T+0dbENW7aOjHV+BShAHi8I=";
2022-08-01 18:21:38 +03:00
};
2022-10-11 08:48:55 +03:00
vendorSha256 = "sha256-zL5tkBkZa2Twc2FNNNUIycd/QvkpR1XEntpJ0j4z/xo=";
2022-08-01 18:21:38 +03:00
sourceRoot = "source/src";
2022-09-24 21:27:00 +03:00
nativeBuildInputs = [ installShellFiles ];
2022-08-01 18:21:38 +03: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 21:27:00 +03: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 18:21:38 +03:00
meta = with lib; {
description = "A prompt theme engine for any shell";
homepage = "https://ohmyposh.dev";
license = licenses.mit;
maintainers = with maintainers; [ lucperkins ];
};
}