~jack/libtelnet-haskell

ref: 693fc7dbcfeb73ddb83e95b6cd31085bf3682b45 libtelnet-haskell/default.nix -rw-r--r-- 610 bytes
693fc7dbJack Kelly shell.nix: use overrideAttrs 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 {})
     [monad-loops network-simple];
in
  variant libtelnet