I am getting the error at the end of my nix-build (see below).
This is with a nix file that was adapted from another that was working for me a few years ago.
I did set my nixpkgs to the latest - so I suppose an ‘unstable’ version, and I see some comments to the effect that this has caused other people problems.
Otherwise the entire build seems to complete and it’s only when the 'fixup phase" runs that this seems to happen.
I can’t find any references to the ghc path in the build products, other than the substring “ghc-9.6.5” appearing (as expected) in the paths generated for build products, but these aren’t paths back to an original compiler per se, merely a naming convention to indicate the compiler used.
Any ideas as to how to make this error go away? Is picking a particular nixpkgs archive the answer?
My nix file:
let
# Fetch the external Git repository for the boa package
boaPackage = builtins.fetchGit {
url = "git@bitbucket.org:levans/boa.git";
rev = "345ee367141c4771cd5bc43e5bea414a630a0000";
};
project-overlay = final: prev: {
# Update to use ghc965
ppilot-haskell-packages = prev.haskell.packages.ghc965.override {
overrides = haskellPackagesNew: haskellPackagesOld: {
mkDerivation = args: haskellPackagesOld.mkDerivation (args // {
doCheck = false;
doHaddock = false;
enableSeparateDataOutput = false;
# Ensure git is available during the build process
nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ final.git ];
postInstall =
let ghcName = "${haskellPackagesNew.ppilot.passthru.compiler.targetPrefix}${haskellPackagesNew.ppilot.passthru.compiler.haskellCompilerName}";
sysPlusGhc = "${haskellPackagesNew.ppilot.system}-${ghcName}";
ppilotName = haskellPackagesNew.ppilot.name;
fullDataPath = "share/${sysPlusGhc}/${ppilotName}";
in
''
ln -sf "$out/${fullDataPath}/config" $out/config
ln -sf "$out/${fullDataPath}/static" $out/static
ln -sf "$out/${fullDataPath}/client" $out/client
ln -sf "$out/${fullDataPath}/clientpp" $out/clientpp
ln -sf "$out/${fullDataPath}/adminclient" $out/adminclient
ln -sf "$out/${fullDataPath}/tagcatalog" $out/tagcatalog
'';
});
# Local project dependencies here
ppilot = final.haskell.lib.dontCheck (haskellPackagesNew.callCabal2nix "ppilot" ./. { });
boa = final.haskell.lib.dontCheck (haskellPackagesNew.callCabal2nix "boa" boaPackage { });
};
};
#ppilot = final.haskell.lib.justStaticExecutables final.ppilot-haskell-packages.ppilot;
ppilot = final.haskell.lib.justStaticExecutables (final.ppilot-haskell-packages.ppilot.overrideAttrs (oldAttrs: {
nativeBuildInputs = (oldAttrs.nativeBuildInputs or []) ++ [ final.git ];
}));
ppilot-dev-shell = final.ppilot-haskell-packages.shellFor {
withHoogle = false;
packages = hpkgs: [ hpkgs.ppilot hpkgs.gantt ]; # Add all necessary packages here
buildInputs = [ ];
nativeBuildInputs = [
final.cabal-install
final.ghcid
final.git
final.haskell.packages.ghc965.haskell-language-server
final.haskell.packages.ghc965.fourmolu
];
};
};
nixpkgs-src = builtins.fetchTarball {
# Updated nixpkgs-unstable version
name = "nixpkgs-for-ppilot";
url = "https://github.com/NixOS/nixpkgs/archive/cb8e8bbe7579a5283f6fae1dd40a5a7386db2f2f.tar.gz";
sha256 = "0120nbmjp4l2scsrn7vxlv7jark0x41a71a7x4lk4mx8x1axwcyy";
};
in
import nixpkgs-src { overlays = [ project-overlay ]; }
The error:
buildPhase completed in 1 minutes 7 seconds
Running phase: haddockPhase
install: skipping file '/dev/fd/63', as it was replaced while being copied
Running phase: installPhase
install: skipping file '/dev/fd/63', as it was replaced while being copied
Installing library in /nix/store/gnqcjnlxl3i5bqcynn5w9n25vszrhgs3-ppilot-0.1.0/lib/ghc-9.6.5/lib/aarch64-osx-ghc-9.6.5/ppilot-0.1.0-IHc5YJ9MBFE57hqyEaM9n
Installing executable worker in /nix/store/gnqcjnlxl3i5bqcynn5w9n25vszrhgs3-ppilot-0.1.0/bin
Warning: The directory
/nix/store/gnqcjnlxl3i5bqcynn5w9n25vszrhgs3-ppilot-0.1.0/bin is not in the
system search path.
Installing executable ppilot in /nix/store/gnqcjnlxl3i5bqcynn5w9n25vszrhgs3-ppilot-0.1.0/bin
Warning: The directory
/nix/store/gnqcjnlxl3i5bqcynn5w9n25vszrhgs3-ppilot-0.1.0/bin is not in the
system search path.
Registering library for ppilot-0.1.0..
Running phase: fixupPhase
install: skipping file '/dev/fd/63', as it was replaced while being copied
checking for references to /private/tmp/nix-build-ppilot-0.1.0.drv-0/ in /nix/store/gnqcjnlxl3i5bqcynn5w9n25vszrhgs3-ppilot-0.1.0...
patching script interpreter paths in /nix/store/gnqcjnlxl3i5bqcynn5w9n25vszrhgs3-ppilot-0.1.0
stripping (with command strip and flags -S) in /nix/store/gnqcjnlxl3i5bqcynn5w9n25vszrhgs3-ppilot-0.1.0/lib /nix/store/gnqcjnlxl3i5bqcynn5w9n25vszrhgs3-ppilot-0.1.0/bin
error: output '/nix/store/gnqcjnlxl3i5bqcynn5w9n25vszrhgs3-ppilot-0.1.0' is not allowed to refer to the following paths:
/nix/store/cdjkhc6i9f508k3ysbn8l05bpb8wihbx-ghc-9.6.5