diff --git a/lang/nim/Dockerfile b/lang/nim/Dockerfile index 44339d1..479b997 100644 --- a/lang/nim/Dockerfile +++ b/lang/nim/Dockerfile @@ -1,8 +1,8 @@ FROM xena/alpine ENV PATH=$PATH:/opt/nim/bin:/root/.nimble/bin -ENV NIM_VERSION 0.14.2 -ENV NIM_DOWNLOAD_URL http://nim-lang.org/download/nim-0.14.2.tar.xz +ENV NIM_VERSION 0.15.2 +ENV NIM_DOWNLOAD_URL http://nim-lang.org/download/nim-$NIM_VERSION.tar.xz RUN apk update && \ apk add libc-dev gcc curl libgcc git perl xz tar && \ @@ -10,12 +10,14 @@ RUN apk update && \ mkdir -p /opt && cd /opt && \ curl -LO $NIM_DOWNLOAD_URL && \ /usr/bin/tar xJf nim-$NIM_VERSION.tar.xz && rm -f nim-$NIM_VERSION.tar.xz && \ - mv nim-0.14.2 nim && cd nim && \ + mv nim-$NIM_VERSION nim && cd nim && \ sh build.sh && \ cd .. && git clone https://github.com/nim-lang/nimble.git && \ cd nimble && \ nim -d:release c -r src/nimble -y install +ADD hack/nimble.nimble /root/.nimble/pkgs/nimble-0.7.10/nimble.nimble + LABEL language Nim LABEL version $NIM_VERSION LABEL distro Alpine Linux diff --git a/lang/nim/hack/nimble.nimble b/lang/nim/hack/nimble.nimble new file mode 100644 index 0000000..2f34810 --- /dev/null +++ b/lang/nim/hack/nimble.nimble @@ -0,0 +1,24 @@ +when dirExists("src/nimblepkg"): + # In the git repository the Nimble sources are in a ``src`` directory. + import src/nimblepkg/common +else: + # When the package is installed, the ``src`` directory disappears. + import nimblepkg/common + +# Package + +version = nimbleVersion +author = "Dominik Picheta" +description = "Nim package manager." +license = "BSD" + +bin = @["nimble"] +srcDir = "src" + +# Dependencies + +requires "nim >= 0.13.0", "compiler#head" + +task tests, "Run the Nimble tester!": + withDir "tests": + exec "nim c -r tester"