diff --git a/pkgs/by-name/si/sile/package.nix b/pkgs/by-name/si/sile/package.nix index d5ba7ee42103..1a64d5981d20 100644 --- a/pkgs/by-name/si/sile/package.nix +++ b/pkgs/by-name/si/sile/package.nix @@ -10,6 +10,7 @@ cargo, rustc, rustPlatform, + luarocks, # buildInputs lua, @@ -19,7 +20,6 @@ libiconv, stylua, typos, - darwin, # FONTCONFIG_FILE makeFontsConf, gentium, @@ -31,18 +31,18 @@ stdenv.mkDerivation (finalAttrs: { pname = "sile"; - version = "0.15.6"; + version = "0.15.7"; src = fetchurl { url = "https://github.com/sile-typesetter/sile/releases/download/v${finalAttrs.version}/sile-${finalAttrs.version}.tar.zst"; - sha256 = "sha256-CtPvxbpq2/qwuANPp9XDJQHlxIbFiaNZJvYZeUx/wyE="; + sha256 = "sha256-PjU6Qfn+FTL3vt66mkIAn/uXWMPPlH8iK6B264ekIis="; }; cargoDeps = rustPlatform.fetchCargoTarball { inherit (finalAttrs) src; nativeBuildInputs = [ zstd ]; dontConfigure = true; - hash = "sha256-5SheeabI4SqJZ3edAvX2rUEGTdCXHoBTa+rnX7lv9Cg="; + hash = "sha256-m21SyGtHwVCz+77pYq48Gjnrf/TLCLCf/IQ7AnZk+fo="; }; nativeBuildInputs = [ @@ -52,21 +52,20 @@ stdenv.mkDerivation (finalAttrs: { cargo rustc rustPlatform.cargoSetupHook + luarocks ]; + # luarocks propagates cmake, but it shouldn't be used as a build system. + dontUseCmakeConfigure = true; - buildInputs = - [ - finalAttrs.finalPackage.passthru.luaEnv - harfbuzz - icu - fontconfig - libiconv - stylua - typos - ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - darwin.apple_sdk.frameworks.AppKit - ]; + buildInputs = [ + finalAttrs.finalPackage.passthru.luaEnv + harfbuzz + icu + fontconfig + libiconv + stylua + typos + ]; configureFlags = [ @@ -111,41 +110,48 @@ stdenv.mkDerivation (finalAttrs: { enableParallelBuilding = true; passthru = { - luaEnv = lua.withPackages ( - ps: - with ps; + # Use this passthru variable to add packages to your lua environment. Use + # something like this in your development environment: + # + # myLuaEnv = lua.withPackages ( + # ps: lib.attrVals (sile.passthru.luaPackages ++ [ + # "lua-cjson" + # "lua-resty-http" + # ]) ps + # ) + luaPackages = [ - cassowary - cldr - fluent - linenoise - loadkit - lpeg - lua-zlib - lua_cliargs - luaepnf - luaexpat - luafilesystem - luarepl - luasec - luasocket - luautf8 - penlight - vstruct + "cassowary" + "cldr" + "fluent" + "linenoise" + "loadkit" + "lpeg" + "lua-zlib" + "lua_cliargs" + "luaepnf" + "luaexpat" + "luafilesystem" + "luarepl" + "luasec" + "luasocket" + "luautf8" + "penlight" + "vstruct" # lua packages needed for testing - busted - luacheck + "busted" + "luacheck" # packages needed for building api docs - ldoc + "ldoc" # NOTE: Add lua packages here, to change the luaEnv also read by `flake.nix` ] ++ lib.optionals (lib.versionOlder lua.luaversion "5.2") [ - bit32 + "bit32" ] ++ lib.optionals (lib.versionOlder lua.luaversion "5.3") [ - compat53 - ] - ); + "compat53" + ]; + luaEnv = lua.withPackages (ps: lib.attrVals finalAttrs.finalPackage.passthru.luaPackages ps); # Copied from Makefile.am tests.test = lib.optionalAttrs (!(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)) ( diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index dd74e39a5bdc..1ff9fa0fee89 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -744,6 +744,10 @@ with pkgs; propagatedBuildInputs = [ dieHook ]; } ../build-support/setup-hooks/shorten-perl-shebang.sh; + sile = callPackage ../by-name/si/sile/package.nix { + lua = luajit; + }; + singularity-tools = callPackage ../build-support/singularity-tools { }; srcOnly = callPackage ../build-support/src-only { };