mirror of
https://github.com/haskell-nix/hnix-store.git
synced 2024-09-11 18:05:56 +03:00
32 lines
813 B
Nix
32 lines
813 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-nar
|
|
hnix-store-readonly
|
|
hnix-store-remote
|
|
hnix-store-tests;
|
|
haskellPackages = lib.dontRecurseIntoAttrs haskellPackages;
|
|
pkgs = lib.dontRecurseIntoAttrs pkgs;
|
|
}
|