luabit: init at 1.0.2

This commit is contained in:
soyouzpanda 2025-03-15 10:07:39 +01:00
parent 89b0722869
commit 619788bf5d
Signed by: ecoppens
GPG key ID: 871893E37A732093
2 changed files with 47 additions and 0 deletions

View file

@ -72,6 +72,7 @@ in {
levitate = callPackage ./levitate {}; levitate = callPackage ./levitate {};
libubootenv = callPackage ./libubootenv {}; libubootenv = callPackage ./libubootenv {};
linotify = callPackage ./linotify {}; linotify = callPackage ./linotify {};
luabit = callPackage ./luabit {};
lualinux = callPackage ./lualinux {}; lualinux = callPackage ./lualinux {};
# we need to build real lzma instead of using xz, because the lzma # we need to build real lzma instead of using xz, because the lzma

46
pkgs/luabit/default.nix Normal file
View file

@ -0,0 +1,46 @@
{
lib,
stdenv,
fetchurl,
lua,
gcc,
}:
stdenv.mkDerivation rec {
pname = "luabit";
version = "1.0.2";
src = fetchurl {
url = "https://bitop.luajit.org/download/LuaBitOp-1.0.2.tar.gz";
hash = "sha256-EgfJKT3NUuudymU40bhzUr1RD052CTj1BIQz9/Jyzpk=";
};
nativeBuildInputs = [
gcc
];
buildInputs = [
lua
];
preConfigure = ''
substituteInPlace Makefile \
--replace-fail "gcc" "$CC"
'';
installPhase = ''
runHook preInstall
mkdir -p $out/lib/lua/${lua.luaversion}
cp bit.so $out/lib/lua/${lua.luaversion}
runHook postInstall
'';
meta = {
description = "Bit operation for Lua";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ soyouzpanda ];
platforms = lib.platforms.all;
};
}