mirror of
https://github.com/haskell-nix/hnix-store.git
synced 2024-11-26 23:21:16 +03:00
33 lines
833 B
Nix
33 lines
833 B
Nix
{ pkgs ? import <nixpkgs> {}
|
|
, compiler ? null
|
|
}:
|
|
let
|
|
lib = pkgs.lib;
|
|
overlay = import ./overlay.nix pkgs compiler;
|
|
overrideHaskellPackages = orig: {
|
|
buildHaskellPackages =
|
|
orig.buildHaskellPackages.override overrideHaskellPackages;
|
|
overrides = if orig ? overrides
|
|
then pkgs.lib.composeExtensions orig.overrides overlay
|
|
else overlay;
|
|
};
|
|
|
|
packageSet =
|
|
if compiler == null
|
|
then pkgs.haskellPackages
|
|
else pkgs.haskell.packages.${compiler};
|
|
|
|
haskellPackages = packageSet.override overrideHaskellPackages;
|
|
in {
|
|
inherit (haskellPackages)
|
|
hnix-store-core
|
|
hnix-store-db
|
|
hnix-store-json
|
|
hnix-store-nar
|
|
hnix-store-readonly
|
|
hnix-store-remote
|
|
hnix-store-tests;
|
|
haskellPackages = lib.dontRecurseIntoAttrs haskellPackages;
|
|
pkgs = lib.dontRecurseIntoAttrs pkgs;
|
|
}
|