blob: 03e13c918cc136a9b321e7cb860f17b56793a7e9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
buildGoModule rec {
pname = "oh-my-posh";
version = "23.14.1";
src = fetchFromGitHub {
owner = "jandedobbeleer";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-yOp4DnPfigdpz32/78w+pjFXpsXEAK9N4Bvv2tmT6iI=";
};
vendorHash = "sha256-EBLfbdTV15wSTOThzBY0d2KrSJzRaB8vNH53Uwc+XfM=";
sourceRoot = "${src.name}/src";
nativeBuildInputs = [
installShellFiles
];
ldflags = [
"-s"
"-w"
"-X github.com/jandedobbeleer/oh-my-posh/src/build.Version=${version}"
"-X github.com/jandedobbeleer/oh-my-posh/src/build.Date=1970-01-01T00:00:00Z"
];
tags = [
"netgo"
"osusergo"
"static_build"
];
postPatch = ''
# these tests requires internet access
rm image/image_test.go config/migrate_glyphs_test.go upgrade/notice_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 = "Prompt theme engine for any shell";
mainProgram = "oh-my-posh";
homepage = "https://ohmyposh.dev";
changelog = "https://github.com/JanDeDobbeleer/oh-my-posh/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ lucperkins urandom ];
};
}
|