Created
May 25, 2017 10:55
-
-
Save expipiplus1/ac0a47db7f435dfd8b09136c3755655f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
{ myrtlepkgs ? import ../.. {} }: | |
let | |
pkgs = myrtlepkgs.nixpkgs; | |
inherit (pkgs) lib; | |
luaPackages = pkgs.lua51Packages; | |
luaPath = builtins.concatStringsSep ";" (map luaPackages.getLuaPath luaLibs); | |
luaCPath = builtins.concatStringsSep ";" (map luaPackages.getLuaCPath luaLibs); | |
# Add any additional lua libraries here. The list of available libraries can | |
# be found here: | |
# https://github.com/NixOS/nixpkgs/blob/1fdc34b73732715a74e926c4bee44c255df93360/pkgs/top-level/lua-packages.nix | |
luaLibs = with luaPackages; [cjson]; | |
in | |
pkgs.stdenv.mkDerivation { | |
name = "torch-env"; | |
nativeBuildInputs = with myrtlepkgs; | |
[ torch | |
]; | |
shellHook = '' | |
export LUA_PATH=${luaPath} | |
export LUA_CPATH=${luaCPath} | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment