forked from mirrors/nixpkgs
openrussian-cli: refactor to use lua.withPackages instead of luaPackages
This commit is contained in:
parent
d362e7c238
commit
3c7e3a328c
|
@ -1,6 +1,9 @@
|
||||||
{ stdenv, lib, fetchFromGitHub, gnumake, pkg-config, wget, unzip, gawk
|
{ stdenv, lib, fetchFromGitHub, gnumake, pkg-config, wget, unzip, gawk
|
||||||
, sqlite, which, luaPackages, installShellFiles, makeWrapper
|
, sqlite, which, lua, installShellFiles, makeWrapper
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
luaEnv = lua.withPackages(p: with p; [ luasql-sqlite3 luautf8 ]);
|
||||||
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "openrussian-cli";
|
pname = "openrussian-cli";
|
||||||
version = "1.0.0";
|
version = "1.0.0";
|
||||||
|
@ -16,11 +19,11 @@ stdenv.mkDerivation rec {
|
||||||
gnumake pkg-config wget unzip gawk sqlite which installShellFiles makeWrapper
|
gnumake pkg-config wget unzip gawk sqlite which installShellFiles makeWrapper
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = with luaPackages; [ lua luasql-sqlite3 luautf8 ];
|
buildInputs = [ luaEnv ];
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
"LUA=${luaPackages.lua}/bin/lua"
|
"LUA=${luaEnv}/bin/lua"
|
||||||
"LUAC=${luaPackages.lua}/bin/luac"
|
"LUAC=${luaEnv}/bin/luac"
|
||||||
];
|
];
|
||||||
|
|
||||||
dontConfigure = true;
|
dontConfigure = true;
|
||||||
|
@ -34,8 +37,8 @@ stdenv.mkDerivation rec {
|
||||||
cp openrussian $out/bin
|
cp openrussian $out/bin
|
||||||
|
|
||||||
wrapProgram $out/bin/openrussian \
|
wrapProgram $out/bin/openrussian \
|
||||||
--prefix LUA_PATH ';' "$LUA_PATH" \
|
--prefix LUA_PATH ';' '${lua.pkgs.lib.genLuaPathAbsStr luaEnv}' \
|
||||||
--prefix LUA_CPATH ';' "$LUA_CPATH"
|
--prefix LUA_CPATH ';' '${lua.pkgs.lib.genLuaCPathAbsStr luaEnv}'
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -8577,7 +8577,7 @@ with pkgs;
|
||||||
openrgb = libsForQt5.callPackage ../applications/misc/openrgb { };
|
openrgb = libsForQt5.callPackage ../applications/misc/openrgb { };
|
||||||
|
|
||||||
openrussian-cli = callPackage ../misc/openrussian-cli {
|
openrussian-cli = callPackage ../misc/openrussian-cli {
|
||||||
luaPackages = lua53Packages;
|
lua = lua5_3;
|
||||||
};
|
};
|
||||||
|
|
||||||
opensbi = callPackage ../misc/opensbi { };
|
opensbi = callPackage ../misc/opensbi { };
|
||||||
|
|
Loading…
Reference in a new issue