Skip to content

Commit 457855f

Browse files
authored
utpm: 0-unstable-2024-12-17 -> 0.2.0 (#431420)
2 parents bf4dc6c + bdb0703 commit 457855f

File tree

1 file changed

+25
-8
lines changed

1 file changed

+25
-8
lines changed

pkgs/by-name/ut/utpm/package.nix

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,47 @@
44
rustPlatform,
55
openssl,
66
pkg-config,
7+
stdenv,
8+
buildPackages,
9+
installShellFiles,
710
}:
8-
rustPlatform.buildRustPackage {
11+
rustPlatform.buildRustPackage (finalAttrs: {
912
pname = "utpm";
10-
version = "0-unstable-2024-12-17";
11-
12-
cargoHash = "sha256-fqGxor2PgsQemnPNoZkgNUNc7yRg2eqHTLzJAVpt6+8=";
13+
version = "0.2.0";
1314

1415
src = fetchFromGitHub {
1516
owner = "Thumuss";
1617
repo = "utpm";
17-
rev = "6c2cabc8e7e696ea129f55aa7732a6be63bc2319";
18-
hash = "sha256-uuET0BG2kBFEEWSSZ35h6+tnqTTjEHOP50GR3IkL+CE=";
18+
tag = "v${finalAttrs.version}";
19+
hash = "sha256-NlH+fPkTNqaQc2BrjerktnKS2L731K9G3z+N2xdx3kg=";
1920
};
2021

22+
cargoHash = "sha256-WR9LD5HjLgh9jirnjTc6BeNg8KjVZI+DuJRYEbN3tmE=";
23+
2124
env.OPENSSL_NO_VENDOR = 1;
2225

2326
buildInputs = [
2427
openssl
2528
];
2629
nativeBuildInputs = [
2730
pkg-config
31+
installShellFiles
2832
];
2933

30-
doCheck = false; # no tests
34+
postInstall =
35+
let
36+
utpm =
37+
if stdenv.buildPlatform.canExecute stdenv.hostPlatform then
38+
placeholder "out"
39+
else
40+
buildPackages.utpm;
41+
in
42+
''
43+
installShellCompletion --cmd utpm \
44+
--bash <(${utpm}/bin/utpm generate bash) \
45+
--fish <(${utpm}/bin/utpm generate fish) \
46+
--zsh <(${utpm}/bin/utpm generate zsh)
47+
'';
3148

3249
meta = {
3350
description = "Package manager for typst";
@@ -41,4 +58,4 @@ rustPlatform.buildRustPackage {
4158
mainProgram = "utpm";
4259
maintainers = with lib.maintainers; [ louis-thevenet ];
4360
};
44-
}
61+
})

0 commit comments

Comments
 (0)