mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-05 05:13:04 +00:00
af8d8a9dd5
Diff: https://github.com/jandedobbeleer/oh-my-posh/compare/refs/tags/v17.5.1...v17.5.2 Changelog: https://github.com/JanDeDobbeleer/oh-my-posh/releases/tag/v17.5.2
61 lines
1.3 KiB
Nix
61 lines
1.3 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "oh-my-posh";
|
|
version = "17.5.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "jandedobbeleer";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-WNB4NzOvabShVHivDs027y6QmU71GMrYJehCB9jPlA8=";
|
|
};
|
|
|
|
vendorHash = "sha256-fHwaCcN47+LkJYqRFSQgVddVuR1QfdFuSNDYFh1edM4=";
|
|
|
|
sourceRoot = "source/src";
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X main.Version=${version}"
|
|
];
|
|
|
|
tags = [
|
|
"netgo"
|
|
"osusergo"
|
|
"static_build"
|
|
];
|
|
|
|
postPatch = ''
|
|
# these tests requires internet access
|
|
rm engine/image_test.go engine/migrate_glyphs_test.go
|
|
'';
|
|
|
|
postInstall = ''
|
|
mv $out/bin/{src,oh-my-posh}
|
|
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; {
|
|
description = "A prompt theme engine for any shell";
|
|
homepage = "https://ohmyposh.dev";
|
|
changelog = "https://github.com/JanDeDobbeleer/oh-my-posh/releases/tag/v${version}";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ lucperkins urandom ];
|
|
};
|
|
}
|