The module system modifies environment variables to make software and libraries (in)visible to your session when (un)loaded. A module file specifies all the environment changes required to make the software or library functional. Module files are versioned so multiple versions of the same software can be managed.
The module search path includes the directory ~/.usr/local/share/modulefiles. Modules from other locations can be loaded by adding the module directory to MODULEPATH. E.g., export MODULEPATH=path/to/modfile/dir:$MODULEPATH
The following file should be created at ~/.usr/local/share/pandoc/3.9.2.lua
-- -*- ~/.usr/local/share/pandoc/3.9.2.lua -*-
local pkgName = myModuleName()
local pkgVersion = myModuleVersion()
local pkgNameVer = myModuleFullName()
local base = pathJoin(os.getenv("HOME"),".local/", pkgNameVer)
whatis("Name: "..pkgName)
whatis("Version: "..pkgVersion)
whatis("Category: Utility")
whatis("Description: Pandoc is a universal document converter")
prepend_path("PATH",pathJoin(base,"bin"))
Afterwords, the module can be loaded and pandoc will be accessible by name:
module load pandoc/3.9.2
pandoc --help