Skip to content

Latest commit

 

History

History
77 lines (58 loc) · 2.04 KB

README.org

File metadata and controls

77 lines (58 loc) · 2.04 KB

Guix Development Environments

Useful development environments for software projects.

How to Start

  1. 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"))
        
  2. Run guix pull. Then you can use the code from this repository by importing the correct modules.

How to Use

Create a project directory with the following contents.

  1. A normal haskell cabal project.
  2. 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.

  1. Activate the development environment profile.
    guix shell
        
  2. 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.

Possible Future Features

  1. Disable dependence on Guix packages.
  2. Add extra packages into the development environment.
  3. 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.