~jack/libtelnet-haskell

ref: 435aa32599e2e9c1c4195732f05e960697c58058 libtelnet-haskell/default.nix -rw-r--r-- 641 bytes
435aa325Jack Kelly Fix comment typo 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default", doBenchmark ? false }:

let
  inherit (nixpkgs) pkgs;

  haskellPackages = if compiler == "default"
                       then pkgs.haskellPackages
                       else pkgs.haskell.packages.${compiler};

  variant = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id;

  # Example code's build-depends are behind a flag, so cabal2nix
  # doesn't add them automatically.
  libtelnet = with haskellPackages; pkgs.haskell.lib.addBuildDepends
     (callPackage ./libtelnet.nix { inherit (pkgs) libtelnet; })
     [monad-loops network-simple];
in
  variant libtelnet