Skip to content

Commit

Permalink
docs: Improve usage guidance
Browse files Browse the repository at this point in the history
  • Loading branch information
ships authored May 10, 2024
1 parent 051fd3e commit 0cac4c9
Showing 1 changed file with 44 additions and 4 deletions.
48 changes: 44 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,15 @@ This repo holds Nix flake, modules, packages, and reusable utility Nix language
Currently, you can build a package directly like so:

```bash
nix build github.com:OpenGen/nix#ociImgBase
nix build github.com:OpenGen/nix#sppl
```

### Build an OCI image with an environment

OCI images consume these libraries and ones from other OpenGen repos, and are specified in another flake (excepting the `base` oci image):

```bash
nix build github.com:OpenGen/nix#ociImgLoom
```

### Import utility code
Expand All @@ -20,13 +28,45 @@ To access the `lib` code exported by this flake, declare this repo as a flake in
{
inputs = {
nixpkgs.url = ...
gensqlnix.url = "github:OpenGen/nix";
opengen.url = "github:OpenGen/nix";
};
outputs = inputs@{ nixpkgs, gensqlnix, ... }: let
outputs = inputs@{ nixpkgs, opengen, ... }: let
# call some function
toolbox = gensqlnix.lib.basicTools "aarch64-darwin";
toolbox = opengen.lib.basicTools "aarch64-darwin";
in {
...
};
};
```

## Packages

### `.#sppl`

Python [library by ProbSys](https://github.com/probsys/sppl) packaged for python3.9 .

### `.#loom`

Implementation of [CrossCat in Python](https://github.com/posterior/loom). NOTE: this ONLY builds for `x86_64` architectures and only runs on linux, because it depends on
platform-dependent `distributions`.

Your options are:

```bash
nix build '.#packages.x86_64-linux.loom' # same as `.#loom` if that is your OS/arch
nix build './envs-flake#packages.x86_64-darwin.ociImgLoom'
```

If you are running on Mac silicon (`aarch64-darwin`), that OCI image will run but behavior is not defined or supported.

#### `.#loom.morePackages.distributions`

Native library for probability distributions in python used by Loom. NOTE: this ONLY builds for `x86_64` architectures and only runs on linux.

#### `.#loom.morePackages.parsable`
#### `.#loom.morePackages.pymetis`
#### `.#loom.morePackages.goftests`
#### `.#loom.morePackages.tcmalloc`

Other upstream python packages required by Distributions and/or Loom.

0 comments on commit 0cac4c9

Please sign in to comment.