Closed RAVENz46 closed 5 months ago
The nix flake is user contributed and I do not have the ability to support it as I don't use nix. I would happily accept a PR that fixes this.
Fortunately, the source build went well, but I get this error. If you have any ideas on how to fix it, I would appreciate hearing from you.
$ simp
PanicInfo { payload: Any { .. }, message: Some(Unable to create adapter), location: Location { file: "src/main.rs", line: 117, col: 14 }, can_unwind: true, force_no_backtrace: false }
Are you using an Nvidia GPU?
You could try forcing Vulkan/OpenGL by setting SIMP_GPU_BACKEND=vulkan
or SIMP_GPU_BACKEND=gl
Thanks! I realized that I need to add vulkan-loader to library path and now it works!
Do you want to make a PR to update the flake with the new working one?
I wanna try this on NixOS but I couldn't.
install via flake
Build fail.
install via prebuild binary
Build success but unable to launch. Error log
nix derivation
```nix { stdenv , lib , fetchzip , autoPatchelfHook }: stdenv.mkDerivation rec { pname = "simp"; version = "3.5.3"; src = fetchzip { url = "https://github.com/Kl4rry/simp/releases/download/v${version}/simp-x86_64-unknown-linux-gnu.tar.xz"; hash = "sha256-XR3c6FlJhaS1nhBP2O/9/KC5YyxGutBc31pfMWkc+FI="; }; nativeBuildInputs = [ autoPatchelfHook ]; buildInputs = [ stdenv.cc.cc.lib ]; installPhase = '' mkdir -p $out/bin cp ${pname} $out/bin ''; meta = with lib; { description = "Simp is a fast and simple GPU-accelerated image manipulation program"; homepage = "https://github.com/Kl4rry/simp"; license = licenses.asl20; maintainers = with maintainers; [ ]; mainProgram = "simp"; }; } ````install via source
Build fail. Build log
nix derivation
```nix { lib , rustPlatform , fetchFromGitHub , pkg-config , libxkbcommon , vulkan-loader , stdenv , darwin , wayland , libGL , xorg , makeDesktopItem , copyDesktopItems }: rustPlatform.buildRustPackage rec { pname = "simp"; version = "3.5.3"; src = fetchFromGitHub { owner = "Kl4rry"; repo = "simp"; rev = "v${version}"; hash = "sha256-NALVHcU+NhCT5w+pn6WhP+cFGPuDhnPt+IDNHN/oqls="; }; cargoHash = "sha256-Wp50ldXGy7MLQTnvZDx3LIr8jLBpkoCrh0/xPowIn54="; nativeBuildInputs = [ pkg-config copyDesktopItems ]; buildInputs = [ libxkbcommon vulkan-loader libGL ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.AppKit darwin.apple_sdk.frameworks.CoreGraphics darwin.apple_sdk.frameworks.Foundation darwin.apple_sdk.frameworks.Metal darwin.apple_sdk.frameworks.QuartzCore ] ++ lib.optionals stdenv.isLinux [ wayland xorg.libXcursor xorg.libXi xorg.libXrandr xorg.libX11 ]; desktopItems = [ (makeDesktopItem { name = "simp"; desktopName = "simp"; genericName= "Image Editor"; exec = "simp %U"; icon = "icon"; categories = [ "Graphics" ]; mimeTypes = [ "image/bmp" ]; }) ]; preBuild = '' mkdir -p $out/share/icons/hicolor/256x256/apps cp $src/icon.png $out/share/icons/hicolor/256x256/apps/ ''; postFixup = '' patchelf $out/bin/${pname} \ --add-rpath ${lib.makeLibraryPath [ libGL libxkbcommon wayland ]} ''; meta = with lib; { description = "Simp is a fast and simple GPU-accelerated image manipulation program"; homepage = "https://github.com/Kl4rry/simp"; license = licenses.asl20; maintainers = with maintainers; [ ]; mainProgram = "simp"; }; } ```