~jack/libtelnet-haskell

ref: ac04c1bd933efcc05c91844f67a66b17e64fed13 libtelnet-haskell/default.nix -rw-r--r-- 637 bytes
ac04c1bdJack Kelly Pass native libtelnet dep into libtelnet nix expression 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 flag, so cabal2nix doesn't
  # add it automatically.
  libtelnet = with haskellPackages; pkgs.haskell.lib.addBuildDepends
     (callPackage ./libtelnet.nix { inherit (pkgs) libtelnet; })
     [monad-loops network-simple];
in
  variant libtelnet