@@ -730,7 +730,7 @@ final: prev: {
730
730
flags = p . flags ;
731
731
components = getComponents cabal2nix . components hsPkgs p ;
732
732
package = cabal2nix . package // {
733
- identifier = { name = p . pkg-name ; version = p . pkg-version ; } ;
733
+ identifier = { name = p . pkg-name ; version = p . pkg-version ; id = p . id ; } ;
734
734
isProject = false ;
735
735
setup-depends = [ ] ;
736
736
} ;
@@ -755,15 +755,21 @@ final: prev: {
755
755
} // final . lib . optionalAttrs ( p . pkg-src . type or "" == "local" ) {
756
756
src = if final . lib . hasPrefix "/" p . pkg-src . path
757
757
then p . pkg-src . path
758
- else callProjectResults . src + final . lib . removeSuffix "/." ( final . lib . removeSuffix "/." (
759
- if final . lib . hasPrefix ".${ callProjectResults . src . origSubDir or "" } /" ( p . pkg-src . path + "/" )
760
- then final . lib . removePrefix ".${ callProjectResults . src . origSubDir or "" } " p . pkg-src . path
761
- else throw "Unexpected path ${ p . pkg-src . path } expected it to start with .${ callProjectResults . src . origSubDir or "" } " ) ) ;
758
+ else haskellLib . appendSubDir {
759
+ inherit ( callProjectResults ) src ;
760
+ subDir = final . lib . removePrefix "/" ( final . lib . removeSuffix "/." ( final . lib . removeSuffix "/." (
761
+ if final . lib . hasPrefix ".${ callProjectResults . src . origSubDir or "" } /" ( p . pkg-src . path + "/" )
762
+ then final . lib . removePrefix ".${ callProjectResults . src . origSubDir or "" } " p . pkg-src . path
763
+ else throw "Unexpected path ${ p . pkg-src . path } expected it to start with .${ callProjectResults . src . origSubDir or "" } " ) ) ) ;
764
+ includeSiblings = true ; # Filtering sibling dirs of the package dir is done in the
765
+ # component builder so that relative paths can be used to
766
+ # reference project directories not in the package subDir.
767
+ } ;
762
768
} // {
763
769
flags = p . flags ;
764
770
components = getComponents cabal2nix . components hsPkgs p ;
765
771
package = cabal2nix . package // {
766
- identifier = { name = p . pkg-name ; version = p . pkg-version ; } ;
772
+ identifier = { name = p . pkg-name ; version = p . pkg-version ; id = p . id ; } ;
767
773
isProject = true ;
768
774
setup-depends = [ ] ;
769
775
} ;
@@ -861,7 +867,8 @@ final: prev: {
861
867
in { inherit name value ; }
862
868
) ) componentsByName ) ) ;
863
869
in rec {
864
- identifier = { name = packageName ; version = builtins . head versions ; } ;
870
+ isRedirect = true ;
871
+ identifier = rec { name = packageName ; version = builtins . head versions ; id = "${ name } -${ version } " ; } ;
865
872
components =
866
873
final . lib . mapAttrs componentsWithPrefix haskellLib . componentPrefix
867
874
// final . lib . optionalAttrs ( componentsByName ? lib ) {
@@ -963,7 +970,7 @@ final: prev: {
963
970
else components . ${ haskellLib. prefixComponent . ${ builtins. elemAt m 0 } } . ${ builtins . elemAt m 1 } ;
964
971
965
972
coverageReport = haskellLib . coverageReport ( {
966
- name = package . identifier . name + "-" + package . identifier . version ;
973
+ name = package . identifier . id ;
967
974
# Include the checks for a single package.
968
975
checks = final . lib . filter ( final . lib . isDerivation ) ( final . lib . attrValues package' . checks ) ;
969
976
# Checks from that package may provide coverage information for any library in the project.
0 commit comments