chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / oh / oh-my-posh / package.nix
blobd861e5bcf20d3b6c69d162420eeae3f41e2246b8
1 { lib
2 , buildGoModule
3 , fetchFromGitHub
4 , installShellFiles
5 }:
7 buildGoModule rec {
8   pname = "oh-my-posh";
9   version = "23.15.0";
11   src = fetchFromGitHub {
12     owner = "jandedobbeleer";
13     repo = pname;
14     rev = "refs/tags/v${version}";
15     hash = "sha256-gZCR7cDSI0gRaTnYADOLpyHe26URo27JXJjnNxr4Jwc=";
16   };
18   vendorHash = "sha256-EBLfbdTV15wSTOThzBY0d2KrSJzRaB8vNH53Uwc+XfM=";
20   sourceRoot = "${src.name}/src";
22   nativeBuildInputs = [
23     installShellFiles
24   ];
26   ldflags = [
27     "-s"
28     "-w"
29     "-X github.com/jandedobbeleer/oh-my-posh/src/build.Version=${version}"
30     "-X github.com/jandedobbeleer/oh-my-posh/src/build.Date=1970-01-01T00:00:00Z"
31   ];
33   tags = [
34     "netgo"
35     "osusergo"
36     "static_build"
37   ];
39   postPatch = ''
40     # these tests requires internet access
41     rm image/image_test.go config/migrate_glyphs_test.go upgrade/notice_test.go
42   '';
44   postInstall = ''
45     mv $out/bin/{src,oh-my-posh}
46     mkdir -p $out/share/oh-my-posh
47     cp -r ${src}/themes $out/share/oh-my-posh/
48     installShellCompletion --cmd oh-my-posh \
49       --bash <($out/bin/oh-my-posh completion bash) \
50       --fish <($out/bin/oh-my-posh completion fish) \
51       --zsh <($out/bin/oh-my-posh completion zsh)
52   '';
54   meta = with lib; {
55     description = "Prompt theme engine for any shell";
56     mainProgram = "oh-my-posh";
57     homepage = "https://ohmyposh.dev";
58     changelog = "https://github.com/JanDeDobbeleer/oh-my-posh/releases/tag/v${version}";
59     license = licenses.mit;
60     maintainers = with maintainers; [ lucperkins urandom ];
61   };