Create Upscayl derivation cant find libvulkan.so.1

Hi,
i am trying to package the upscayl appimage.

I have wrote the following code:

with import <nixpkgs> {};

appimageTools.wrapType2 {
  name = "upscayl";
  src = fetchurl {
    url = "https://github.com/upscayl/upscayl/releases/download/v1.5.0/Upscayl-1.5.0.AppImage";
    sha256 = "0Yes81reZQyDtubPDhLO0LFPjGfbnvstJOm919gfxjk=";
  };
  
  
  extraPkgs = pkgs: with pkgs; [ vulkan-headers];
}

This works fine until I try to actually upscale an image then I get the following error message:

upscayl.stderr.on => stderr.toString() /nix/store/g2v78yl50q73zvmls6fwl0rpnvwiz18p-upscayl-extracted/resources/bin/upscayl-realesrgan: error while loading shared libraries: libvulkan.so.1: cannot open shared object file: No such file or directory

It seems like it cant find the vulkan headers and I don’t know how to fix it.

Help would be appreciated.

It can find the headers, but not the actual implementation. See this wiki entry: Packaging/Binaries - NixOS Wiki

Not sure if it helps, but I discovered this program with this topic.

I can use it on NixOS by using

env LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/nix/store/path-to-vulkan-loader/lib/ appimage-run Upscayl-1.5.0.AppImage

I hope this helps :green_heart:

Yes that works thank you :star_struck:

I got my derivation working by simply adding the vulkan loader to the pkg path.

with import <nixpkgs> {};

appimageTools.wrapType2 {
  name = "upscayl";
  src = fetchurl {
    url = "https://github.com/upscayl/upscayl/releases/download/v1.5.0/Upscayl-1.5.0.AppImage";
    sha256 = "0Yes81reZQyDtubPDhLO0LFPjGfbnvstJOm919gfxjk=";
  };
  
  
  extraPkgs = pkgs: with pkgs; [ vulkan-headers vulkan-loader ];
}
1 Like

Could you consider sending it to nixpkgs ? :pray:t3: That’s super useful, and even works on vulkan compatible intel GPU!

Are you sure vulkan-headers are required?

Yes, I plan to add it to nixpkgs.

But before I do that I actually want to try to build it from source.

If I can’t get that to work I will submit the appimage build.

Vulkan-headers is probably not required but I haven’t tested it.

1 Like