emilua: add setup hook that populates EMILUA_PATH
Signed-off-by: lucasew <lucas59356@gmail.com>
This commit is contained in:
parent
278b2dfe71
commit
f3d6b2ebef
@ -110,6 +110,13 @@ stdenv.mkDerivation (self: {
|
||||
"--no-suite" "libpsx"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/nix-support
|
||||
cp ${./setup-hook.sh} $out/nix-support/setup-hook
|
||||
substituteInPlace $out/nix-support/setup-hook \
|
||||
--replace @sitePackages@ "${self.passthru.sitePackages}"
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = gitUpdater {rev-prefix = "v";};
|
||||
inherit boost;
|
||||
|
17
pkgs/development/interpreters/emilua/setup-hook.sh
Normal file
17
pkgs/development/interpreters/emilua/setup-hook.sh
Normal file
@ -0,0 +1,17 @@
|
||||
addEmiluaPath() {
|
||||
addToSearchPathWithCustomDelimiter : EMILUA_PATH $1/@sitePackages@
|
||||
}
|
||||
|
||||
toEmiluaPath() {
|
||||
local paths="$1"
|
||||
local result=
|
||||
for i in $paths; do
|
||||
p="$i/@sitePackages@"
|
||||
result="${result}${result:+:}$p"
|
||||
done
|
||||
echo $result
|
||||
}
|
||||
|
||||
if [ -z "${dontAddEmiluaPath:-}" ]; then
|
||||
addEnvHooks "$hostOffset" addEmiluaPath
|
||||
fi
|
Loading…
Reference in New Issue
Block a user