summaryrefslogtreecommitdiff
path: root/lore/bild.nix
diff options
context:
space:
mode:
Diffstat (limited to 'lore/bild.nix')
-rw-r--r--lore/bild.nix56
1 files changed, 0 insertions, 56 deletions
diff --git a/lore/bild.nix b/lore/bild.nix
deleted file mode 100644
index 589fda9..0000000
--- a/lore/bild.nix
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- # a common build function
- #
- # see example usage in pack/ibb.nix. this is not set in stone, obviously. we
- # should figure out how to use overlays, for one.
- #
- bild = file: { nixpkgs }:
- with nixpkgs;
- let
- pack = import file;
-
- depsToPackageSet = packageSet: deps:
- map (s: builtins.getAttr s packageSet) deps;
-
- ghc844_ = pkgs.haskell.packages.ghc844.override (oldAttrs: {
- overrides = with pkgs.haskell.lib; self: super: {
- clay = dontCheck super.clay;
- };
- });
-
- ghc = ghc844_.ghcWithPackages (hp: depsToPackageSet hp
- # we need hinotify for chip/make
- ([ "hinotify" ] ++ pack.deps.both ++ pack.deps.apex));
-
- ghcjs_ = pkgs.haskell.packages.ghcjs.override (oldAttrs: {
- overrides = with pkgs.haskell.lib; self: super: {
- clay = dontCheck super.clay;
- http-types = dontCheck super.http-types;
- tasty-quickcheck = dontCheck super.tasty-quickcheck;
- scientific = dontCheck super.scientific; # takes forever
- servant = dontCheck super.servant;
- comonad = dontCheck super.comonad;
- QuickCheck = dontCheck super.QuickCheck;
- };
- });
-
- ghcjs = ghcjs_.ghcWithPackages (hp:
- depsToPackageSet hp (pack.deps.both ++ pack.deps.aero));
-
- make = ../chip/make;
- in
- stdenv.mkDerivation {
- name = pack.name;
- version = "0";
- src = ../.;
- nativeBuildInputs = [
- ghc ghcjs
- ];
- strictDeps = true;
- buildPhase = "${ghc}/bin/runhaskell ${make} ${pack.name}";
- installPhase = ''
- mkdir -p $out/bin
- cp bild/${pack.name} $out/bin/${pack.name}
- '';
- };
-}