Skip to content

Commit

Permalink
Cabal (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
ingun37 authored Apr 18, 2023
1 parent 2af7b64 commit 86632ed
Show file tree
Hide file tree
Showing 14 changed files with 271 additions and 598 deletions.
56 changes: 0 additions & 56 deletions .github/workflows/main.yml

This file was deleted.

86 changes: 83 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,85 @@
.stack-work/
.cabal-sandbox/
cabal.sandbox.config
cabal.project.local
.ghc.environment.*
cabal-dev/
.hpc/
*.hi
*.o
*.p_hi
*.prof
*.tix
dist
dist-*
register.sh
./cabal.config
cabal-tests.log
bootstrap/*.plan.json

/Cabal/dist/
/Cabal/tests/Setup
/Cabal/Setup
/Cabal/source-file-list

/cabal-install/dist/
/cabal-install/Setup
/cabal-install/source-file-list

.stylish-haskell.yaml
.stylish-haskell.yml
.ghci
.ghcid

# Output of release and bootstrap
_build

# editor temp files

*#
.#*
*~
.*.swp
*.bak

# GHC build

Cabal/GNUmakefile
Cabal/dist-boot/
Cabal/dist-install/
Cabal/ghc.mk


# TAGS files
TAGS
tags
ctags

# stack artifacts
/.stack-work/
stack.yaml.lock

# Shake artifacts
.shake*
progress.txt

# test files
register.sh

# windows test artifacts
cabal-testsuite/**/*.exe
cabal-testsuite/**/*.bat

# python artifacts from documentation builds
*.pyc
.python-sphinx-virtualenv/
/doc/.skjold_cache/

# macOS folder metadata
.DS_Store
result
test/dst/

# benchmarks
bench.html

# Emacs
.projectile
/test/dst/
6 changes: 4 additions & 2 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Changelog for answers-script
# Revision history for answers-script

## Unreleased changes
## 0.1.0.0 -- YYYY-mm-dd

* First version. Released on an unsuspecting world.
30 changes: 0 additions & 30 deletions LICENSE

This file was deleted.

43 changes: 42 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,42 @@
# answers-script
# Answers Script

## Generate default.nix

```shell
nix-shell -p cabal2nix
cabal2nix --no-check ./. > default.nix
```

## Generate shell.nix

```shell
nix-shell -p cabal2nix
cabal2nix --shell --no-check ./. > shell.nix
```

## Build

**Don't just build using Cabal!!** it will take forever because of Pandoc.

Build in Nix environment

```shell
# Enter Nix environment defined in shell.nix
nix-shell
# Use executable
answers-script ...
```

## Test

```shell
nix-shell
cabal --enable-nix test
```

## Install from other machines

```shell
TAR="https://github.com/ingun37/answers-script/archive/refs/tags/test2.tar.gz"
nix-shell -p "with import <nixpkgs> {}; let f = import (fetchTarball $TAR); in haskellPackages.callPackage f {}"
```
2 changes: 0 additions & 2 deletions Setup.hs

This file was deleted.

Loading

0 comments on commit 86632ed

Please sign in to comment.