Skip to content

Instantly share code, notes, and snippets.

@rdesfo
Created June 23, 2015 23:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rdesfo/74785da2bff09917b259 to your computer and use it in GitHub Desktop.
Save rdesfo/74785da2bff09917b259 to your computer and use it in GitHub Desktop.
haste-compiler nix-shell
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc784" }:
let
inherit (nixpkgs) pkgs;
f = { mkDerivation, array, base, binary, blaze-builder
, bytestring, bzlib, containers, data-binary-ieee754, data-default
, directory, either, fetchgit, filepath, ghc, ghc-paths, ghc-prim
, ghc-simple, HTTP, monads-tf, mtl, network, network-uri, process
, random, shellmate, stdenv, system-fileio, tar, transformers
, utf8-string, websockets, ghc-simple
}:
mkDerivation {
pname = "haste-compiler";
version = "0.5";
src = fetchgit {
url = "https://github.com/valderman/haste-compiler.git";
sha256 = "adac0132d53ad00a186290e39198eacf8d3f25b3630dc3600d06ce76d2b81767";
rev = "a6ee11e68075a83e22490be51f8fc23dd70c26de";
};
isLibrary = true;
isExecutable = true;
buildDepends = [
array base binary blaze-builder bytestring bzlib containers
data-binary-ieee754 data-default directory either filepath ghc
ghc-paths ghc-prim ghc-simple HTTP monads-tf mtl network
network-uri process random shellmate system-fileio tar transformers
utf8-string websockets ghc-simple
];
configureFlags = [ "-fportable" ];
homepage = "http://haste-lang.org/";
description = "Haskell To ECMAScript compiler";
license = stdenv.lib.licenses.bsd3;
};
drv = pkgs.haskell.packages.${compiler}.callPackage f {};
in
if pkgs.lib.inNixShell then drv.env else drv
@rdesfo
Copy link
Author

rdesfo commented Jun 23, 2015

$ git clone https://github.com/valderman/haste-compiler.git
$ cd haste-compiler/
$ nix-shell -p cabal-install
$ cabal sandbox init
$ cabal install
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: haste-compiler-0.5 (user goal)
next goal: ghc-simple (dependency of haste-compiler-0.5)
rejecting: ghc-simple-0.1.2.0, 0.1.1.0, 0.1.0.0 (conflict: haste-compiler =>
ghc-simple>=0.1.2.1)
Dependency tree exhaustively searched.

Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment