Logo
Explore Help
Sign In
public/nixpkgs
1
0
Fork 0
You've already forked nixpkgs
Code Issues Pull Requests Packages Projects Releases Wiki Activity
nixpkgs/pkgs/development/compilers/haxe/setup-hook.sh

6 lines
96 B
Bash
Raw Normal View History

haxe: Add setup-hook and patch to add haxlib path. Introduces a new environment variable called HAXELIB_PATH and the patch for haxelib is trying to search that environment variable for other libraries. If the haxelib path for a particular library isn't found, it reverts to the normal behaviour of searching the user's home directory for a file called .haxelib, which in turn points to a repsitory path and that in turn has .current/.dev files to point it to the right version number. This avoids workarounds like this when using Nix to build Haxe projects: configurePhase = '' export HOME="$(pwd)" echo "$(pwd)" > .haxelib mkdir dependency1 echo dev > dependency1/.current echo "${dependency1}" > dependency1/.dev mkdir dependency2 echo dev > dependency2/.current echo "${dependency2}" > dependency2/.dev ''; Now every haxelib is expected to be in $out/lib/haxe/$name and whenever it is listed in buildInputs of another Haxe derivation, HAXELIB_PATH gets automatically set in the build environment. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-03-20 08:32:52 +01:00
addHaxeLibPath() {
addToSearchPath HAXELIB_PATH "$1/lib/haxe"
}
envHooks+=(addHaxeLibPath)
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 331ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API