Commit Graph

201 Commits

Author SHA1 Message Date
Nguyễn Gia Phong
e0d77b1e3c
luaPackages.vicious: 2.5.1 -> 2.6.0 2023-01-09 15:21:28 +09:00
zowoq
2c4b97d6a0 Revert "luaPackages.lsqlite3complete: init at 0.9.5-1"
This reverts commit 776bc0a8a5.

broke eval
2023-01-02 21:03:17 +10:00
Spencer Pogorzelski
776bc0a8a5 luaPackages.lsqlite3complete: init at 0.9.5-1 2023-01-02 11:47:50 +01:00
Sandro Jäckel
e33fb7418d
luaPlugins.lua-resty-core: init at 0.1.24 2022-12-26 03:07:48 +01:00
Sandro Jäckel
40ff955c07
luaPlugins.lua-resty-lrucache: init at 0.13 2022-12-26 03:07:45 +01:00
Sandro Jäckel
2ffe90fd2e
luaPlugins: cleanups 2022-12-21 20:31:44 +01:00
Travis A. Everett
2aedc956a6 luaPackages.nfd: fix build on darwin 2022-12-09 15:33:24 -06:00
Artturin
39571bd6fa luaPackages: copy passthruFun from python 2022-08-26 20:55:30 +03:00
Artturin
ec35f6341b lua-packages: try splicing 2022-08-26 20:04:02 +03:00
Artturin
f0ba59156f lua-packages.nix: remove unused args 2022-08-26 20:04:01 +03:00
Artturin
b1f80738f1 lua-packages.nix: run nixpkgs-fmt 2022-08-26 20:04:01 +03:00
Spencer Pogorzelski
91c80faea0 luaPackages.nfd: init at scm-1 2022-08-10 21:51:47 +02:00
Artturin
4a25775546 lua-packages: fix eval failure when cross-compiling
remove the inherit line did not work

fixes mpv for example

nix-repl> pkgsCross.aarch64-multiplatform.lua.withPackages (ps: with ps; [ luasocket ])
error: attribute 'runtimeShell' missing

       at /home/artturin/nixgits/my-nixpkgs/pkgs/top-level/all-packages.nix:849:17:

          848|       substitutions = {
          849|         shell = targetPackages.runtimeShell;
             |                 ^
          850|         passthru.tests = tests.makeWrapper;

       … while evaluating the attribute 'shell' of the derivation 'hook'

       at /home/artturin/nixgits/my-nixpkgs/pkgs/stdenv/generic/make-derivation.nix:270:7:

          269|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          270|       name =
             |       ^
          271|         let

       … while evaluating 'optionalString'

       at /home/artturin/nixgits/my-nixpkgs/lib/strings.nix:203:5:

          202|     # String to return if condition is true
          203|     string: if cond then string else "";
             |     ^
          204|

       … from call site

       at /home/artturin/nixgits/my-nixpkgs/pkgs/build-support/trivial-builders.nix:536:12:

          535|         cp ${script} $out/nix-support/setup-hook
          536|       '' + lib.optionalString (deps != []) ''
             |            ^
          537|         printWords ${toString deps} > $out/nix-support/propagated-build-inputs

       … while evaluating the attribute 'buildCommand' of the derivation 'hook'

       at /home/artturin/nixgits/my-nixpkgs/pkgs/stdenv/generic/make-derivation.nix:270:7:

          269|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          270|       name =
             |       ^
          271|         let

       … while evaluating anonymous lambda

       at /home/artturin/nixgits/my-nixpkgs/lib/lists.nix:646:25:

          645|    */
          646|   unique = foldl' (acc: e: if elem e acc then acc else acc ++ [ e ]) [];
             |                         ^
          647|

       … from call site

       at /home/artturin/nixgits/my-nixpkgs/pkgs/development/interpreters/lua-5/build-lua-package.nix:105:27:

          104|   # example externalDeps': [ { name = "CRYPTO"; dep = pkgs.openssl; } ]
          105|   externalDepsGenerated = lib.unique (lib.filter (drv: !drv ? luaModule) (
             |                           ^
          106|     luarocksDrv.nativeBuildInputs ++ luarocksDrv.propagatedBuildInputs ++ luarocksDrv.buildInputs)

       … while evaluating 'generateLuarocksConfig'

       at /home/artturin/nixgits/my-nixpkgs/pkgs/development/lua-modules/lib.nix:83:28:

           82|   */
           83|   generateLuarocksConfig = {
             |                            ^
           84|     externalDeps

       … from call site

       at /home/artturin/nixgits/my-nixpkgs/pkgs/development/interpreters/lua-5/build-lua-package.nix:85:23:

           84|   luarocks_content = let
           85|     generatedConfig = lua.pkgs.lib.generateLuarocksConfig {
             |                       ^
           86|       externalDeps = externalDeps ++ externalDepsGenerated;

       … while evaluating the attribute 'configurePhase' of the derivation 'lua5.2-luasocket-3.0.0-1-aarch64-unknown-linux-gnu'

       at /home/artturin/nixgits/my-nixpkgs/pkgs/stdenv/generic/make-derivation.nix:270:7:

          269|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          270|       name =
             |       ^
          271|         let

       … while evaluating anonymous lambda

       at /home/artturin/nixgits/my-nixpkgs/lib/lists.nix:646:25:

          645|    */
          646|   unique = foldl' (acc: e: if elem e acc then acc else acc ++ [ e ]) [];
             |                         ^
          647|

       … from call site

       at /home/artturin/nixgits/my-nixpkgs/pkgs/development/lua-modules/lib.nix:5:6:

            4|     modules =  filter hasLuaModule drvs;
            5|   in unique ([lua] ++ modules ++ concatLists (catAttrs "requiredLuaModules" modules));
             |      ^
            6|   # Check whether a derivation provides a lua module.

       … while evaluating 'requiredLuaModules'

       at /home/artturin/nixgits/my-nixpkgs/pkgs/development/lua-modules/lib.nix:3:24:

            2| let
            3|   requiredLuaModules = drvs: with lib; let
             |                        ^
            4|     modules =  filter hasLuaModule drvs;

       … from call site

       at /home/artturin/nixgits/my-nixpkgs/pkgs/development/interpreters/lua-5/wrapper.nix:13:14:

           12|   env = let
           13|     paths =  requiredLuaModules (extraLibs ++ [ lua ] );
             |              ^
           14|   in buildEnv {

       … while evaluating the attribute 'passAsFile'

       at /home/artturin/nixgits/my-nixpkgs/pkgs/build-support/buildenv/default.nix:77:5:

           76|     # XXX: The size is somewhat arbitrary
           77|     passAsFile = if builtins.stringLength pkgs >= 128*1024 then [ "pkgs" ] else [ ];
             |     ^
           78|   }

       … while evaluating the attribute 'passAsFile' of the derivation 'lua-aarch64-unknown-linux-gnu-5.2.4-env'

       at /home/artturin/nixgits/my-nixpkgs/pkgs/stdenv/generic/make-derivation.nix:270:7:

          269|     // (lib.optionalAttrs (attrs ? name || (attrs ? pname && attrs ? version)) {
          270|       name =
             |       ^
          271|         let
2022-07-14 22:08:55 +03:00
Matthieu Coudron
ce505a3984
vimPlugins: use lua derivation if it exists (#178180)
Neovim plugins are now more often than not written in lua.
One advantage of the lua ecosystem over vim's is the existence of
luarocks and the rockspec format, which allows to specify a package
dependencies formally.
I would like more neovim plugins to have a formal description,
"rockspec" being the current candidate.
This MR allows to use nix lua packages as neovim plugins, so as to enjoy
every benefit that rockspecs bring:
- dependdency discovery
- ability to run test suite
- luarocks versioning
- rockspec metadata

the vim update.py script will check if an attribute with the vim plugin
pname exists in lua51Packages. If it does, it uses
buildNeovimPluginFrom2Nix on it, which modifies the luarocks config to
do an almost flat install (luarocks will install the package in the lua
folder instead of share/5.1/lua etc).
It also calls toVimPlugin on it to get all the vim plugin niceties.

The list of packages that could benefit from this is available at
https://luarocks.org/labels/neovim
but I hope it grows.
2022-06-19 14:18:16 +02:00
Matthieu Coudron
011911bc54 luarocks-check-hook: init
The hook is added to buildLuarocksPackage when doCheck is set to true.
2022-06-18 21:23:45 +02:00
Rick van Schijndel
82ccbc08de
luaPackages.luxio: mark broken for darwin 2022-05-30 13:42:58 +02:00
Nguyễn Gia Phong
14aa4a4d0d luaPackages.vicious: 2.5.0 -> 2.5.1 2022-05-08 19:32:09 +02:00
Matthieu Coudron
8bb4179147 luarocks: 3.2 -> 3.8 2022-03-29 03:27:53 +02:00
Michael Raskin
397b649283 luaPackages.luarocks-3_7: init so that the reverted update can be accessed if desired 2021-10-16 20:57:36 +02:00
Michael Adler
3864442136 lua-packages: fix getLuaPath and getLuaCPath
luaLib.luaPathList is a list and not a function anymore which results in
the following error:

error: attempt to call something which is not a function but a list

       at /nix/store/v94vpi9na0flcnhh9gbmzcvbgfzqm10g-source/pkgs/top-level/lua-packages.nix:50:35:

           49|   getLuaPath = drv: getPath drv (luaLib.luaPathList lua.luaversion) ;
           50|   getLuaCPath = drv: getPath drv (luaLib.luaCPathList lua.luaversion) ;
             |                                   ^
           51|
2021-10-04 15:39:29 +02:00
Matthieu Coudron
abc36451d7 lua: create a folder for hooks
- moved lua hooks to a specific folder as I foresee to add more
- moved generateLuarocksConfig to lib
- fix getLuaPath
- removed the useless rockspecDir
2021-09-27 23:42:54 +02:00
Matthieu Coudron
496b8abf78 Apply suggestions from code review
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2021-09-12 03:03:56 +02:00
Matthieu Coudron
88842910b5 lua: introduced a lua lib
Goal is to improve separation between packages and utilities.
Can help with autocompletion/navigate nixpkgs faster.
Also it will help standardize how LUA_PATH is exported across packages,
so that one can more easily make lua changes across nixpkgs (for
    instance changing where lua modules are installed).
2021-09-12 03:03:56 +02:00
Matthieu Coudron
5b73af6f5b update-luarocks-packages: support in-repo rockspecs
to handle derivations that are not registered or updated on
luarocks.org, for instance neovim plugins.
2021-08-29 19:39:42 +02:00
Matthieu Coudron
06684792fb vimPlugins.plenary: init from lua package
This commit shows how to convert luarocks packages into (neo)vim ones.
The advantage for neovim lua plugins to register their rockspec (aka
package definition) is that the plugin can express its dependencies and
a few metadata through it.
2021-08-09 21:23:29 +02:00
Sandro Jäckel
62733b37b4
mysql: deprecate alias 2021-04-04 03:18:57 +02:00
Jonathan Ringer
9bb3fccb5b treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix
continuation of #109595

pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.

python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
2021-01-19 01:16:25 -08:00
Profpatsch
2497553b23 toplevel: stdenv.lib -> lib
The library does not depend on stdenv, that `stdenv` exposes `lib` is
an artifact of the ancient origins of nixpkgs.
2021-01-10 17:44:59 +01:00
Lucas Hoffmann
711c652088 vicious: 2.3.1 -> 2.5.0 2020-12-19 11:01:05 +01:00
Luka Blaskovic
bd400bd006 lyaml: init at 6.2.5-1, update all generated packages 2020-06-06 18:45:57 +02:00
Michael Reilly
84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
John Ericson
d0d5136cce Merge remote-tracking branch 'upstream/master' into wrapper-pname-support 2019-11-24 17:25:07 +00:00
John Ericson
9b090ccbca treewide: Get rid of most parseDrvName without breaking compat
That is because this commit should be merged to both master and
release-19.09.
2019-11-24 17:22:28 +00:00
Doron Behar
c32ecb4b0e luaPackages.pulseaudio: 0.1 -> 0.2 2019-11-15 05:24:19 +09:00
Doron Behar
922de4f4b5 luaPackages.pulseaudio: init at 0.1 2019-10-04 21:19:19 +02:00
Alexei Robyn
c62337d9c7 lua*Packages: Consolidate separate setup hooks together
- Lua packages now consistently use LUA_PATH/LUA_CPATH rather than a mix
  of those and NIX_LUA_PATH/NIX_LUA_CPATH
- Lua libraries are now consistently only added to the search path
variables if:
    1) The library actually has a corresponding directory to search
    2) The library is not already present in the search path
  This should help prevent the search paths from growing overly large
- Fixed bugs in some path helpers
- Changed the affected shell script indentation to 2 spaces; nixpkgs
  shell scripts are inconsistently split between 2 and 4 space
  indentation, but 2 matches better with the Nix expressions, so IMO it
  makes more sense
2019-09-01 17:42:20 +02:00
volth
46420bbaa3 treewide: name -> pname (easy cases) (#66585)
treewide replacement of

stdenv.mkDerivation rec {
  name = "*-${version}";
  version = "*";

to pname
2019-08-15 13:41:18 +01:00
Matthieu Coudron
c33153bf13
Merge pull request #63108 from Shados/lua-packaging-improvements-pr
Lua/luarocks packaging improvements
2019-06-19 14:23:31 +02:00
volth
f3282c8d1e treewide: remove unused variables (#63177)
* treewide: remove unused variables

* making ofborg happy
2019-06-16 19:59:05 +00:00
Alexei Robyn
274715cbc3 luaPackages: Replace all rockspec packages with generated ones
luaPackages replaced by generated ones:
- bit32
- compat53
- cqueues
- luacyrussasl -> cyrussasl (luarocks name)
- luaexpat
- luadbi -> luadbi front-end module + separate backend modules
  luadbi-{mysql,postgresql,sqlite3}
- luafilesystem
- luaossl
- luasec
- luasocket
- luastdlib -> stdlib (luarocks name)
- lrexlib -> lrexlib-pcre (we already have lrexlib-gnu and
  lrexlib-posix, lrexlib-pcre however appears to be the variant used in
  mudlet, which is the only current dep in nixpkgs)
- luasqlite -> luasql-sqlite3 (luarocks name)
- lfs -> luafilesytem (we literally had two manually written
  luafilesystem expressions, under different names)

Changes and additions to overrides to generated luarocks packgaes,
including:
- busted: Install bash completions along with the zsh ones
- cqueues:
    - Perform minor surgery on the rockspec to allow using a single
      rockspec to build for all supported Lua versions
    - Add a patch by @vcunat to work around a build issue
- luuid: Wrote a tiny patch to allow for Lua 5.1/Luajit compatibility
- General changes:
    - Sorted the packages
    - Attempted to make the formatting consistent
    - Preferenced `.override` instead of `.overrideAttrs` wherever
      possible

Minor changes to other packages to adjust for the Lua package changes:
- luakit expression simplified
- prosody expression simplified; but users will now need to specify the
  luadbi backend module they intend to use in withExtraLibs
- knot-resolver inputs correctd
- mudlet inputs corrected (although this package was and should still be
  broken)
2019-06-14 13:17:15 +10:00
Izorkin
cf976dd9bd luaPackages.luadbi: 0.7.1 -> 0.7.2 2019-06-11 22:55:11 +09:00
Matthieu Coudron
128ca15808 luaPackages.lpeg: 1.0.1 -> 1.0.2
and move to generated
2019-06-07 21:17:01 +09:00
Matthieu Coudron
2d77d620ce luaPackages.luaposix: move to generated 2019-06-06 14:39:14 +09:00
Matthieu Coudron
6fe580e30b luaPackages.mpack: removed duplicate manual package 2019-06-06 14:39:14 +09:00
Matthieu Coudron
dbf4c8051a luaPackages.lua-zlib: 1.1 -> 1.2
Renamed from luazlib to luarocks name lua-zlib.
Move to generated.
2019-06-06 12:12:15 +09:00
Matthieu Coudron
704358dcb5 luaPackages.luazip: 2007-10-30 -> 1.2.7 2019-06-05 16:20:27 +09:00
Matthieu Coudron
62d4e044e7 luaPackages.cjson: move to generated 2019-06-05 15:23:42 +09:00
Vladimír Čunát
7043d23093
lua*Packages.luasec: 0.6 -> 0.8
https://github.com/brunoos/luasec/blob/luasec-0.8/CHANGELOG
2019-05-21 17:15:11 +02:00
Vladimír Čunát
06b043013e
lua*Packages.luaossl: 20170903 -> 20181207
I'm in particular interested in :setCertificateChain()
2019-05-21 17:11:22 +02:00
Vladimír Čunát
110fb944f1
lua*Packages.http: 0.3 -> 0.4 (and generate)
One bugfix patch is included - merged upstream but not released yet.
knot-resolver wrapper would need to add binaryheap explicitly,
so it's migrated to the automatic LUA path discovery instead.
2019-05-01 11:28:47 +02:00