From 3f6fb6814c8af7aa4d46fe40548de500cebb1462 Mon Sep 17 00:00:00 2001 From: Tom van Dijk <18gatenmaker6@gmail.com> Date: Mon, 28 Apr 2025 12:59:08 +0200 Subject: [PATCH] slint-viewer: init at 1.11.0 --- pkgs/by-name/sl/slint-viewer/package.nix | 45 ++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 pkgs/by-name/sl/slint-viewer/package.nix diff --git a/pkgs/by-name/sl/slint-viewer/package.nix b/pkgs/by-name/sl/slint-viewer/package.nix new file mode 100644 index 000000000000..76165cd5e43c --- /dev/null +++ b/pkgs/by-name/sl/slint-viewer/package.nix @@ -0,0 +1,45 @@ +{ + lib, + rustPlatform, + fetchCrate, + qt6, + libGL, + nix-update-script, + versionCheckHook, +}: +rustPlatform.buildRustPackage (finalAttrs: { + pname = "slint-viewer"; + version = "1.11.0"; + + src = fetchCrate { + inherit (finalAttrs) pname version; + hash = "sha256-Yez8GbER6ylkozQP5oQ0m0u+x/T5qQVPRt0S/NRFT60="; + }; + + useFetchCargoVendor = true; + cargoHash = "sha256-vWTj6cJgvg10NaLw9WfHXmiG8hg7mUIH/Gj3JVvWCuA="; + + buildInputs = [ + qt6.qtbase + qt6.qtsvg + libGL + ]; + + nativeBuildInputs = [ qt6.wrapQtAppsHook ]; + + # There are no tests + doCheck = false; + doInstallCheck = true; + nativeInstallCheckInputs = [ versionCheckHook ]; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Viewer for .slint files from the Slint Project"; + mainProgram = "slint-viewer"; + homepage = "https://crates.io/crates/slint-viewer"; + license = lib.licenses.gpl3Only; + platforms = lib.platforms.linux ++ lib.platforms.darwin; + maintainers = with lib.maintainers; [ dtomvan ]; + }; +})