lux-cli: 0.3.14 -> 0.4.4 (#406181)
This commit is contained in:
@@ -5,40 +5,25 @@
|
||||
lib,
|
||||
libgit2,
|
||||
libgpg-error,
|
||||
lua51Packages,
|
||||
lua52Packages,
|
||||
lua53Packages,
|
||||
lua54Packages,
|
||||
luaPackages,
|
||||
luajit,
|
||||
makeWrapper,
|
||||
nix,
|
||||
openssl,
|
||||
pkg-config,
|
||||
rustPlatform,
|
||||
symlinkJoin,
|
||||
versionCheckHook,
|
||||
}:
|
||||
let
|
||||
lux-lua-bundle = symlinkJoin {
|
||||
name = "lux-lua-bundle";
|
||||
paths = [
|
||||
lua51Packages.lux-lua
|
||||
lua52Packages.lux-lua
|
||||
lua53Packages.lux-lua
|
||||
lua54Packages.lux-lua
|
||||
];
|
||||
};
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "lux-cli";
|
||||
|
||||
version = "0.3.14";
|
||||
version = "0.4.4";
|
||||
|
||||
src = lua52Packages.lux-lua.src;
|
||||
src = luaPackages.lux-lua.src;
|
||||
|
||||
buildAndTestSubdir = "lux-cli";
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = lua52Packages.lux-lua.cargoHash;
|
||||
cargoHash = luaPackages.lux-lua.cargoHash;
|
||||
|
||||
nativeInstallCheckInputs = [
|
||||
versionCheckHook
|
||||
@@ -80,12 +65,6 @@ rustPlatform.buildRustPackage rec {
|
||||
cargo xtask dist-completions
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
# Instruct Lux to search for the lux-specific shared libraries in the lux-lua bundle
|
||||
# (temporary solution, until https://github.com/nvim-neorocks/lux/issues/655 is implemented)
|
||||
wrapProgram $out/bin/lx --set LUX_LIB_DIR "${lux-lua-bundle}"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Luxurious package manager for Lua";
|
||||
longDescription = ''
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
openssl,
|
||||
pkg-config,
|
||||
rustPlatform,
|
||||
stdenv,
|
||||
}:
|
||||
let
|
||||
luaMajorMinor = lib.take 2 (lib.splitVersion lua.version);
|
||||
@@ -21,14 +20,14 @@ in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "lux-lua";
|
||||
|
||||
version = "0.1.0";
|
||||
version = "0.1.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nvim-neorocks";
|
||||
repo = "lux";
|
||||
# NOTE: Lux's tags represent the lux-cli version, which may differ from the lux-lua version
|
||||
tag = "v0.3.14";
|
||||
hash = "sha256-gkUj3eeN0GnHM5sN4SKM/nHeBKe9ifrkg8TZRvA7FlM=";
|
||||
tag = "v0.4.4";
|
||||
hash = "sha256-jhkd5JDMXMwGCmaKLXoZepRwO+EIqLK2NL3hXDj627Q=";
|
||||
};
|
||||
|
||||
buildAndTestSubdir = "lux-lua";
|
||||
@@ -36,7 +35,7 @@ rustPlatform.buildRustPackage rec {
|
||||
buildFeatures = [ luaFeature ];
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-2bFVF4X4OpWwbxAjTr0orCLQNHKSO/koyeTXtD6d76M=";
|
||||
cargoHash = "sha256-ymESnATGxczfwM4Vy7qQ/UREpJDYIceFcZ9uAJpyRjU=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
@@ -51,8 +50,7 @@ rustPlatform.buildRustPackage rec {
|
||||
openssl
|
||||
];
|
||||
|
||||
# lux-lua checks are broken right now (https://github.com/nvim-neorocks/lux/pull/616)
|
||||
doCheck = false;
|
||||
doCheck = false; # lux-lua tests are broken in nixpkgs
|
||||
useNextest = true;
|
||||
nativeCheckInputs = [
|
||||
lua
|
||||
@@ -65,15 +63,16 @@ rustPlatform.buildRustPackage rec {
|
||||
LUX_SKIP_IMPURE_TESTS = 1; # Disable impure unit tests
|
||||
};
|
||||
|
||||
installPhase =
|
||||
let
|
||||
libExt = stdenv.hostPlatform.extensions.sharedLibrary;
|
||||
in
|
||||
''
|
||||
mkdir -p $out/${luaVersionDir}
|
||||
ls target/release
|
||||
install -T -v target/*/release/liblux_lua${libExt} $out/${luaVersionDir}/lux.so
|
||||
'';
|
||||
postBuild = ''
|
||||
cargo xtask-${luaFeature} dist
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -D -v target/dist/${luaVersionDir}/* -t $out/${luaVersionDir}
|
||||
install -D -v target/dist/lib/pkgconfig/* -t $out/lib/pkgconfig
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
cargoTestFlags = "--lib"; # Disable impure integration tests
|
||||
|
||||
|
||||
Reference in New Issue
Block a user