Files
nixpkgs/pkgs/by-name/ut/utpm/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

62 lines
1.4 KiB
Nix

{
lib,
fetchFromGitHub,
rustPlatform,
openssl,
pkg-config,
stdenv,
buildPackages,
installShellFiles,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "utpm";
version = "0.2.0";
src = fetchFromGitHub {
owner = "Thumuss";
repo = "utpm";
tag = "v${finalAttrs.version}";
hash = "sha256-NlH+fPkTNqaQc2BrjerktnKS2L731K9G3z+N2xdx3kg=";
};
cargoHash = "sha256-WR9LD5HjLgh9jirnjTc6BeNg8KjVZI+DuJRYEbN3tmE=";
env.OPENSSL_NO_VENDOR = 1;
buildInputs = [
openssl
];
nativeBuildInputs = [
pkg-config
installShellFiles
];
postInstall =
let
utpm =
if stdenv.buildPlatform.canExecute stdenv.hostPlatform then
placeholder "out"
else
buildPackages.utpm;
in
''
installShellCompletion --cmd utpm \
--bash <(${utpm}/bin/utpm generate bash) \
--fish <(${utpm}/bin/utpm generate fish) \
--zsh <(${utpm}/bin/utpm generate zsh)
'';
meta = {
description = "Package manager for typst";
longDescription = ''
UTPM is a package manager for local and remote packages. Create quickly
new projects and templates from a singular tool, and then publish it directly
to Typst!
'';
homepage = "https://github.com/Thumuss/utpm";
license = lib.licenses.mit;
mainProgram = "utpm";
maintainers = with lib.maintainers; [ louis-thevenet ];
};
})