Dependency (auto-update) failing to install

I’m very confused as to why a transitive dependency of my project is failing to build.
Prior to this error, lots of other packages have seemingly build fine and then…

...
Preprocessing library for auto-update-0.1.6..
Building library for auto-update-0.1.6..
[1 of 5] Compiling Control.AutoUpdate ( Control/AutoUpdate.hs, dist/build/Control/AutoUpdate.o, dist/build/Control/AutoUpdate.dyn_o )
[2 of 5] Compiling Control.AutoUpdate.Util ( Control/AutoUpdate/Util.hs, dist/build/Control/AutoUpdate/Util.o, dist/build/Control/AutoUpdate/Util.dyn_o )
[3 of 5] Compiling Control.Debounce.Internal ( Control/Debounce/Internal.hs, dist/build/Control/Debounce/Internal.o, dist/build/Control/Debounce/Internal.dyn_o )
[4 of 5] Compiling Control.Debounce ( Control/Debounce.hs, dist/build/Control/Debounce.o, dist/build/Control/Debounce.dyn_o )
[5 of 5] Compiling Control.Reaper   ( Control/Reaper.hs, dist/build/Control/Reaper.o, dist/build/Control/Reaper.dyn_o )
[1 of 5] Compiling Control.AutoUpdate ( Control/AutoUpdate.hs, dist/build/Control/AutoUpdate.p_o )
[2 of 5] Compiling Control.AutoUpdate.Util ( Control/AutoUpdate/Util.hs, dist/build/Control/AutoUpdate/Util.p_o )
[3 of 5] Compiling Control.Debounce.Internal ( Control/Debounce/Internal.hs, dist/build/Control/Debounce/Internal.p_o )
[4 of 5] Compiling Control.Debounce ( Control/Debounce.hs, dist/build/Control/Debounce.p_o )
[5 of 5] Compiling Control.Reaper   ( Control/Reaper.hs, dist/build/Control/Reaper.p_o )
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/07snp5al97m4arnr8i4wlfxr64adqkng-auto-update-0.1.6/lib/ghc-9.6.5/lib/aarch64-osx-ghc-9.6.5/auto-update-0.1.6-3HaZjvXgKL8yFp1D1e2CJ
sed: no input files
error: builder for '/nix/store/201n8a5pm6bm6b9iqbpf73w9a2w8hbd1-auto-update-0.1.6.drv' failed with exit code 4;
       last 25 log lines:
       > Using strip found on system at:
       > /nix/store/gj5jfkr5y5s95vhgvh5hzq70p8dzhw57-clang-wrapper-16.0.6/bin/strip
       > Using tar found on system at:
       > /nix/store/ybdkc5ii93wiy3vpak2l296x4f9avbx0-gnutar-1.35/bin/tar
       > No uhc found
       > Running phase: buildPhase
       > install: skipping file '/dev/fd/63', as it was replaced while being copied
       > Preprocessing library for auto-update-0.1.6..
       > Building library for auto-update-0.1.6..
       > [1 of 5] Compiling Control.AutoUpdate ( Control/AutoUpdate.hs, dist/build/Control/AutoUpdate.o, dist/build/Control/AutoUpdate.dyn_o )
       > [2 of 5] Compiling Control.AutoUpdate.Util ( Control/AutoUpdate/Util.hs, dist/build/Control/AutoUpdate/Util.o, dist/build/Control/AutoUpdate/Util.dyn_o )
       > [3 of 5] Compiling Control.Debounce.Internal ( Control/Debounce/Internal.hs, dist/build/Control/Debounce/Internal.o, dist/build/Control/Debounce/Internal.dyn_o )
       > [4 of 5] Compiling Control.Debounce ( Control/Debounce.hs, dist/build/Control/Debounce.o, dist/build/Control/Debounce.dyn_o )
       > [5 of 5] Compiling Control.Reaper   ( Control/Reaper.hs, dist/build/Control/Reaper.o, dist/build/Control/Reaper.dyn_o )
       > [1 of 5] Compiling Control.AutoUpdate ( Control/AutoUpdate.hs, dist/build/Control/AutoUpdate.p_o )
       > [2 of 5] Compiling Control.AutoUpdate.Util ( Control/AutoUpdate/Util.hs, dist/build/Control/AutoUpdate/Util.p_o )
       > [3 of 5] Compiling Control.Debounce.Internal ( Control/Debounce/Internal.hs, dist/build/Control/Debounce/Internal.p_o )
       > [4 of 5] Compiling Control.Debounce ( Control/Debounce.hs, dist/build/Control/Debounce.p_o )
       > [5 of 5] Compiling Control.Reaper   ( Control/Reaper.hs, dist/build/Control/Reaper.p_o )
       > 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/07snp5al97m4arnr8i4wlfxr64adqkng-auto-update-0.1.6/lib/ghc-9.6.5/lib/aarch64-osx-ghc-9.6.5/auto-update-0.1.6-3HaZjvXgKL8yFp1D1e2CJ
       > sed: no input files
       For full logs, run 'nix-store -l /nix/store/201n8a5pm6bm6b9iqbpf73w9a2w8hbd1-auto-update-0.1.6.drv'.
error: 1 dependencies of derivation '/nix/store/3qdg7hisz79r9gaxn4fz1948hsi196l4-ppilot-0.1.0.drv' failed to build

I assume the problem is “sed: no input files”, but only because it’s the last item logged.
No idea what to try next really.

FWIW, the full nixpkgs.nix file I’m using is:

let
  # Fetch the external Git repository for the boa package
  boaPackage = builtins.fetchGit {
    url = "git@bitbucket.org:levans/boa.git";
    rev = "345ee367141c4771cd5bc43e5bea414a630a9152";
  };

  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;

            postInstall = ''
              ${args.postInstall or ""}
              remove-references-to -t ${final.haskell.compiler.ghc965}
            '';

            #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
              #  '';
          });

          # Try to have this built properly
          auto-update = haskellPackagesOld.auto-update;

          # Local project dependencies here
          ppilot = final.haskell.lib.overrideCabal 
            (final.haskell.lib.justStaticExecutables 
              (haskellPackagesNew.callCabal2nix "ppilot" ./. { })) 
            (old: {
              configureFlags = old.configureFlags or [] ++ [ "--flags=-gitinfo" ];
              disallowGhcReference = false;
            });
          boa = final.haskell.lib.dontCheck (haskellPackagesNew.callCabal2nix "boa" boaPackage { });
          aeson-schema = final.haskell.lib.dontCheck (haskellPackagesNew.callCabal2nix "aeson-schema" ./aeson-schema-0.4.2.0 { });
          ekg = final.haskell.lib.dontCheck (haskellPackagesNew.callCabal2nix "ekg" ./ekg-0.4.0.15 { });  
          ekg-json = final.haskell.lib.dontCheck (haskellPackagesNew.callCabal2nix "ekg-json" ./ekg-json-0.1.0.6 { });
          fsutils = final.haskell.lib.dontCheck (haskellPackagesNew.callCabal2nix "fsutils" ./fsutils-0.1.2 { }); 
          gantt = final.haskell.lib.dontCheck (haskellPackagesNew.callCabal2nix "gantt" ./gantt-0.1.0.0 { });
          network-uri-json = final.haskell.lib.dontCheck (haskellPackagesNew.callCabal2nix "network-uri-json" ./network-uri-json-0.4.0.0 { });
          odd-jobs = final.haskell.lib.dontCheck (haskellPackagesNew.callCabal2nix "odd-jobs" ./odd-jobs-0.2.3 { });
          openai-hs = final.haskell.lib.dontCheck (haskellPackagesNew.callCabal2nix "openai-hs" ./openai-hs-0.3.0.1 { });
          openai-servant = final.haskell.lib.dontCheck (haskellPackagesNew.callCabal2nix "openai-servant" ./openai-servant-0.3.0.1 { });
          pdf-toolbox = final.haskell.lib.dontCheck (haskellPackagesNew.callCabal2nix "pdf-toolbox" ./pdf-toolbox { });
          readable = final.haskell.lib.dontCheck (haskellPackagesNew.callCabal2nix "readable" ./readable-0.3.1 { });
          servant-event-stream = final.haskell.lib.dontCheck (haskellPackagesNew.callCabal2nix "servant-event-stream" ./servant-event-stream-0.2.1.0 { });
          servant-static-th = final.haskell.lib.dontCheck (haskellPackagesNew.callCabal2nix "servant-static-th" ./servant-static-th-1.0.0.0 { });
          snap-core = final.haskell.lib.dontCheck (haskellPackagesNew.callCabal2nix "snap-core" ./snap-core-1.0.5.0 { });
          snap-server = final.haskell.lib.dontCheck (haskellPackagesNew.callCabal2nix "snap-server" ./snap-server-1.1.2.0 { });   
          workdays = final.haskell.lib.dontCheck (haskellPackagesNew.callCabal2nix "workdays" ./workdays-0.1.1 { });
        };
      };

    ppilot = final.haskell.lib.justStaticExecutables final.ppilot-haskell-packages.ppilot;

    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 ]; }

Haven’t really found my feed yet with nix, so this could be something very simple.
I’m using nix on a Mac M3.

In case it helps, there’s the -L | --print-build-logs flag.

Thanks mightyjam, I tried:
nix-build --verbose --show-trace

but that didn’t really shine any new light on things.

I’m supposing that the install phase just sees no files to install somehow.

I’ve just tried to use stack to build (with its nix integration). Although I didn’t expect much of a difference from just doing nix-build (especially as I cited the same nix configuration file in my stack.yaml nix stanza), it did seem to result in a different dependency to be tried, this time OneTuple, but with exactly the same problem (see below).

...
Running phase: installPhase
install: skipping file '/dev/fd/63', as it was replaced while being copied
Installing library in /nix/store/ya4zrfbk8jm9hq6cmvsp60chdd1ain6x-OneTuple-0.4.2/lib/ghc-9.6.5/lib/aarch64-osx-ghc-9.6.5/OneTuple-0.4.2-7od06fXUUXRBNk1V3VY0g5
sed: no input files
error: builder for '/nix/store/2299vpn911kypxazy8ynwzfidcijvlgs-OneTuple-0.4.2.drv' failed with exit code 4;
       last 25 log lines:
       > /nix/store/2wdcsq99cxgcqymfygwvqby4slcrb1nb-cctools-binutils-darwin-wrapper-1010.6/bin/ld
       > No pkg-config found
       > Using runghc version 9.6.5 found on system at:
       > /nix/store/cdjkhc6i9f508k3ysbn8l05bpb8wihbx-ghc-9.6.5/bin/runghc-9.6.5
       > Using strip found on system at:
       > /nix/store/gj5jfkr5y5s95vhgvh5hzq70p8dzhw57-clang-wrapper-16.0.6/bin/strip
       > Using tar found on system at:
       > /nix/store/ybdkc5ii93wiy3vpak2l296x4f9avbx0-gnutar-1.35/bin/tar
       > No uhc found
       > Running phase: buildPhase
       > install: skipping file '/dev/fd/63', as it was replaced while being copied
       > Preprocessing library for OneTuple-0.4.2..
       > Building library for OneTuple-0.4.2..
       > [1 of 3] Compiling Data.Tuple.Solo  ( src/Data/Tuple/Solo.hs, dist/build/Data/Tuple/Solo.o, dist/build/Data/Tuple/Solo.dyn_o )
       > [2 of 3] Compiling Data.Tuple.OneTuple ( src/Data/Tuple/OneTuple.hs, dist/build/Data/Tuple/OneTuple.o, dist/build/Data/Tuple/OneTuple.dyn_o )
       > [3 of 3] Compiling Data.Tuple.Solo.TH ( src/Data/Tuple/Solo/TH.hs, dist/build/Data/Tuple/Solo/TH.o, dist/build/Data/Tuple/Solo/TH.dyn_o )
       > [1 of 3] Compiling Data.Tuple.Solo  ( src/Data/Tuple/Solo.hs, dist/build/Data/Tuple/Solo.p_o )
       > [2 of 3] Compiling Data.Tuple.OneTuple ( src/Data/Tuple/OneTuple.hs, dist/build/Data/Tuple/OneTuple.p_o )
       > [3 of 3] Compiling Data.Tuple.Solo.TH ( src/Data/Tuple/Solo/TH.hs, dist/build/Data/Tuple/Solo/TH.p_o )
       > 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/ya4zrfbk8jm9hq6cmvsp60chdd1ain6x-OneTuple-0.4.2/lib/ghc-9.6.5/lib/aarch64-osx-ghc-9.6.5/OneTuple-0.4.2-7od06fXUUXRBNk1V3VY0g5
       > sed: no input files
       For full logs, run 'nix-store -l /nix/store/2299vpn911kypxazy8ynwzfidcijvlgs-OneTuple-0.4.2.drv'.
error: 1 dependencies of derivation '/nix/store/42c0l1w66l1kbmrkl14f29pfjz49pmx7-ghc-9.6.5-with-packages.drv' failed to build
error: build of '/nix/store/42c0l1w66l1kbmrkl14f29pfjz49pmx7-ghc-9.6.5-with-packages.drv', '/nix/store/6772g0y2ahqckpgxlqpqkpg12qbpawl8-git-2.45.2.drv', '/nix/store/xw71xvsd1bpx40aa1i1jnql7mvg9vbgg-fourmolu-0.14.0.0.drv', '/nix/store/yrg4c09wyl69hl72c3zy46nydcfyq4qx-haskell-language-server-2.9.0.0.drv' failed

At this point I would place scripts into phases in order to debug. For example, postBuild = "ls -la".