Skip to content

Commit a242292

Browse files
committed
Don't set values for pre-existing packages
1 parent bf06758 commit a242292

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

overlays/haskell.nix

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,12 @@ final: prev: {
696696
pkgs = (hackage: {
697697
packages = final.lib.listToAttrs (
698698
final.lib.concatMap (p:
699-
final.lib.optional (p.type == "pre-existing" || (p.type == "configured" && (p.style == "global" || p.style == "inplace") )) {
699+
final.lib.optional (p.type == "pre-existing") {
700+
name = to-key p;
701+
value.revision = null;
702+
}) plan-json.install-plan
703+
++ final.lib.concatMap (p:
704+
final.lib.optional (p.type == "configured" && (p.style == "global" || p.style == "inplace") ) {
700705
name = to-key p;
701706
value.revision =
702707
{hsPkgs, ...}@args:
@@ -713,9 +718,8 @@ final: prev: {
713718
} // {
714719
flags = p.flags;
715720
components = getComponents cabal2nix.components hsPkgs p;
716-
package = cabal2nix.package // final.lib.optionalAttrs (p.type != "pre-existing") {
721+
package = cabal2nix.package // {
717722
identifier = { name = p.pkg-name; version = p.pkg-version; };
718-
} // {
719723
isProject = false;
720724
setup-depends = map (lookupDependency hsPkgs.pkgsBuildBuild) (p.components.setup.depends or []);
721725
# TODO = map (lookupExeDependency hsPkgs.pkgsBuildBuild) (p.components.setup.exe-depends or []);

0 commit comments

Comments
 (0)