about summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorMatthieu Coudron <mattator@gmail.com>2019-03-07 17:17:18 +0900
committerMatthieu Coudron <mattator@gmail.com>2020-06-06 17:33:39 +0200
commit404d057e89eb77099cd6ca8d50b79ccc52bb7914 (patch)
treed497b5247d908a4e9061556d177b43a0f1b4bb72 /doc
parent5cfcfc300b6742dcdac074eb63d025b555e062c0 (diff)
downloadnixlib-404d057e89eb77099cd6ca8d50b79ccc52bb7914.tar
nixlib-404d057e89eb77099cd6ca8d50b79ccc52bb7914.tar.gz
nixlib-404d057e89eb77099cd6ca8d50b79ccc52bb7914.tar.bz2
nixlib-404d057e89eb77099cd6ca8d50b79ccc52bb7914.tar.lz
nixlib-404d057e89eb77099cd6ca8d50b79ccc52bb7914.tar.xz
nixlib-404d057e89eb77099cd6ca8d50b79ccc52bb7914.tar.zst
nixlib-404d057e89eb77099cd6ca8d50b79ccc52bb7914.zip
Added an example about overlay
Diffstat (limited to 'doc')
-rw-r--r--doc/languages-frameworks/lua.section.md23
1 files changed, 22 insertions, 1 deletions
diff --git a/doc/languages-frameworks/lua.section.md b/doc/languages-frameworks/lua.section.md
index b4b593af7496..f11a1a5862ec 100644
--- a/doc/languages-frameworks/lua.section.md
+++ b/doc/languages-frameworks/lua.section.md
@@ -72,6 +72,27 @@ For the sake of completeness, here's another example how to install the environm
 }
 ```
 
+### How to override a Python package using overlays?
+
+Use the following overlay template:
+
+```nix
+self: prev:
+{
+
+  lua = prev.lua.override {
+    packageOverrides = luaself: luaprev: {
+
+      luarocks-nix = luaprev.luarocks-nix.overrideAttrs(oa: {
+        pname = "toto";
+        src = /home/my_luarocks/repository;
+      });
+  };
+
+  luaPackages = lua.pkgs;
+}
+```
+
 ### Temporary Lua environment with `nix-shell`
 
 For development you may need to use multiple environments.
@@ -154,7 +175,7 @@ Each interpreter has the following attributes:
 The `buildLuarocksPackage` function is implemented in `pkgs/development/interpreters/lua-5/build-lua-package.nix`
 The following is an example:
 ```nix
-luaexpat = buildLuaPackage rec {
+luaexpat = buildLuarocksPackage rec {
   pname = "luaexpat";
   version = "1.3.0-1";