Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Nim (from source) #10046

Merged
merged 2 commits into from
Nov 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions recipes/nim/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
=====================================================
Nim -- a Compiler for Nim. https://nim-lang.org/

Copyright (C) 2006-2018 Andreas Rumpf. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

[ MIT license: http://www.opensource.org/licenses/mit-license.php ]
28 changes: 28 additions & 0 deletions recipes/nim/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/env bash

# based on https://github.com/bioconda/bioconda-recipes/tree/master/recipes/pb-falconc

set -vexu -o pipefail

pushd nim
# inject compilers
echo "gcc.exe = \"$CC\"" >> config/nim.cfg
echo "gcc.linkerexe = \"$CC\"" >> config/nim.cfg
echo "clang.exe = \"$CC\"" >> config/nim.cfg
echo "clang.linkerexe = \"$CC\"" >> config/nim.cfg
./build.sh
bin/nim c koch
./koch tools

ls -larth
ls -larth bin/
ls -larth lib/
ls -larth config/

build_dir=$(pwd)

mkdir -p "${PREFIX}"
cd "${PREFIX}"
rsync -av "${build_dir}"/bin .
rsync -av "${build_dir}"/lib .
rsync -av "${build_dir}"/config .
41 changes: 41 additions & 0 deletions recipes/nim/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{% set version = "1.0.2" %}
{% set sha256 = "73a0ae099e1da39cc913c4a4054b5bf3d843ab93df95ffb98988a51074b651e6" %}

package:
name: nim
version: {{ version }}

source:
url: https://nim-lang.org/download/nim-{{ version }}.tar.xz
sha256: {{ sha256 }}
folder: nim

build:
number: 0
skip: True # [not linux64]

requirements:
build:
- {{ compiler('cxx') }}
- rsync
run:
- {{ compiler('cxx') }}

test:
commands:
- nim -v

about:
home: https://nim-lang.org/
license: MIT
license_family: MIT
license_file: LICENSE
summary: 'Nim programming language, by Andreas Rumpf (araq@)'
description: |
Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula.
doc_url: https://nim-lang.org/documentation.html
dev_url: https://github.com/nim-lang/Nim

extra:
recipe-maintainers:
- pb-cdunn