Useful development environments for software projects.
- Instruct
guix pull
to pull code from this channel in addition to the default Guix channel(s) by adding following snippet to your~/.config/guix/channels.scm
:(channel (name 'tassos-guix) (url "https://github.com/Tass0sm/guix-develop"))
- Run
guix pull
. Then you can use the code from this repository by importing the correct modules.
Create a project directory with the following contents.
- A normal haskell cabal project.
manifest.scm
The manifest.scm
file looks like this.
(use-modules (tassos-guix develop)
...)
(define %source-dir
(dirname (current-filename)))
(define ghc-graphdoc
(package
(name "ghc-graphdoc")
(version "0.0.1")
(source
(local-file %source-dir
#:recursive? #t
#:select? (git-predicate %source-dir)))
(build-system haskell-build-system)
(inputs
(list ghc-pandoc
ghc-pandoc-types))
(home-page "")
(synopsis "")
(description "")
(license license:gpl3+)))
;; The new part:
(de->manifest
(development-environment
(package ghc-graphdoc)))
A development-environment extends the concept of a normal development profile for a package defined by package->development-manifest
.
- Activate the development environment profile.
guix shell
- In that profile, build the program like you would without Guix.
cabal build cabal repl
This lets cabal handle all of the haskell packages. This could change in the future.
- Disable dependence on Guix packages.
- Add extra packages into the development environment.
- Enhance the development environment with extra add-ons which are parameterized by the rest of the development environment. Like an “lsp” add-on which adds the appropriate language server.