Created
August 19, 2015 18:26
-
-
Save codedmart/f09906091568a653c9f6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let | |
| pkgs = import <nixpkgs> {}; | |
| stdenv = pkgs.stdenv; | |
| haskellPackages = pkgs.haskell-ng.packages.ghc7102.override { | |
| overrides = self: super: { | |
| servant = self.callPackage ~/Work/opensrc/servant/servant.nix {}; | |
| }; | |
| }; | |
| inputs = [ | |
| haskellPackages.ghc-mod | |
| haskellPackages.cabal-install | |
| ]; | |
| in rec { | |
| servant7102Env = stdenv.lib.overrideDerivation haskellPackages.servant.env (old: { | |
| name = "servant-7102-env"; | |
| # Append our inputs to the old build inputs | |
| buildInputs = old.buildInputs ++ inputs; | |
| NIX_MYENV_NAME = "servant-7102"; | |
| shellHook = '' | |
| source ~/.bash_prompt | |
| # Run the old shell hook of the haskell environment | |
| ${old.shellHook} | |
| ''; | |
| }); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This works with nix-shell but not if I try and nix-instantiate the servant-env.nix file | |
| // I get this error: error: attempt to call something which is not a function but a set, at /usr/local/nix/nixpkgs/lib/customisation.nix:56:12 | |
| let | |
| pkgs = import <nixpkgs> {}; | |
| haskellPackages = pkgs.haskellPackages.override { | |
| overrides = self: super: { | |
| servant-client = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ./servant-client {}) "--ghc-options=-Werror"); | |
| servant-docs = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ./servant-docs {}) "--ghc-options=-Werror"); | |
| servant-js = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ./servant-js {}) "--ghc-options=-Werror"); | |
| servant-server = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ./servant-server {}) "--ghc-options=-Werror"); | |
| servant-examples = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ./servant-examples {}) "--ghc-options=-Werror"); | |
| servant-blaze = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ./servant-blaze {}) "--ghc-options=-Werror"); | |
| servant-lucid = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ./servant-lucid {}) "--ghc-options=-Werror"); | |
| servant-mock = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ./servant-mock {}) "--ghc-options=-Werror"); | |
| servant = pkgs.haskell.lib.dontCheck (pkgs.haskell.lib.appendConfigureFlag (self.callPackage ./servant {}) "--ghc-options=-Werror"); | |
| }; | |
| }; | |
| aggregated = haskellPackages.mkDerivation { | |
| pname = "servant-aggregated"; | |
| version = "0.5.0"; | |
| src = null; | |
| license = null; | |
| libraryHaskellDepends = with haskellPackages; [ | |
| servant-client servant-docs servant-js servant-server | |
| servant-examples servant-blaze servant-lucid servant | |
| servant-mock | |
| ]; | |
| librarySystemDepends = [ ]; | |
| }; | |
| in aggregated.env |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment