Unverified Commit 22d90772 authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

slint-viewer: init at 1.10.0 (#394944)

parents 25e832c7 dc2a5216
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -6634,6 +6634,13 @@
    github = "dsymbol";
    githubId = 88138099;
  };
  dtomvan = {
    email = "18gatenmaker6@gmail.com";
    github = "dtomvan";
    githubId = 51440893;
    name = "Tom van Dijk";
    keys = [ { fingerprint = "D044 F07B 8863 B681 26BD  79FE 7A98 4C82 07AD BA51"; } ];
  };
  dtzWill = {
    email = "w@wdtz.org";
    github = "dtzWill";
+52 −0
Original line number Diff line number Diff line
{
  lib,
  rustPlatform,
  fetchCrate,
  kdePackages,
  libGL,
  nix-update-script,
  versionCheckHook,
  withQt6Support ? true,
}:

rustPlatform.buildRustPackage (finalAttrs: {
  pname = "slint-viewer";
  version = "1.10.0";

  src = fetchCrate {
    inherit (finalAttrs) pname version;
    hash = "sha256-i6JB/bc8lQE9K9Jy1mUz2I/LKIoEtc/dgJzsQTcEXeQ=";
  };

  useFetchCargoVendor = true;
  cargoHash = "sha256-fXREHHPR2CZtyvvOdL5wKnkmT1q9Xj+ik2lR/52ApLI=";

  CXXFLAGS = lib.optionals withQt6Support [
    "-I ${lib.getDev libGL}/include"
  ];

  nativeBuildInputs = lib.optionals withQt6Support (
    with kdePackages;
    [
      qtbase
      qtsvg
      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://github.com/slint-ui/slint/tree/master/tools/viewer";
    license = lib.licenses.gpl3Only;
    platforms = lib.platforms.linux ++ lib.platforms.darwin;
    maintainers = with lib.maintainers; [ dtomvan ];
  };
})