Skip to content

Latest commit

 

History

History
53 lines (36 loc) · 1.67 KB

File metadata and controls

53 lines (36 loc) · 1.67 KB

The smart - flake

This repo contains a flake that provides an easy way to include language and their dependencies (for example in a nix shell environment).

Usage with nix shell

nix shell <PATH>#<LANGUAGE>[.<PKG1>.<PKG2> ...]
  • PATH is the path of this repo (use github:tomberek/-) if you didn't clone it.
  • LANGUAGE is the name of the language (see Supported Languages)
  • PKGS are the package names (separated by .) that will be included with the language

Examples

Start a shell environment with python and the packages scipy, matplotlib, and numpy:

nix shell github:tomberek/-#python3With.scipy.matplotlib.numpy

Start a shell environment with perl and the packages HTMLTokeParserSimple and LWP:

nix shell github:tomberek/-#perlWith.HTMLTokeParserSimple.LWP

Usage as a #!-interpreter

#! /usr/bin/env nix
#! nix shell <PATH>#<LANGUAGE>[.<PKG1>.<PKG2> ...] --command <LANG_EXE>
  • PATH is the path of this repo (use github:tomberek/-) if you didn't clone it.
  • LANGUAGE is the name of the language (see Supported Languages)
  • PKGS are the package names (separated by .) that will be included with the language
  • LANG_EXE is the name of the executable of the language (ex: for python, LANG_EXE would by python and for perl, it would be perl -x)

Examples

See the documentation for examples

Supported Languages

  • Python2 (python2With)
  • Python3 (python3With)
  • Python39 (python39With)
  • Python310 (python310With)
  • Haskell (haskellWith)
  • Perl (perlWith)