From 66231b510861c8753d0c98e6037572ce49955270 Mon Sep 17 00:00:00 2001 From: aspauldingcode Date: Sat, 8 Mar 2025 15:33:50 -0700 Subject: [PATCH] macos-instantview: init macos-instantview: update sourceProvenance description, versioning compliance self -> finalAttrs --- pkgs/by-name/ma/macos-instantview/package.nix | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 pkgs/by-name/ma/macos-instantview/package.nix diff --git a/pkgs/by-name/ma/macos-instantview/package.nix b/pkgs/by-name/ma/macos-instantview/package.nix new file mode 100644 index 000000000000..94a8178cb23c --- /dev/null +++ b/pkgs/by-name/ma/macos-instantview/package.nix @@ -0,0 +1,44 @@ +{ + stdenvNoCC, + fetchurl, + lib, + _7zz, +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "instantview"; + version = "3.22R0002"; + + src = fetchurl { + url = "https://www.siliconmotion.com/downloads/macOS_InstantView_V${finalAttrs.version}.dmg"; + hash = "sha256-PdgX9zCrVYtNbuOCYKVo9cegCG/VY7QXetivVsUltbg="; + }; + + nativeBuildInputs = [ _7zz ]; + + dontUnpack = true; + dontConfigure = true; + dontBuild = true; + + installPhase = '' + runHook preInstall + mkdir -p "$out/Applications" + + # Extract the DMG using 7zip + 7zz x "$src" -oextracted -y + + # Move the extracted contents to $out + cp -r extracted/* "$out/Applications/" + + runHook postInstall + ''; + + meta = { + platforms = lib.platforms.darwin; + description = "USB Docking Station plugin-and-display support with SM76x driver"; + homepage = "https://www.siliconmotion.com/events/instantview/"; + license = lib.licenses.unfree; + sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; + maintainers = with lib.maintainers; [ aspauldingcode ]; + }; +})