-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
18 lines (18 loc) · 837 Bytes
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{ nixpkgs ? import <nixpkgs> {} }:
let
# get our custom plugin enabled ghc
ghc = (nixpkgs.callPackage ./ghc {}).pluginGhc;
# package expressions
data-bitcode = ghc.callPackage ./data-bitcode { };
data-bitcode-llvm = ghc.callPackage ./data-bitcode-llvm { inherit data-bitcode; };
data-bitcode-edsl = ghc.callPackage ./data-bitcode-edsl { inherit data-bitcode data-bitcode-llvm; };
data-bitcode-plugin = ghc.callPackage ./data-bitcode-plugin { inherit data-bitcode-edsl data-bitcode-llvm; };
# setup a ghc with the plugin in the package database.
pluginGhc = ghc.ghcWithPackages (pkgs: [data-bitcode-plugin]);
in
# Create an empty derivation, that has the
# custom ghc as well as llvm available.
nixpkgs.pkgs.stdenv.mkDerivation {
name = "data-bitcode-plugin-env";
buildInputs = [ pluginGhc nixpkgs.pkgs.llvm_39 ];
}