feat(build): Introduce pre-packaged GHC with dependencies via Nix
This uses the Nix infrastructure's Haskell setup to create a GHC derivation that comes with all required Haskell packages, fetched & built via Nix. Downstream packages that want to make use of Haskell dependencies need them to be added to this list.
This commit is contained in:
parent
ca549e4edc
commit
6fbdf41b05
2 changed files with 27 additions and 2 deletions
|
|
@ -41,7 +41,12 @@ load(
|
||||||
"haskell_register_ghc_nixpkgs",
|
"haskell_register_ghc_nixpkgs",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Register a Haskell toolchain with all required external
|
||||||
|
# dependencies.
|
||||||
|
#
|
||||||
|
# All dependencies need to be set up in thirdParty.ghc in default.nix
|
||||||
haskell_register_ghc_nixpkgs(
|
haskell_register_ghc_nixpkgs(
|
||||||
version = "8.6.4",
|
version = "8.6.5",
|
||||||
repositories = { "nixpkgs": "default.nix" }
|
repositories = { "nixpkgs": "default.nix" },
|
||||||
|
attribute_path = "thirdParty.ghc",
|
||||||
)
|
)
|
||||||
|
|
|
||||||
20
default.nix
20
default.nix
|
|
@ -3,10 +3,30 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
localPkgs = super: pkgs: {
|
localPkgs = super: pkgs: {
|
||||||
|
# Local projects should be added here:
|
||||||
tazjin.tazblog = import ./services/tazblog { inherit pkgs; };
|
tazjin.tazblog = import ./services/tazblog { inherit pkgs; };
|
||||||
tazjin.gemma = import ./services/gemma { inherit pkgs; };
|
tazjin.gemma = import ./services/gemma { inherit pkgs; };
|
||||||
|
|
||||||
|
# Third-party projects (either vendored or modified from nixpkgs)
|
||||||
|
# should be added here:
|
||||||
thirdParty.gitAppraise = pkgs.callPackage ./third_party/go/git-appraise/git-appraise {};
|
thirdParty.gitAppraise = pkgs.callPackage ./third_party/go/git-appraise/git-appraise {};
|
||||||
|
thirdParty.ghc = pkgs.haskell.packages.ghc865.ghcWithPackages(p: with p; [
|
||||||
|
acid-state
|
||||||
|
base64-bytestring
|
||||||
|
blaze-html
|
||||||
|
containers
|
||||||
|
cryptohash
|
||||||
|
hamlet
|
||||||
|
happstack-server
|
||||||
|
ixset
|
||||||
|
markdown
|
||||||
|
mtl
|
||||||
|
network
|
||||||
|
network-uri
|
||||||
|
options
|
||||||
|
rss
|
||||||
|
safecopy
|
||||||
|
]);
|
||||||
};
|
};
|
||||||
|
|
||||||
# TODO(tazjin): It might be preferable to pin a specific commit of
|
# TODO(tazjin): It might be preferable to pin a specific commit of
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue