-
-
Save cleverca22/908c0ad8672912feddab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, lua, fetchFromGitHub }: | |
stdenv.mkDerivation rec { | |
name = "cwrap-7"; | |
src = fetchFromGitHub { | |
owner = "torch"; | |
repo = "cwrap"; | |
rev = "6e7d52f0a359dee47127386adb03c0dc4ddd4766"; | |
sha256 = "01yh9z0axz0b4f87mbhkzh64dyv6c4jdkazcpmy1bl1am8apbd8w"; | |
}; | |
installPhase = '' | |
mkdir -p $out/share/lua/5.2/cwrap/ $out/nix-support | |
cp -v init.lua types.lua cinterface.lua $out/share/lua/5.2/cwrap/ | |
cat <<EOF > $out/nix-support/setup-hook | |
# FIXME, overrides all other lua packages, doesnt persist past compile | |
export LUA_PATH=$out/share/lua/5.2/?/init.lua\;$out/share/lua/5.2/?.lua\;?.lua | |
EOF | |
''; | |
buildInputs = [ lua ]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with import <nixpkgs> {}; | |
let | |
cwrap = pkgs.callPackage ./cwrap.nix {}; | |
in | |
stdenv.mkDerivation rec { | |
name = "torch-7"; | |
src = fetchFromGitHub { | |
owner = "torch"; | |
repo = "torch7"; | |
rev = "adfee5da9740aab2ebf647ecffe1102e8e3ccef5"; | |
sha256 = "0bl2ygfyapvfb2z5w2wk6v0ayg82a5xxh1449shvn7wv1815qs9g"; | |
}; | |
cmakeFlags = [ "-DLUA=${pkgs.lua}/bin/lua" ]; | |
buildInputs = [ cwrap cmake readline qt4 libjpeg libpng ncurses imagemagick gfortran gnuplot lua ]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment