Hadrian build-stack-nix build script fails with error "Executable named hadrian not found on path"
Summary
When I run hadrian/build-stack-nix
I get the error "Executable named hadrian not found on path".
The path links to the non-nix version instead of the nix version where the executable were put.
Executable named hadrian not found on path: ["/Users/anka/projekt/not-mine/haskell/ghc/hadrian/.stack-work/install/x86_64-osx/95d308086fb5386e1cecc5e0eec8cb7a8afa33520a66bce3acad3543aa31b190/8.10.4/bin","/Users/anka/.stack/snapshots/x86_64-osx/95d308086fb5386e1cecc5e0eec8cb7a8afa33520a66bce3acad3543aa31b190/8.10.4/bin","/Users/anka/.stack/compiler-tools/x86_64-osx/ghc-8.10.4/bin","/Users/anka/.stack/programs/x86_64-osx/ghc-8.10.4/bin","/Users/anka/.local/bin","/Users/anka/.nix-profile/bin","/run/current-system/sw/bin","/nix/var/nix/profiles/default/bin","/usr/local/bin","/usr/bin","/usr/sbin","/bin","/sbin"]
While the hadrian
executable is in:
/Users/anka/projekt/not-mine/haskell/ghc/hadrian/.stack-work/install/x86_64-osx-nix/926d76594154e5672d6a34d0b77364ed0e64c160d29fe398d8e3e48bf11c10b7/8.10.4/bin
Steps to reproduce
- Run
hadrian/build-stack-nix
on a clean ghc clone - Get the error above
Expected behavior
The generated PATH should contain the .stack-work/install/x86_64-osx-nix/...
path instead of the
.stack-work/install/x86_64-osx/...
path.
Environment
- GHC version used: 8.10.4
Optional:
- Operating System: MacOS Catalina 10.15.7
- System Architecture: x86-64