haskell-te: 6caf50faffec0e676255b41240565ab5ef38e3bc

     1: # All of our "global" definitions live here (i.e. everything that's used in more
     2: # than one place). Note that care should be taken to avoid infinite loops, since
     3: # 'callPackage' gets arguments from 'self', which is the set we're defining!
     4: self: super:
     5: 
     6: with builtins;
     7: #with super.lib;
     8: with {
     9:   helpersSrc = import ./nix-support/helpers.nix {
    10:     inherit (import (import ./nix-support/path.nix {}) {}) fetchFromGitHub;
    11:   };
    12: };
    13: {
    14:   tePath = import ./nix-support/path.nix {};
    15: 
    16:   helpers =
    17:     with import self.tePath {
    18:       overlays = [
    19:         (import "${helpersSrc}/overlay.nix")
    20:         (import ./overlay.nix)
    21:       ];
    22:     };
    23:     nix-helpers;
    24: 
    25:   inherit helpersSrc;
    26: 
    27:   # Various versions of nixpkgs from which to get our packages
    28:   inherit (import ./nix-support/nixpkgs.nix)
    29:     # Whichever nixpkgs we're using by default
    30:     nixpkgs
    31: 
    32:     # Fixed releases of nixpkgs. Useful for avoiding known incompatibilities.
    33:     nixpkgs-2016-03 nixpkgs-2016-09
    34: 
    35:     # Default nixpkgs, overridden with helper functions and packages
    36:     nix-config;
    37: 
    38:   # Regular dependencies, used as-is
    39:   inherit (self.nixpkgs)
    40:     cabal-install;
    41: 
    42:   # Fixed versions to avoid known breakages
    43:   inherit (self.nixpkgs-2016-03)
    44:     # Args differ in new versions, which breaks ./nix-support/haskellPackages.nix scripts
    45:     cabal2nix;
    46: 
    47:   inherit (self.nixpkgs-2016-09)
    48:     # The quoting is different in other versions, which breaks e.g. wrap
    49:     makeWrapper
    50: 
    51:     # Old versions don't have the needed contracts, new ones don't build on i686
    52:     racket;
    53: 
    54:   # Helper functions, etc.
    55:   inherit (self.helpers)
    56:     allDrvsIn attrsToDirs backtrace fail inNixedDir isBroken latestGit mkBin
    57:     nixListToBashArray nixpkgs1803 nothing pipeToNix reverse sanitiseName
    58:     stripOverrides tryElse unlines unpack withDeps wrap;
    59: 
    60:   inherit (self.warbo-packages)
    61:     asv timeout;
    62: 
    63:   # Cases where we want both the attribute set and its attributes available
    64:   inherit (self.callPackage ./nix-support/annotate.nix {})
    65:     annotated annotateRawAstsFrom;
    66: 
    67:   inherit (self.dumpToNixScripts)
    68:     dumpToNix;
    69: 
    70:   inherit (self.runTypesScriptData)
    71:     runTypesScript;
    72: 
    73:   # We take Nix from the system. This is impure, but unavoidable since different
    74:   # Nix versions will behave differently anyway (e.g. when using 'withNix')
    75:   inherit (import self.tePath {}) nix;
    76: 
    77:   # A bug in nixpkgs 18.03 seems to prevent libuv building on i686. We can use
    78:   # pre-built packages from a binary cache (which were presumably cross-compiled
    79:   # on x86-64 machines).
    80:   # This is a pretty core library, which makes this project unusable on that
    81:   # OS+CPU combo; which, notably, is what the author uses for development...
    82:   # To mitigate this we check if that OS+CPU is in use, and if so we replace
    83:   # some pinned packages which are known to be broken with packages taken
    84:   # impurely from the running system. Note that Nix is such a package, but it's
    85:   # always taken from the running system anyway (see above).
    86:   inherit (with rec {
    87:             versionFile = self.path + "/.version";
    88:             version     = if pathExists versionFile
    89:                              then replaceStrings [ "\n" "" ] [ "" "" ]
    90:                                                  (readFile versionFile)
    91:                              else "0";
    92:             libuvBug    = currentSystem == "i686-linux" && version == "18.03";
    93:             warn        = ''
    94:               WARNING: Detected nixpkgs 18.03 on i686. This has a known
    95:               problem with libuv, so we're taking the 'jq' package from
    96:               <nixpkgs> instead of using the pinned version. Hopefully
    97:               the system's version isn't broken too...
    98:             '';
    99:           };
   100:           if libuvBug
   101:              then trace warn import self.tePath {}
   102:              else super)
   103:     jq;
   104: 
   105:   analysis              = self.callPackage ./nix-support/analysis.nix              {};
   106:   asv-nix               = self.callPackage ./nix-support/asv-nix.nix               {};
   107:   buckets               = self.callPackage ./nix-support/buckets.nix               {};
   108:   callHackage           = self.callPackage ./nix-support/callHackage.nix           {};
   109:   checkHsEnv            = self.callPackage ./nix-support/checkHsEnv.nix            {};
   110:   checkStderr           = self.callPackage ./nix-support/checkStderr.nix           {};
   111:   cluster               = self.callPackage ./nix-support/cluster.nix               {};
   112:   concurrentQuickspec   = self.callPackage ./nix-support/concurrentQuickspec.nix   {};
   113:   dumpToNixScripts      = self.callPackage ./nix-support/dumpToNix.nix             {};
   114:   extractedEnv          = self.callPackage ./nix-support/extractedEnv.nix          {};
   115:   extraHaskellPackages  = self.callPackage ./nix-support/extraHaskellPackages.nix  {};
   116:   filterToSampled       = self.callPackage ./nix-support/filterToSampled.nix       {};
   117:   format                = self.callPackage ./nix-support/format.nix                {};
   118:   genQuickspecRunner    = self.callPackage ./nix-support/genQuickspecRunner.nix    {};
   119:   getDepsScript         = self.callPackage ./nix-support/getDepsScript.nix         {};
   120:   haskellPackages       = import ./nix-support/haskellPackages.nix
   121:                             { inherit (self) hsOverride nixpkgs; };
   122:   haskellPkgNameVersion = self.callPackage ./nix-support/haskellPkgNameVersion.nix {};
   123:   haskellPkgToAsts      = self.callPackage ./nix-support/haskellPkgToAsts.nix      {};
   124:   haskellPkgToRawAsts   = self.callPackage ./nix-support/haskellPkgToRawAsts.nix   {};
   125:   haveVar               = self.callPackage ./nix-support/haveVar.nix               {};
   126:   hsNameVersion         = self.callPackage ./nix-support/hsNameVersion.nix         {};
   127:   hsOverride            = self.callPackage ./nix-support/hsOverride.nix            {};
   128:   makeHaskellPkgNixable = self.callPackage ./nix-support/makeHaskellPkgNixable.nix {};
   129:   ML4HSFE               = self.callPackage ./nix-support/ML4HSFE.nix               {};
   130:   nixedHsPkg            = self.callPackage ./nix-support/nixedHsPkg.nix            {};
   131:   nixEnv                = import ./nix-support/nixEnv.nix { inherit (self) withNix; };
   132:   package               = self.callPackage ./nix-support/package.nix               {};
   133:   pkgName               = self.callPackage ./nix-support/pkgName.nix               {};
   134:   quickspec             = self.callPackage ./nix-support/quickspec.nix             {};
   135:   quickspecAsts         = self.callPackage ./nix-support/quickspecAsts.nix         {};
   136:   reduce-equations      = self.callPackage ./nix-support/reduce-equations.nix      {};
   137:   renderEqs             = self.callPackage ./nix-support/renderEqs.nix             {};
   138:   runTypesScriptData    = self.callPackage ./nix-support/runTypesScript.nix        {};
   139:   runWeka               = self.callPackage ./nix-support/runWeka.nix               {};
   140:   stableHackageDb       = self.callPackage ./nix-support/stableHackageDb.nix       {};
   141:   testData              = self.callPackage ./nix-support/testData.nix              {};
   142:   tipBenchmarks         = self.callPackage ./nix-support/tipBenchmarks.nix         {};
   143:   tipToHaskellPkg       = self.callPackage ./nix-support/tipToHaskellPkg.nix       {};
   144:   tryTip                = self.callPackage ./nix-support/tryTip.nix                {};
   145:   warbo-packages        = self.callPackage ./nix-support/warbo-packages.nix        {};
   146:   withNix               = self.callPackage ./nix-support/withNix.nix               {};
   147: 
   148:   # Used for general performance testing, as well as formal evaluation
   149:   benchmarkEnv    = import ./benchmarkEnv.nix;
   150:   benchmarkRunner = import ./benchmarks { inherit (self) pkgs; };
   151: }

Generated by git2html.