Files
nixpkgs/pkgs/by-name/lu/lux-cli/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

97 lines
2.0 KiB
Nix

{
fetchFromGitHub,
gnupg,
gpgme,
installShellFiles,
lib,
libgit2,
libgpg-error,
lua5_4,
makeWrapper,
nix,
openssl,
perl,
pkg-config,
rustPlatform,
versionCheckHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "lux-cli";
version = "0.18.1";
src = fetchFromGitHub {
owner = "lumen-oss";
repo = "lux";
tag = "v${finalAttrs.version}";
hash = "sha256-1wnK+WyKS3DioYImOkFKoMntEicULne2+cvD2PVIbz8=";
};
buildAndTestSubdir = "lux-cli";
cargoHash = "sha256-Hax+j4f+EfYCTp9VE4qGUdptp2GEy4q0rG1v2LIiPzo=";
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgram = "${placeholder "out"}/bin/${finalAttrs.meta.mainProgram}";
versionCheckProgramArg = "--version";
doInstallCheck = true;
nativeBuildInputs = [
installShellFiles
makeWrapper
perl
pkg-config
];
buildInputs = [
gnupg
gpgme
libgit2
libgpg-error
lua5_4
openssl
];
env = {
LIBGIT2_NO_VENDOR = 1;
LIBSSH2_SYS_USE_PKG_CONFIG = 1;
LUX_SKIP_IMPURE_TESTS = 1; # Disable impure unit tests
};
cargoTestFlags = "--lib"; # Disable impure integration tests
nativeCheckInputs = [
lua5_4
nix
];
postBuild = ''
cargo xtask dist-man
cargo xtask dist-completions
'';
postInstall = ''
installManPage target/dist/lx.1
installShellCompletion target/dist/lx.{bash,fish} --zsh target/dist/_lx
'';
meta = {
description = "Luxurious package manager for Lua";
longDescription = ''
A modern package manager for Lua.
compatible with luarocks.org and the Rockspec specification,
with first-class support for Nix and Neovim.
'';
homepage = "https://lux.lumen-labs.org/";
changelog = "https://github.com/lumen-oss/lux/blob/${finalAttrs.src.tag}/CHANGELOG.md";
license = lib.licenses.lgpl3Plus;
maintainers = with lib.maintainers; [
mrcjkb
];
platforms = lib.platforms.all;
mainProgram = "lx";
};
})