[Nix-dev] override a haskellngPackage in shell.nix

Cody Goodman codygman.consulting at gmail.com
Mon Jun 1 09:37:18 CEST 2015


I'm doing something wrong, could anyone help me out?

shell.nix:

with (import <nixpkgs> {}).pkgs;

# Try to override haskellngPackages.protocol-buffers
let packageOverrides = pkgs: rec {
       myHaskellPackages =
         let
           callPackage = pkgs.lib.callPackageWith myHaskellPackages;
         in
           pkgs.recurseIntoAttrs (pkgs.haskellPackages.override {
             extension = self : super : {
               protocol-buffers = self.callPackage
./protocol-buffers-fork-2.0.16/shell.nix  {};
             };
           });
     };
    pkg = haskellngPackages.callPackage
            ({ mkDerivation, aeson, attoparsec, base, bytestring, containers
             , directory, either, filepath, http-media, MissingH, mtl, riak
             , safe, scientific, servant, servant-server, stdenv, text
             , text-show, time, unordered-containers, uuid, vector, wai, warp
             , xml, xml-conduit
             }:
             mkDerivation {
               pname = "my-project";
               version = "0.1.0.0";
               sha256 = "0";
               isLibrary = false;
               isExecutable = true;
               buildDepends = [
                 aeson attoparsec base bytestring containers directory either
                 filepath http-media MissingH mtl riak safe scientific servant
                 servant-server text text-show time
unordered-containers uuid vector
                 wai warp xml xml-conduit
               ];
               license = stdenv.lib.licenses.unfree;
             }) {};
in
  pkg.env


More information about the nix-dev mailing list