Skip to content

Commit

Permalink
default.nix: Commented
Browse files Browse the repository at this point in the history
  • Loading branch information
lukego committed Mar 15, 2017
1 parent 937375e commit 3a523de
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
{ pkgs ? (import <nixpkgs> {})
# default.nix - define the build environment for RaptorJIT
#
# This file can be used by 'nix-build' or 'nix-shell' to create a
# pristine build environment with precisely the expected software in
# $PATH. This makes it possible to build raptorjit in the same way on
# any machine.
#
# See README.md for usage instructions.

{ pkgs ? (import <nixpkgs> {}) # Use default nix distro (for now...)
, source ? ./.
, version ? "dev"
}:

with pkgs;
with clangStdenv;
with clangStdenv; # Clang instead of GCC

mkDerivation rec {
name = "raptorjit-${version}";
inherit version;
src = lib.cleanSource source;
enableParallelBuilding = true;
buildInputs = [ luajit ];
buildInputs = [ luajit ]; # LuaJIT to bootstrap DynASM
installPhase = ''
mkdir -p $out/bin
cp src/luajit $out/bin/raptorjit
'';

enableParallelBuilding = true; # Do 'make -j'
}

0 comments on commit 3a523de

Please sign in to comment.