Skip to content

Commit

Permalink
correct way of nixification using overrides!
Browse files Browse the repository at this point in the history
  • Loading branch information
wavewave committed May 27, 2015
1 parent 176da98 commit eb8d3c8
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 146 deletions.
44 changes: 37 additions & 7 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,43 @@
self:
rec {
coroutine-object = ghc.callPackage ./coroutine-object {};

xournal-types = ghc.callPackage ./xournal-types {};
xournal-parser = ghc.callPackage ./xournal-parser { inherit xournal-types; };

xournal-parser = ghc.callPackage ./xournal-parser {
xournal-types = self.xournal-types;
};

hoodle-types = ghc.callPackage ./hoodle-types {};
hoodle-builder = ghc.callPackage ./hoodle-builder { inherit hoodle-types; };
hoodle-parser = ghc.callPackage ./hoodle-parser { inherit hoodle-types xournal-types; };
hoodle-render = ghc.callPackage ./hoodle-render { inherit hoodle-types; };
hoodle-publish = ghc.callPackage ./hoodle-publish { inherit hoodle-types hoodle-render; };
hoodle-core = ghc.callPackage ./hoodle-core { inherit hoodle-types hoodle-parser hoodle-builder hoodle-render hoodle-publish xournal-parser; };
hoodle = ghc.callPackage ./hoodle { inherit hoodle-core; };

hoodle-builder = ghc.callPackage ./hoodle-builder {
hoodle-types = self.hoodle-types;
};

hoodle-parser = ghc.callPackage ./hoodle-parser {
hoodle-types = self.hoodle-types;
xournal-types = self.xournal-types;
};

hoodle-render = ghc.callPackage ./hoodle-render {
hoodle-types = self.hoodle-types;
};

hoodle-publish = ghc.callPackage ./hoodle-publish {
hoodle-types = self.hoodle-types;
hoodle-render = self.hoodle-render;
};

hoodle-core = ghc.callPackage ./hoodle-core {
coroutine-object = self.coroutine-object;
hoodle-types = self.hoodle-types;
hoodle-parser = self.hoodle-parser;
hoodle-builder = self.hoodle-builder;
hoodle-render = self.hoodle-render;
hoodle-publish = self.hoodle-publish;
xournal-parser = self.xournal-parser;
};
hoodle = ghc.callPackage ./hoodle {
hoodle-core = self.hoodle-core;
};
}
158 changes: 19 additions & 139 deletions release.nix
Original file line number Diff line number Diff line change
@@ -1,141 +1,21 @@
{ pkgs ? import <nixpkgs> {} }:

let fix = f: let x = f x // { __unfix__ = f; }; in x;

ghc = pkgs.haskell-ng.packages.ghc7101;
ghcjs = pkgs.haskell-ng.packages.ghcjs;
stdenv = pkgs.stdenv;

hoodlepkgs = import ./default.nix { inherit stdenv ghc; };
in fix hoodlepkgs

# #pkgs = import <nixpkgs> {};
# haskellngPackages = pkgs.haskellngPackages;
# stdenv = pkgs.stdenv;
# jobs = rec {
# popplerNew =
# haskellngPackages.callPackage ({mkDerivation}:
# mkDerivation {
# pname = "poppler";
# version = "0.13.1";
# src = pkgs.fetchgit { url = "https://github.com/wavewave/poppler.git";
# rev = "05123d9f054a353ea0f06a3179f3f2c773594079";
# sha256 = "6e142219c94c9375f54c55825ab952fa0c1d4358b2706fad63f18885ebf77a40";
# };
# buildDepends = with haskellngPackages; [
# array base bytestring cairo containers glib gtk mtl
# ];
# buildTools = with haskellngPackages; [ gtk2hs-buildtools ];
# pkgconfigDepends = [ pkgs.gtk pkgs.glib pkgs.gdk_pixbuf pkgs.pango pkgs.poppler ];
# homepage = "http://projects.haskell.org/gtk2hs";
# description = "Binding to the Poppler";
# license = stdenv.lib.licenses.gpl2;
# }) {};
# coroutine-object =
# haskellngPackages.callPackage ({mkDerivation}:
# mkDerivation {
# pname = "coroutine-object";
# version = "0.3";
# src = ./coroutine-object;
# license = stdenv.lib.licenses.bsd3;
# buildDepends = with haskellngPackages; [ cereal containers either lens mtl safecopy transformers transformers-free uuid ];
# }) {};

# hoodle-types =
# haskellngPackages.callPackage ({mkDerivation}:
# mkDerivation {
# pname = "hoodle-types";
# version = "0.3.999";
# src = ./hoodle-types;
# license = stdenv.lib.licenses.bsd3;
# buildDepends = with haskellngPackages; [ aeson lens cereal mtl strict text uuid ];
# }) {};
# hoodle-parser =
# haskellngPackages.callPackage ({mkDerivation}:
# mkDerivation {
# pname = "hoodle-parser";
# version = "0.3.999";
# src = ./hoodle-parser;
# license = stdenv.lib.licenses.bsd3;
# buildDepends = with haskellngPackages; [ attoparsec either directory hoodle-types lens cereal mtl strict text xournal-types ];
# }) {};
# xournal-types =
# haskellngPackages.callPackage ({mkDerivation}:
# mkDerivation {
# pname = "xournal-types";
# version = "0.5.1";
# src = ./xournal-types;
# license = stdenv.lib.licenses.bsd3;
# buildDepends = with haskellngPackages; [ cereal lens strict TypeCompose ];
# }) {};
# xournal-parser =
# haskellngPackages.callPackage ({mkDerivation}:
# mkDerivation {
# pname = "xournal-parser";
# version = "0.5.1";
# src = ./xournal-parser;
# license = stdenv.lib.licenses.bsd3;
# buildDepends = with haskellngPackages; [ attoparsec attoparsec-conduit cereal conduit conduit-extra containers either
# exceptions directory lens mtl strict text transformers xml-conduit xml-types
# xournal-types
# zlib-conduit ];
# }) {};
# hoodle-builder =
# haskellngPackages.callPackage ({mkDerivation}:
# mkDerivation {
# pname = "hoodle-builder";
# version = "0.3.999";
# src = ./hoodle-builder;
# license = stdenv.lib.licenses.bsd3;
# buildDepends = with haskellngPackages; [ blaze-builder double-conversion hoodle-types lens strict text ];
# }) {};
# hoodle-render =
# haskellngPackages.callPackage ({mkDerivation}:
# mkDerivation {
# pname = "hoodle-render";
# version = "0.5.0";
# src = ./hoodle-render;
# license = stdenv.lib.licenses.bsd3;
# buildDepends = with haskellngPackages; [ base64-bytestring cairo containers directory filepath gd hashable hoodle-types
# lens monad-loops mtl popplerNew stm strict svgcairo time transformers unix unordered-containers
# uuid ];
# }) {};
# hoodle-publish =
# haskellngPackages.callPackage ({mkDerivation}:
# mkDerivation {
# pname = "hoodle-publish";
# version = "0.2.0";
# src = ./hoodle-publish;
# license = stdenv.lib.licenses.bsd3;
# buildDepends = with haskellngPackages; [ attoparsec cairo cmdargs containers directory directory-tree filepath
# gtk hoodle-parser hoodle-render hoodle-types
# HTTP io-streams lens mtl network-uri pdf-toolbox-core pdf-toolbox-document
# process transformers unordered-containers uuid ];
# }) {};
# hoodle-core =
# haskellngPackages.callPackage ({mkDerivation}:
# mkDerivation {
# pname = "hoodle-core";
# version = "0.15.0";
# src = ./hoodle-core;
# license = stdenv.lib.licenses.bsd3;
# buildDepends = with haskellngPackages; [ aeson aeson-pretty array attoparsec base64-bytestring binary cairo
# case-insensitive cereal containers configurator coroutine-object Diff
# directory either errors filepath fsnotify gd handa-gdata
# hoodle-builder hoodle-parser hoodle-publish hoodle-render hoodle-types
# http-types lens monad-loops mtl network-uri old-locale pango popplerNew process
# pureMD5 stm strict svgcairo system-filepath template-haskell text time
# transformers transformers-free unordered-containers uuid vector websockets
# xournal-parser ];
# }) {};
# hoodle =
# haskellngPackages.callPackage ({mkDerivation}:
# mkDerivation {
# pname = "hoodle";
# version = "0.4.0";
# src = ./hoodle;
# license = stdenv.lib.licenses.bsd3;
# buildDepends = with haskellngPackages; [ cmdargs configurator containers directory dyre filepath hoodle-core mtl ];
# }) {};
# };
# in jobs
let newghcpkgs = pkgs.callPackage <nixpkgs/pkgs/development/haskell-modules> {
ghc = pkgs.haskell.compiler.ghc7101;
packageSetConfig = pkgs.callPackage <nixpkgs/pkgs/development/haskell-modules/configuration-ghc-7.10.x.nix> {};
overrides = self: super: rec {
coroutine-object = self.callPackage ./coroutine-object {};
xournal-types = self.callPackage ./xournal-types {};
xournal-parser = self.callPackage ./xournal-parser { inherit xournal-types; };
hoodle-types = self.callPackage ./hoodle-types {};
hoodle-builder = self.callPackage ./hoodle-builder { inherit hoodle-types; };
hoodle-parser = self.callPackage ./hoodle-parser { inherit hoodle-types xournal-types; };
hoodle-render = self.callPackage ./hoodle-render { inherit hoodle-types; };
hoodle-publish = self.callPackage ./hoodle-publish { inherit hoodle-types hoodle-render; };
hoodle-core = self.callPackage ./hoodle-core { inherit coroutine-object hoodle-types hoodle-parser hoodle-builder hoodle-render hoodle-publish xournal-parser; };
hoodle = self.callPackage ./hoodle { inherit hoodle-core; };
};
};
in with newghcpkgs; {
inherit coroutine-object xournal-types xournal-parser hoodle-types hoodle-builder hoodle-parser hoodle-render hoodle-publish hoodle-core hoodle;
}

0 comments on commit eb8d3c8

Please sign in to comment.