<commit_before># How to build?

This requires SBT to be installed on your machine. Refer to [this link](http://www.scala-sbt.org/release/docs/Setup.html) for instructions.

```
$ git clone https://github.com/scala-native/scala-native.git
$ cd scala-native/
$ sbt 'nscplugin/publishLocal' 'nativelib/publishLocal' 'publishLocal'
$ sbt package
```

If you face any issues with your development environment setup, refer to below instructions for your OS respectively, you will need clang and BOEHM GC, too.

## Setup the environment

## Fedora

```
sudo yum install gc-devel
```

## Ubuntu

```
sudo apt-get install libgc-dev
```

## OSX

You can use brew as shown below

```
brew install bdw-gc
```

### OS X Yosemite or older

OS X Yosemite uses outdated version of `clang` so you might have to install a newer version via brew:

```
brew install homebrew/versions/llvm38
```

## FreeBSD

```
pkg install sbt llvm38 boehm-gc
```

## Source code

```
git clone git://github.com/ivmai/bdwgc.git
cd bdwgc
git clone git://github.com/ivmai/libatomic_ops.git
autoreconf -vif
automake --add-missing
./configure
make
make check
sudo make install

```
<commit_msg>document how to compile and run scala-native example with nixos<commit_after># How to build?

This requires SBT to be installed on your machine. Refer to [this link](http://www.scala-sbt.org/release/docs/Setup.html) for instructions.

```
$ git clone https://github.com/scala-native/scala-native.git
$ cd scala-native/
$ sbt 'nscplugin/publishLocal' 'nativelib/publishLocal' 'publishLocal'
$ sbt package
```

If you face any issues with your development environment setup, refer to below instructions for your OS respectively, you will need clang and BOEHM GC, too.

## Setup the environment

## Fedora

```
sudo yum install gc-devel
```

## Ubuntu

```
sudo apt-get install libgc-dev
```

## Nix / NixOS

```
nix-env -i clang-wrapper-3.7.1 boehm-gc-7.2f
```

to run [scala-native-example](https://github.com/scala-native/scala-native-example) you need to configure library and headers include path.

`nix-build '<nixpkgs>' -A boehmgc --no-out-link`

example output:

```
boehm-gc-7.2f
dev=/nix/store/rxvzdlp5x3r60b02fk95v404y3mhs2in-boehm-gc-7.2f-dev;
doc=/nix/store/jpcng9dyid9002ry4h3rm3z1r5irdgqz-boehm-gc-7.2f-doc;
/nix/store/bw1p8rairfwv2yif2g1cc0yg8hv25mnl-boehm-gc-7.2f

```

```
$ cd scala-native-example
$ sbt
> set nativeClangOptions := Stream(
  "-I/nix/store/rxvzdlp5x3r60b02fk95v404y3mhs2in-boehm-gc-7.2f-dev/include",
  "-L/nix/store/bw1p8rairfwv2yif2g1cc0yg8hv25mnl-boehm-gc-7.2f/lib"
)
```

## OSX

You can use brew as shown below

```
brew install bdw-gc
```

### OS X Yosemite or older

OS X Yosemite uses outdated version of `clang` so you might have to install a newer version via brew:

```
brew install homebrew/versions/llvm38
```

## FreeBSD

```
pkg install sbt llvm38 boehm-gc
```

## Source code

```
git clone git://github.com/ivmai/bdwgc.git
cd bdwgc
git clone git://github.com/ivmai/libatomic_ops.git
autoreconf -vif
automake --add-missing
./configure
make
make check
sudo make install

```

{'fraction_non_alphanumeric': 0.1277633289986996, 'fraction_numerical': 0.025682704811443434, 'mean_word_length': 4.119800332778702, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, 'https://': 3, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6839028', 'n_tokens_mistral': 1234, 'n_tokens_neox': 1146, 'n_words': 314}