Last active
August 29, 2021 22:48
-
-
Save sogaiu/43b38cca468a492a607a1cd532e0e925 to your computer and use it in GitHub Desktop.
jpm config file and instructions for "things under ~/.local"
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
# new instructions here | |
# | |
# 0. assuming a janet install with `make clean && PREFIX=$HOME/.local make && PREFIX=$HOME/.local make install` | |
# 1. git clone https://github.com/janet-lang/jpm | |
# 2. PREFIX=$HOME/.local janet bootstrap.janet | |
# | |
# alternatively, from a clone of the janet repository: | |
# | |
# 0. assuming a janet install with `make clean && PREFIX=$HOME/.local make && PREFIX=$HOME/.local make install` | |
# 1. PREFIX=$HOME/.local make install-jpm-git | |
# | |
# XXX: the following doesn't appear necessary any longer | |
# | |
# installation instructions | |
# | |
# 0. git clone https://github.com/janet-lang/jpm | |
# 1. save this file in the configs directory of jpm source | |
# 2. export JANET_JPM_CONFIG=$(pwd)/configs/linux_home_local_config.janet | |
# 3. janet jpm/cli.janet install --bootstrap-config=$JANET_JPM_CONFIG | |
# | |
# note that the last two lines were both necessary to achieve roughly | |
# the following result for invocations of `jpm show-paths` without having to | |
# set JANET_JPM_CONFIG explicitly: | |
# | |
# $ jpm show-paths | |
# binpath: $HOME/.local/bin | |
# modpath: $HOME/.local/lib/janet | |
# libpath: $HOME/.local/lib | |
# headerpath: $HOME/.local/include/janet | |
# syspath: $HOME/.local/lib/janet | |
(def prefix | |
(or (when-let [home (os/getenv "HOME")] | |
(let [local (string home "/.local")] | |
(when (= :directory | |
((os/stat local) :mode)) | |
local))) | |
"/usr/local")) | |
(def config | |
{:ar "ar" | |
:auto-shebang true | |
:binpath (string prefix "/bin") | |
:c++ "c++" | |
:c++-link "c++" | |
:cc "cc" | |
:cc-link "cc" | |
:cflags @["-std=c99"] | |
:cflags-verbose @["-Wall" "-Wextra"] | |
:cppflags @["-std=c++11"] | |
:curlpath "curl" | |
:dynamic-cflags @["-fPIC"] | |
:dynamic-lflags @["-shared" "-pthread"] | |
:gitpath "git" | |
:headerpath (string prefix "/include/janet") | |
:is-msvc false | |
:janet "janet" | |
:janet-cflags @[] | |
:janet-lflags @["-lm" "-ldl" "-lrt" "-pthread"] | |
:ldflags @[] | |
:lflags @[] | |
:libpath (string prefix "/lib") | |
:manpath (string prefix "/share/man/man1") | |
:modext ".so" | |
:modpath (string prefix "/lib/janet") | |
:nocolor false | |
:optimize 2 | |
:pkglist "https://github.com/janet-lang/pkgs.git" | |
:silent false | |
:statext ".a" | |
:tarpath "tar" | |
:test false | |
:use-batch-shell false | |
:verbose false}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment