Hello!
I recently moved to NixOS, and I wanted to make a nix package (that I might try to add it to nixpkgs :)) for an application I made with iced (which uses winit), so I was wondering if anyone have done it before so I can borrow stuff from the package file
currently I have this:
{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, pkgs
}:
rustPlatform.buildRustPackage rec {
pname = "ytdlp-gui";
version = "0.2.5";
src = fetchFromGitHub {
owner = "BKSalman";
repo = "ytdlp-gui";
rev = "v${version}";
sha256 = "sha256-BB2zM0EIPYkv5tMX6TCXVkLoz7HQCXVMOiEEwPJRAB0=";
};
cargoSha256 = "sha256-1jvCcHDfMbVxsNI1iBngx8uEUkENeM7sbzSL0DgpK+o=";
nativeBuildInputs = with pkgs; [
pkg-config
cmake
];
buildInputs = with pkgs; [
# rust-bin.stable.latest.default
fontconfig
vulkan-headers
vulkan-loader
# libxkbcommon
# WINIT_UNIX_BACKEND=wayland
wayland
# WINIT_UNIX_BACKEND=x11
xorg.libXcursor
xorg.libXrandr
xorg.libXi
xorg.libX11
];
meta = with lib; {
description = "A GUI for yt-dlp written in Rust";
homepage = "https://github.com/bksalman/ytdlp-gui/";
license = licenses.gpl3;
maintainers = with maintainers; [ bksalman ];
};
}
but I’m still figuring it out.
with this current package file, I get this error message:
$ RUST_LOG=debug ./result/bin/ytdlp-gui
[2023-03-25T19:17:55Z INFO wgpu_hal::vulkan::instance] Missing Vulkan entry points: LibraryLoadFailure(DlOpen { desc: "libvulkan.so.1: cannot open shared object file: No such file or directory" })
[2023-03-25T19:17:55Z INFO wgpu_hal::gles::egl] Unable to open libEGL: Library(DlOpen { desc: "libEGL.so: cannot open shared object file: No such file or directory" })
[2023-03-25T19:17:55Z INFO iced_wgpu::window::compositor] Settings {
present_mode: AutoVsync,
internal_backend: VULKAN | GL | METAL | DX12 | DX11 | BROWSER_WEBGPU | PRIMARY | SECONDARY,
default_font: None,
default_text_size: 20,
text_multithreading: false,
antialiasing: None,
}
[2023-03-25T19:17:55Z INFO iced_wgpu::window::compositor] Available adapters: []
[2023-03-25T19:17:55Z INFO wgpu_core::hub] Dropping Global
Error: GraphicsCreationFailed(GraphicsAdapterNotFound)