lux-cli: 0.39.7 -> 0.40.1 (#548977)

This commit is contained in:
Matthieu Coudron
2026-08-06 22:02:59 +00:00
committed by GitHub
2 changed files with 23 additions and 16 deletions

View File

@@ -1,10 +1,11 @@
{
stdenv,
buildPackages,
fetchFromGitHub,
gnupg,
gpgme,
installShellFiles,
lib,
libgit2,
libgpg-error,
lua5_4,
makeWrapper,
@@ -18,18 +19,18 @@
rustPlatform.buildRustPackage (finalAttrs: {
pname = "lux-cli";
version = "0.39.7";
version = "0.40.1";
src = fetchFromGitHub {
owner = "lumen-oss";
repo = "lux";
tag = "v${finalAttrs.version}";
hash = "sha256-2iM7VcFQJdz2H5HE0QOqxwksdkVLQfFKaXHbVOLw0I0=";
hash = "sha256-GBKzksqePbZQzKVFy3Qell41il35IivOiAAHl2p4eLU=";
};
buildAndTestSubdir = "lux-cli";
cargoHash = "sha256-rS1lPi28vef2u5PQdAYf2BI4g3vPDISasGYiW5qweYM=";
cargoHash = "sha256-qXOBViPv1gEUZFk1xbmvf4Wh2Xopmg8N9a7afvO9HF8=";
nativeInstallCheckInputs = [
versionCheckHook
@@ -47,14 +48,12 @@ rustPlatform.buildRustPackage (finalAttrs: {
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
};
@@ -68,14 +67,25 @@ rustPlatform.buildRustPackage (finalAttrs: {
nix
];
postBuild = ''
cargo xtask dist-man
cargo xtask dist-completions
'';
postInstall = ''
installManPage target/dist/*.1
installShellCompletion target/dist/lx.{bash,fish} --zsh target/dist/_lx
${
# Using lx to generate man pages and completions is faster than xtask
if stdenv.hostPlatform.emulatorAvailable buildPackages then
let
lx = "${stdenv.hostPlatform.emulator buildPackages} $out/bin/lx";
in
''
${lx} util man --target-dir="target/dist"
${lx} util completion --target-dir="target/dist"
''
else
''
cargo xtask dist-man
cargo xtask dist-completions
''
}
installManPage target/dist/*.1
installShellCompletion target/dist/lx.{bash,fish} --zsh target/dist/_lx
'';
meta = {

View File

@@ -3,7 +3,6 @@
gpgme,
isLuaJIT,
lib,
libgit2,
libgpg-error,
lua,
lux-cli,
@@ -43,7 +42,6 @@ toLuaModule (
buildInputs = [
gnupg
gpgme
libgit2
libgpg-error
openssl
];
@@ -60,7 +58,6 @@ toLuaModule (
];
env = {
LIBGIT2_NO_VENDOR = 1;
LIBSSH2_SYS_USE_PKG_CONFIG = 1;
LUX_SKIP_IMPURE_TESTS = 1; # Disable impure unit tests
# Allow undefined symbols on Darwin - they must be provided by the Lua runtime