diff --git a/pkgs/development/libraries/tbox/default.nix b/pkgs/development/libraries/tbox/default.nix new file mode 100644 index 000000000000..5c622cfe6656 --- /dev/null +++ b/pkgs/development/libraries/tbox/default.nix @@ -0,0 +1,37 @@ +{ lib +, stdenv +, fetchFromGitHub +}: + +stdenv.mkDerivation rec { + pname = "tbox"; + version = "1.7.3"; + + src = fetchFromGitHub { + owner = "tboox"; + repo = pname; + rev = "v${version}"; + hash = "sha256-6SqMvwxKSiJO7Z33xx7cJoECu5AJ1gWF8ZsiERWx8DU="; + }; + + configureFlags = [ + "--hash=y" + "--charset=y" + "--float=y" + "--demo=n" + ]; + + postInstall = '' + mkdir -p $out/lib/pkgconfig + substituteAll ${./libtbox.pc.in} $out/lib/pkgconfig/libtbox.pc + ''; + + meta = with lib; { + description = "A glib-like multi-platform c library"; + homepage = "https://docs.tboox.org"; + license = licenses.asl20; + platforms = platforms.linux; + maintainers = with maintainers; [ rewine ]; + }; +} + diff --git a/pkgs/development/libraries/tbox/libtbox.pc.in b/pkgs/development/libraries/tbox/libtbox.pc.in new file mode 100644 index 000000000000..19907b72c07c --- /dev/null +++ b/pkgs/development/libraries/tbox/libtbox.pc.in @@ -0,0 +1,10 @@ +prefix=@out@ +exec_prefix=${prefix} +libdir=@out@/lib +includedir=@out@/include + +Name: tbox +Description: A glib-like multi-platform c library +Version: @version@ +Libs: -L${libdir} -ltbox +Cflags: -I${includedir} diff --git a/pkgs/development/libraries/xmake-core-sv/default.nix b/pkgs/development/libraries/xmake-core-sv/default.nix new file mode 100644 index 000000000000..83442a8d48a9 --- /dev/null +++ b/pkgs/development/libraries/xmake-core-sv/default.nix @@ -0,0 +1,30 @@ +{ lib +, stdenv +, fetchFromGitHub +, autoreconfHook +}: + +stdenv.mkDerivation rec { + pname = "xmake-core-sv"; + version = "1.1"; + + src = fetchFromGitHub { + owner = "xmake-io"; + repo = pname; + rev = "v${version}"; + hash = "sha256-icvGQi6FNSZXNGs2oLiUKu6rrVsWcXh1r91kycGjnwY="; + }; + + nativeBuildInputs = [ + autoreconfHook + ]; + + meta = with lib; { + description = "Public domain cross-platform semantic versioning in c99"; + homepage = "https://github.com/xmake-io/xmake-core-sv"; + license = licenses.unlicense; + platforms = platforms.linux; + maintainers = with maintainers; [ rewine ]; + }; +} + diff --git a/pkgs/development/tools/build-managers/xmake/default.nix b/pkgs/development/tools/build-managers/xmake/default.nix new file mode 100644 index 000000000000..4ad117ab93f7 --- /dev/null +++ b/pkgs/development/tools/build-managers/xmake/default.nix @@ -0,0 +1,46 @@ +{ lib +, stdenv +, fetchurl +, pkg-config +, lua +, readline +, ncurses +, lz4 +, tbox +, xmake-core-sv +}: + +stdenv.mkDerivation rec { + pname = "xmake"; + version = "2.7.9"; + + src = fetchurl { + url = "https://github.com/xmake-io/xmake/releases/download/v${version}/xmake-v${version}.tar.gz"; + hash = "sha256-m0LYY0gz9IhbBbiUKd1gBE3KmSMvYJYyC42Ff7M9Ku8="; + }; + + nativeBuildInputs = [ + pkg-config + ]; + + buildInputs = [ + lua + lua.pkgs.cjson + readline + ncurses + lz4 + tbox + xmake-core-sv + ]; + + configureFlags = [ "--external=y" ]; + + meta = with lib; { + description = "A cross-platform build utility based on Lua"; + homepage = "https://xmake.io"; + license = licenses.asl20; + platforms = lua.meta.platforms; + maintainers = with maintainers; [ rewine ]; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a3c89899a557..6c0ac69253a3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16766,6 +16766,8 @@ with pkgs; tinyscheme = callPackage ../development/interpreters/tinyscheme { }; + tbox = callPackage ../development/libraries/tbox { }; + inherit (nodePackages) typescript; bupc = callPackage ../development/compilers/bupc { }; @@ -19603,6 +19605,10 @@ with pkgs; webdis = callPackage ../development/tools/database/webdis { }; + xmake = callPackage ../development/tools/build-managers/xmake { + lua = lua5_4; + }; + xc3sprog = callPackage ../development/embedded/xc3sprog { stdenv = gcc10StdenvCompat; }; xcb-imdkit = callPackage ../development/libraries/xcb-imdkit { }; @@ -24743,6 +24749,8 @@ with pkgs; xgeometry-select = callPackage ../tools/X11/xgeometry-select { }; + xmake-core-sv = callPackage ../development/libraries/xmake-core-sv { }; + xmlada = callPackage ../development/libraries/ada/xmlada { }; xmlrpc_c = callPackage ../development/libraries/xmlrpc-c { };