okasaki

Okasaki's Purely Functional Data Structures
git clone git://git.jtobin.io/okasaki.git
Log | Files | Refs | LICENSE

default.nix (814B)


      1 let
      2   revision = "813836d64";
      3 
      4   tarball = owner: repo: rev:
      5     builtins.fetchTarball {
      6       url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz";
      7     };
      8 
      9   compilerSet = pkgs.haskell.packages."ghc902";
     10 
     11   pkgs = import (tarball "NixOS" "nixpkgs" revision) { inherit config; };
     12   ignore = pkgs.nix-gitignore.gitignoreSourcePure;
     13 
     14   config = {
     15     packageOverrides = super: let self = super.pkgs; in rec {
     16       haskell = super.haskell // {
     17         packageOverrides = self: super: {
     18           okasaki = super.callCabal2nix "okasaki"
     19                       (ignore [./.gitignore] ./.) {};
     20         };
     21       };
     22     };
     23   };
     24 
     25 in
     26   {
     27     inherit pkgs;
     28     shell = compilerSet.shellFor {
     29       packages = p: [p.okasaki];
     30       buildInputs = with pkgs; [
     31         compilerSet.cabal-install
     32       ];
     33     };
     34   }