Created
February 27, 2017 00:19
-
-
Save dhess/2ca7e5e836c52fd0187637a49ace04fb 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
| { pkgs }: | |
| { | |
| allowBroken = true; | |
| allowUnfree = true; | |
| packageOverrides = super: let self = super.pkgs; in with self; rec { | |
| #### Global overrides. | |
| #### Environments and sub-environments. | |
| #### | |
| #### Note that Haskell is more complicated than these, so its | |
| #### environments are defined in a separate section below. | |
| ## My one-shot install environment. | |
| meta-env = buildEnv { | |
| name = "meta-env"; | |
| paths = [ | |
| shell-env | |
| emacs-env | |
| haskell-env | |
| perl-env | |
| nodejs-env | |
| nixops-env | |
| ]; | |
| }; | |
| ## Shell stuff. | |
| shell-env = buildEnv { | |
| name = "shell-env"; | |
| paths = [ | |
| ansible | |
| atomicparsley | |
| darcs | |
| ffmpeg | |
| gitAndTools.git-crypt | |
| gnupg | |
| pinentry_mac | |
| #keybase | |
| lftp | |
| mediainfo | |
| nix-repl | |
| pwgen | |
| #simp_le | |
| scsh | |
| speedtest-cli | |
| stow | |
| terminal-notifier | |
| tree | |
| unrar | |
| wakelan | |
| wget | |
| xz | |
| cabal2nix | |
| ]; | |
| }; | |
| ## NixOps. | |
| nixops-env = buildEnv { | |
| name = "nixops-env"; | |
| paths = [ | |
| nixops | |
| ]; | |
| }; | |
| #### Emacs support. | |
| ## Override the emacs used in any expression. | |
| emacs = emacs25Macport; | |
| ## Emacs. | |
| emacs-env = buildEnv { | |
| name = "emacs-env"; | |
| paths = with emacsPackagesNgGen emacs; [ | |
| ## I want packages from melpa-unstable (the default is to use | |
| ## melpa-stable). See | |
| ## https://github.com/NixOS/nixpkgs/issues/12962 | |
| ## | |
| ## Unfortunately, every package that installs an Emacs | |
| ## package needs to be overridden this way manually. There | |
| ## appears to be no way to override the default melpa set | |
| ## globally. | |
| ((emacsPackagesNg.override (super: self: super.melpaPackages)).emacsWithPackages (p: with p; [ | |
| hindent | |
| structured-haskell-mode | |
| ])) | |
| emacs | |
| aspell | |
| aspellDicts.en | |
| hlint-refactor | |
| ]; | |
| }; | |
| ## Python. | |
| # Override packages. | |
| my-python-packages = pp: pp.override { | |
| overrides = self: super: with pkgs.python.lib; rec { | |
| }; | |
| }; | |
| python-env = python.buildEnv.override { | |
| extraLibs = with (my-python-packages pythonPackages); [ | |
| aws_shell | |
| awscli | |
| virtualenvwrapper | |
| ]; | |
| }; | |
| ## Perl. | |
| # | |
| # Note that, unlike with Python, Nix perl will not find its | |
| # packages automatically. You must set $PERL5LIB to | |
| # $HOME/.nix-profile/lib/perl5/site_perl | |
| perl-env = buildEnv { | |
| name = "perl-env"; | |
| paths = with perlPackages; [ | |
| perl | |
| FileCopyRecursive | |
| ]; | |
| }; | |
| ## Node.js. | |
| nodejs-env = buildEnv { | |
| name = "nodejs-env"; | |
| paths = [ nodejs-6_x ] ++ (with nodePackages; [ | |
| ]); | |
| }; | |
| #### Haskell support. | |
| ### Haskell package overrides. | |
| ## Packages whose tests/haddocks fail. | |
| haskell-packages-dontcheck = hp: hp.override { | |
| overrides = self: super: with pkgs.haskell.lib; { | |
| servant-client = dontCheck super.servant-client; | |
| ghc-exactprint = dontCheck super.ghc-exactprint; | |
| katip = dontCheck super.katip; | |
| katip-elasticsearch = dontCheck super.katip-elasticsearch; | |
| swagger2 = dontHaddock super.swagger2; | |
| }; | |
| }; | |
| ## A mix-in for adding my own packages to a package set. | |
| my-haskell-packages = hp: hp.override { | |
| overrides = self: super: with pkgs.haskell.lib; { | |
| dhess-ssh-keygen = self.callPackage ./dhess-ssh-keygen.nix {}; | |
| fm-assistant = dontCheck (self.callPackage ./fm-assistant.nix {}); | |
| cryptonite-foldl = self.callPackage ./cryptonite-foldl.nix {}; | |
| # cabal2nix --no-check cabal://hpio-0.8.0.7 >~/.nixpkgs/hpio-0.8.0.7 | |
| hpio = self.callPackage ./hpio-0.8.0.7.nix {}; | |
| }; | |
| }; | |
| ### Package sets. | |
| ### | |
| ### Note: don't override package versions for LTS package sets! | |
| ### | |
| ### To make use of these, see: | |
| ### https://github.com/NixOS/nixpkgs/blob/master/doc/haskell-users-guide.md | |
| ### | |
| ### or just do, e.g.: | |
| ### | |
| ### nix-shell --argstr compiler lts-2 | |
| ### | |
| ### to build a package with GHC 7.8.4 and the LTS-2 package set. | |
| ## GHC 7.8.4 package sets. | |
| haskell-lts-2-packages = haskell-packages-dontcheck super.haskell.packages.lts-2; | |
| ## GHC 7.10.3 package sets. | |
| # My custom (non-LTS) package sets. | |
| haskell-ghc7103-packages = haskell-packages-dontcheck (my-haskell-packages super.haskell.packages.ghc7103); | |
| ## GHC 8.0.1 package sets. | |
| # My custom (non-LTS) package sets. | |
| haskell-ghc801-packages = haskell-packages-dontcheck (my-haskell-packages super.haskell.packages.ghc801); | |
| ### Package lists. | |
| ## This exposes the locally-defined package to other Nix files, | |
| ## e.g., default.nix in a git repo which you're using to develop a | |
| ## Haskell package. | |
| dhess-ssh-keygen = (my-haskell-packages super.haskell.packages.ghc801).dhess-ssh-keygen; | |
| fm-assistant = (my-haskell-packages super.haskell.packages.ghc801).fm-assistant; | |
| hpio = (my-haskell-packages super.haskell.packages.ghc801).hpio; | |
| ## The list of all packages I (ideally) want to have installed by | |
| ## default in each Haskell environment. | |
| haskell-core = hp: with hp; [ | |
| acid-state | |
| aeson | |
| aeson-pretty | |
| amazonka | |
| amazonka-ec2 | |
| amazonka-route53 | |
| amazonka-route53-domains | |
| amazonka-s3 | |
| amazonka-sns | |
| amazonka-sqs | |
| async | |
| attoparsec | |
| auto-update | |
| base-compat | |
| binary | |
| bytestring | |
| charset | |
| concurrent-machines | |
| cond | |
| conduit | |
| conduit-combinators | |
| configurator | |
| configuration-tools | |
| containers | |
| criterion | |
| cryptohash | |
| cryptonite | |
| dhall | |
| dhess-ssh-keygen | |
| doctest | |
| directory | |
| either | |
| errors | |
| exceptions | |
| filepath | |
| fm-assistant | |
| foldl | |
| folds | |
| free | |
| hpio | |
| hex | |
| hspec | |
| hspec-expectations-lens | |
| hspec-wai | |
| http-api-data | |
| http-client | |
| http-client-tls | |
| http-types | |
| inline-c | |
| katip | |
| katip-elasticsearch | |
| lens | |
| lens-aeson | |
| lifted-async | |
| lifted-base | |
| list-t | |
| lucid | |
| machines | |
| machines-binary | |
| machines-directory | |
| machines-io | |
| machines-process | |
| managed | |
| memory | |
| monad-control | |
| monad-log | |
| monad-logger | |
| monad-logger-syslog | |
| morte | |
| mtl | |
| network | |
| network-attoparsec | |
| optparse-applicative | |
| optparse-text | |
| parsec | |
| parsers | |
| path | |
| path-io | |
| pipes | |
| pipes-attoparsec | |
| pipes-bytestring | |
| pipes-errors | |
| pipes-group | |
| pipes-safe | |
| pipes-shell | |
| pipes-zlib | |
| process | |
| process-streaming | |
| protolude | |
| QuickCheck | |
| quickcheck-instances | |
| regex-applicative | |
| resourcet | |
| safecopy | |
| semigroups | |
| servant | |
| servant-client | |
| servant-docs | |
| servant-lucid | |
| servant-server | |
| servant-swagger | |
| servant-swagger-ui | |
| singletons | |
| shelly | |
| stm | |
| stm-containers | |
| streaming | |
| streaming-bytestring | |
| streaming-utils | |
| strict | |
| swagger2 | |
| tar | |
| tasty | |
| tasty-hunit | |
| temporary | |
| text | |
| thyme | |
| time | |
| turtle | |
| transformers | |
| transformers-base | |
| transformers-compat | |
| trifecta | |
| unix | |
| unix-bytestring | |
| unix-compat | |
| wai | |
| wai-extra | |
| warp | |
| zlib-lens | |
| ]; | |
| ## Here we remove from haskell-core list all packages which don't | |
| ## build under a particular GHC version. | |
| # LTS-2 problems. | |
| haskell-lts-2-wontbuild = hp: with hp; [ | |
| cryptonite | |
| ]; | |
| haskell-lts-2-core = hp: with hp; with stdenv.lib; | |
| subtractLists (haskell-lts-2-wontbuild hp) (haskell-core hp); | |
| # GHC 8.0.1 problems. | |
| haskell-ghc801-wontbuild = hp: with hp; [ | |
| pipes-shell | |
| pipes-errors | |
| pipes-zlib | |
| ]; | |
| haskell-ghc801-core = hp: with hp; with stdenv.lib; | |
| subtractLists (haskell-ghc801-wontbuild hp) (haskell-core hp); | |
| ### Haskell environments. | |
| ## The package set for my default profile. | |
| haskell-env-packages = haskell-ghc801-packages; | |
| ## The core pre-installed set of packages for my default profile. | |
| haskell-env-core = haskell-ghc801-core; | |
| ## This Haskell environment is the default and is available in my | |
| ## meta-env. | |
| haskell-env = buildEnv { | |
| name = "haskell-env"; | |
| paths = with haskell-env-packages; [ | |
| (ghcWithPackages haskell-env-core) | |
| bumper | |
| cabal-install | |
| hi | |
| hindent | |
| hlint | |
| hscolour | |
| structured-haskell-mode | |
| stylish-haskell | |
| ]; | |
| }; | |
| ## haskell-env with Stack. | |
| stack-env = buildEnv { | |
| name = "stack-env"; | |
| paths = with haskell-env-packages; [ | |
| haskell-env | |
| stack | |
| ]; | |
| }; | |
| }; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment