I’m trying to package Tacent View, which requires GLX. This is what I have so far:
{
cmake,
fetchFromGitHub,
lib,
ninja,
pkgs,
stdenv,
}:
stdenv.mkDerivation rec {
pname = "tacentview";
version = "1.0.44";
src = fetchFromGitHub {
owner = "bluescan";
repo = pname;
rev = "97defc4beec597978fc7df0f2be4ac1bbe9d5bd1";
hash = "sha256-/nN9S3B1+OgdhwA7X2NHZRQzYMH1VA31S6HpG5sjr/A=";
};
nativeBuildInputs = [
cmake
ninja
];
buildInputs = with pkgs; [
libGL
tacent
xorg.libX11
xorg.libxcb
];
cmakeFlags = [
"-DFETCHCONTENT_SOURCE_DIR_TACENT=${pkgs.poperigby.tacent.src}"
"-DPACKAGE_NIX=True"
];
installPhase = ''
mkdir -p $out/bin
cp tacentview $out/bin
chmod +x $out/bin/tacentview
'';
meta = {
description = "An image and texture viewer";
homepage = "https://github.com/bluescan/tacentview";
license = lib.licenses.isc;
mainProgram = pname;
};
}
This is for it’s depedency, Tacent:
{
cmake,
fetchFromGitHub,
ninja,
stdenv,
}:
stdenv.mkDerivation rec {
pname = "tacent";
version = "0.8.17";
src = fetchFromGitHub {
owner = "bluescan";
repo = pname;
rev = "8ea66e53db59876ff117c0b965b0745cf5ffcfdc";
hash = "sha256-aTnFE/FqwtmHSvZjEJrcG1DEDbxJZHXIWqKi4SFBIWM=";
};
nativeBuildInputs = [
cmake
ninja
];
}
When I try to run it, it gives me this error:
Exe /nix/store/cjbd98in5afvwbj9ajsnhi9hxwlbpg8k-tacentview-1.0.44/bin/tacentview
Tacent View V 1.0.44
Tacent Library V 0.8.17
Dear ImGui V 1.89.2
GLFW V 3.3.2
For CLI Mode: tacentview --cli --help
LocInfo: staticDataDir : /Data/
LocInfo; ThumbCacheDir : /home/cassidy/.tacentview/Cache/
LocInfo: cfgFile : /home/cassidy/.tacentview/Viewer.cfg
Glfw Error 65542: GLX: Failed to load GLX
Do I need to wrap it with the GLX path or something?