• Stars
    star
    160
  • Rank 229,590 (Top 5 %)
  • Language
    Haskell
  • License
    GNU General Publi...
  • Created over 7 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A nix-based Haskell project manager

Styx: a nix-based multi-repo Haskell project manager

β€œStyx: there is no looking back.”

Styx is a convenient wrapper around cabal2nix, nix-shell and cabal new-<command>.

Installation

  • get nix: https://nixos.org/nix/
  • install the prerequisites (cabal2nix and cabal)
    nix-env -f "<nixpkgs>" -iA haskellPackages.cabal2nix
    nix-env -f "<nixpkgs>" -iA haskellPackages.cabal-install
        
  • install styx:
    nix-env -f "<nixpkgs>" -iA haskellPackages.styx
        

Configuration

In a directory of your choice, create a styx.yaml file like so:

# List the packages that you edit locally and want compiled "all the time", by cabal:
local-packages:
  my-main-package: # package name
    location: main # location on your disk (directory)
  my-local-dep:    # package name
    location: dep  # location on your disk (directory)

# Optionally, list patched or cutting edge packages that you depend on.
# These will be compiled only once, by nix.
source-deps:
  mtl:
    location: https://github.com/mrawesome/awsm-patched-version-of-mtl.git
    # revision: cc9a31305421f6bc72cc1f107f1270bd178c78a1 # optional

# Optionally, add other haskell nix packages to depend on.
# Normally this is not necessary, because nix will track the dependencies on its own.
# Thus this section is mostly useful for throw-away projects which do not have a well-formed cabal file.
nix-deps:
    - criterion
    - gasp
    - lens
    - statistics

# In case you depend on other non-haskell tools or libs.
non-haskell-deps:
    - z3

# Optionally, one can ask for a specific version of nixpkgs:
nixpkgs:
  commit: 8ef3eaeb4e531929ec29a880cb4c67f790e5eb70
  sha256: 4d2fae900d2d99ea294f4f412289af77152ac21d7b2e9ff23581ef11ea00831f
  # or like this: url: https://github.com/NixOS/nixpkgs-channels/archive/nixos-14.12.tar.gz

# Optionally, one can ask for a specific version of ghc, as known by nixpkgs
default-compiler: ghc801

Then, the command

styx configure

will create one nix file for each external package, a suitable shell.nix, and a cabal.project file.

Use

You can then access the sandbox, inside the nix shell, like so:

nix-shell .styx/shell.nix --run "cabal ..."

Styx provides a couple of convenience commands:

$ styx build # runs cabal new-build in the shell
$ styx repl # runs cabal new-repl in the shell
$ styx exec <cmd> # runs cabal exec in the sandbox
$ styx cabal <cmd> # runs cabal <cmd> in the sandbox

More Repositories

1

dante

Emacs Lisp
389
star
2

boon

Ergonomic Command Mode for Emacs
Emacs Lisp
321
star
3

nano-Agda

Tiny type-checker with dependent types
Haskell
75
star
4

attrap

ATtempt To Repair At Point (emacs flycheck extension)
Emacs Lisp
40
star
5

prettiest

The Prettiest Printer
Haskell
34
star
6

sctt

Type-Theory in Sequent Calculus
Haskell
13
star
7

glpk-hs

Haskell bindings to glpk
Haskell
12
star
8

topics

Various interesting topics I'm looking at
Haskell
12
star
9

MarXup

Markup language on top of Haskell
Haskell
11
star
10

emacs-semantics-theming

Foundation for building semantically meaningful themes over emacs
Emacs Lisp
11
star
11

lp-diagrams

An EDSL for diagrams based based on linear constraints
Haskell
7
star
12

lcr

Lightweight coroutines in elisp
Emacs Lisp
6
star
13

ProbInfer

Material for the course
Haskell
5
star
14

linear-smc

Linear Types, Symmetric Monoidal Categories, and Tensors
Haskell
5
star
15

organ

Haskell
4
star
16

hcad

Haskell library for CAD
Haskell
4
star
17

ControlledFusion

Haskell
3
star
18

inox

A language with linear types
Haskell
3
star
19

lp-diagrams-svg

SVG backend for lp-diagrams
Haskell
3
star
20

typography-geometry

Drawings for printed text documents
Haskell
3
star
21

TTNameBinders

Adventures with names and binders in type-theory
Haskell
3
star
22

whynote

Minimal Note Taking program
Haskell
3
star
23

gasp

Another Haskell Prelude for Algebraic Classes and Structures
Haskell
2
star
24

imbib

bibtex management functions and gui
Haskell
2
star
25

Cake

Build system as a Haskell library
Haskell
2
star
26

FOL

Minimal FOL prover
Haskell
2
star
27

hgal

Haskell Graph Automorphism Library
Haskell
2
star
28

polynomials-bernstein

Haskell
2
star
29

Parsek

The Parsek library developed by Koen Claessen in his functional pearl article Parallel Parsing Processes
Haskell
1
star
30

Generic-Programming-WIth-Dependent-Types

A translation to Agda of the paper with the same title of Altenkirch et al.
1
star
31

labeled-tree

Haskell labeled trees
Haskell
1
star
32

sparse-matrix

sparse matrix represented as quad-tree
Haskell
1
star
33

nnn

Not a Neural Network library
Haskell
1
star
34

labeled-graph

Haskell Labeled Graph
Haskell
1
star
35

nofib

Haskell
1
star
36

cmap

emacs: do at point
Emacs Lisp
1
star
37

dvi-processing

Processing of dvi files
Haskell
1
star