forked from mirrors/nixpkgs
Added an example about overlay
This commit is contained in:
parent
5cfcfc300b
commit
404d057e89
|
@ -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`
|
### Temporary Lua environment with `nix-shell`
|
||||||
|
|
||||||
For development you may need to use multiple environments.
|
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 `buildLuarocksPackage` function is implemented in `pkgs/development/interpreters/lua-5/build-lua-package.nix`
|
||||||
The following is an example:
|
The following is an example:
|
||||||
```nix
|
```nix
|
||||||
luaexpat = buildLuaPackage rec {
|
luaexpat = buildLuarocksPackage rec {
|
||||||
pname = "luaexpat";
|
pname = "luaexpat";
|
||||||
version = "1.3.0-1";
|
version = "1.3.0-1";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue