Branch: refs/heads/master
  Home:   https://github.com/NixOS/nixpkgs
  Commit: d68e9b855c0a8fffef309bb5ce702b299664e591
      
https://github.com/NixOS/nixpkgs/commit/d68e9b855c0a8fffef309bb5ce702b299664e591
  Author: aszlig <[email protected]>
  Date:   2015-03-20 (Fri, 20 Mar 2015)

  Changed paths:
    M pkgs/development/compilers/haxe/default.nix
    A pkgs/development/compilers/haxe/haxelib-nix.patch
    A pkgs/development/compilers/haxe/setup-hook.sh

  Log Message:
  -----------
  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 <[email protected]>


  Commit: 3bb0e6df8a19c445b199aa74838aba3a63859a2e
      
https://github.com/NixOS/nixpkgs/commit/3bb0e6df8a19c445b199aa74838aba3a63859a2e
  Author: aszlig <[email protected]>
  Date:   2015-03-20 (Fri, 20 Mar 2015)

  Changed paths:
    A pkgs/development/compilers/haxe/hxcpp.nix
    M pkgs/top-level/all-packages.nix

  Log Message:
  -----------
  haxe: Add package for the hxcpp runtime library.

I'm not adding this to pkgs/development/libraries because it somewhat is
strongly tied to Haxe itself, because otherwise you can't compile to C++
and in the event that someone is going to create something like
"haxePackages" someday it is easier to notice when it's residing in the
Haxe folder.

In theory it would also work by using imperative haxelib, but you'll get
precompiled libraries which need to be patched on NixOS systems. That's
the main reason I was packaging this, among from the fact that even when
patching the libraries, it still leads to occasional library hell and
instabilities.

The package has two outputs: One with the library itself, needed for
compile time ($out) and another one ($lib) which is needed at runtime,
so after compiling, the $out path can be safely garbage collected.

Right now, I've set meta.platforms to Linux only, because that's where
I've tested it. In order to get it running on other platforms the
targetArch attribute has to be set accordingly.

We also build everything completely from scratch, even though there are
binaries within the source ZIP file. The main reason is to make smaller
library dependencies by avoiding bundled libraries and using the ones we
already ship with nixpkgs.

Signed-off-by: aszlig <[email protected]>


Compare: https://github.com/NixOS/nixpkgs/compare/9b41cf028197...3bb0e6df8a19
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits

Reply via email to