File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 677
677
# proper relative paths.
678
678
(cd $out${ subDir' } && plan-to-nix --full ${ if ignorePackageYaml then "--ignore-package-yaml" else "" } --plan-json $tmp${ subDir' } /dist-newstyle/cache/plan.json -o .)
679
679
680
- substituteInPlace $tmp${ subDir' } /dist-newstyle/cache/plan.json --replace "$out" ""
680
+ substituteInPlace $tmp${ subDir' } /dist-newstyle/cache/plan.json --replace "$out" ". "
681
681
substituteInPlace $tmp${ subDir' } /dist-newstyle/cache/plan.json --replace "$CABAL_DIR" ""
682
682
683
683
# Replace the /nix/store paths to minimal git repos with indexes (that will work with materialization).
Original file line number Diff line number Diff line change @@ -713,8 +713,9 @@ final: prev: {
713
713
} // {
714
714
flags = p . flags ;
715
715
components = getComponents cabal2nix . components hsPkgs p ;
716
- package = cabal2nix . package // {
716
+ package = cabal2nix . package // final . lib . optionalAttrs ( p . type != "pre-existing" ) {
717
717
identifier = { name = p . pkg-name ; version = p . pkg-version ; } ;
718
+ } // {
718
719
isProject = false ;
719
720
setup-depends = map ( lookupDependency hsPkgs . pkgsBuildBuild ) ( p . components . setup . depends or [ ] ) ;
720
721
# TODO = map (lookupExeDependency hsPkgs.pkgsBuildBuild) (p.components.setup.exe-depends or []);
@@ -736,9 +737,10 @@ final: prev: {
736
737
in builtins . removeAttrs cabal2nix [ "src" ] // final . lib . optionalAttrs ( p ? pkg-src-sha256 ) {
737
738
sha256 = p . pkg-src-sha256 ;
738
739
} // final . lib . optionalAttrs ( p . pkg-src . type or "" == "local" ) {
739
- src = if final . lib . hasPrefix "/" p . pkg-src . path && ! final . lib . hasPrefix " ${ callProjectResults . src . origSubDir or "" } /." p . pkg-src . path
740
+ src = if final . lib . hasPrefix "/" p . pkg-src . path
740
741
then p . pkg-src . path
741
- else callProjectResults . src + final . lib . removePrefix "${ callProjectResults . src . origSubDir or "" } /." p . pkg-src . path ;
742
+ else callProjectResults . src + final . lib . removePrefix ".${ callProjectResults . src . origSubDir or "" } "
743
+ ( final . lib . removePrefix ".${ callProjectResults . src . origSubDir or "" } /." p . pkg-src . path ) ;
742
744
} // {
743
745
flags = p . flags ;
744
746
components = getComponents cabal2nix . components hsPkgs p ;
You can’t perform that action at this time.
0 commit comments