Duckstation build fails at versionCheckHook due to glslc not found

Hi,

I’ve been trying to build duckstation using the build files at nixpkgs/pkgs/by-name/du/duckstation at b6018f87da91d19d0ab4cf979885689b469cdd41 · NixOS/nixpkgs · GitHub . I’m running NixOS 26.05 on an Intel CPU laptop with Nvidia 3060 discrete GPU (mid-2021 Razer Blade).

First problem was the license so:
$ export NIXPKGS_ALLOW_UNFREE=1

Second problem was qt5 being deprecated. My workaround is to build with:
$ nix-build --show-trace -E ‘with import <nixpkgs> {}; qt6Packages.callPackage ./package.nix {extra-cmake-modules=pkgs.kdePackages.extra-cmake-modules;}’

Everything appears to build, I can’t see any errors until nix tries to install and the versionCheckHook phase when I get (output trimmed, full build output at duckstation build log - Pastes.io ):
Install the project…
– Install configuration: “Release”
– Installing: /nix/store/dlxcxfi2zd3yafyla5np8p7ifkaf7cyx-shaderc-duckstation-0.1-11443-dev/include/shaderc/env.h
...
stripping (with command strip and flags -S -p) in /nix/store/dlxcxfi2zd3yafyla5np8p7ifkaf7cyx-shaderc-duckstation-0.1-11443-dev/lib
Running phase: installCheckPhase
Executing versionCheckPhase
versionCheckHook: /nix/store/b7aydy16gwyff3yny14n7za22ncwmfaf-shaderc-duckstation-0.1-11443/bin/glslc was not found, or is not an executable
error: Cannot build ‘/nix/store/8zqd519r1c8dg2cnipfa50m0q4s1qkzs-shaderc-duckstation-0.1-11443.drv’.
Reason: builder failed with exit code 2.

And then I get the build cleanup etc. with the error repeated.

I tried with 2 different versions of duckstation: v0.1.10130 (the version specified in the 25.11 package.nix) and the most recent release: v0.1.11443, I get exactly the same error. Not surprising really, it’s the shaderc dependency that is failing to build.

I’m going to do some more debugging myself with nix-shell, but I’d really appreciate any thoughts, ideas, workarounds, etc.

I’ve tried to use various PS1 plugins for libretro but they don’t work very well, so I’m trying to get duckstation working because it did everything I wanted on NixOS 25.11.

Cheers

This error was reported in issue 490402 and the proposed fix made in PR 490411 was to disable the doInstallCheck.

That said, be aware that duckstation has been dropped on master in PR 499706 due to upstream disallowing packaging of the software.

The, now ex, maintainer noted that it runs fine as an app-image using the following command steam-run appimage-run <path-to-appimage>.

1 Like

Thank you! I should have been able to find that bug report and the fix, but I never thought to look. I’ve now got the Duckstation AppImage running from Lutris :slight_smile:

I’m aware of the changed status of Duckstation, but I’m not packaging it, I just wanted to compile it for my own use, which I think is still allowed. In any case, the intent of the Duckstation maintainer was to eliminate all the support requests he gets from end-users of downstream packaged DS and I’m not intending to bother him with my build errors.

FWIW, I tried building after applying the patches in PR 490411 and I still get an error, this time about speex:

       > /build/source/src/core/sound_effect_manager.cpp:727:10: fatal error: 'speex/speex_resampler.h' file not found
       >   727 | #include "speex/speex_resampler.h"
       >       |          ^~~~~~~~~~~~~~~~~~~~~~~~~
       > 1 error generated.

I might or might not try and get DS to build at some point for the fun of it, but I’m probably better off sticking with the AppImage anyway.

Thanks again for pointing me in the right direction :slight_smile:

My reason for mentioning it was only to provide context on the reason it was dropped from nixpkgs, nothing more.

That is because you are trying to build v0.1.11443, but the nixpkgs derivation was created for an older version. At least one new dependency has been added to duckstation, between the old and new version that you need to add to the derivation to get it to work.

If you stick with the older version, it should work. Updating to the new version will be a little bit of work.

You are welcome.