From 92962e4888259ab71de5b8b139a8bfdb616fa37b Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Tue, 16 Jun 2026 10:48:53 +0200 Subject: [PATCH] macshot: init at 4.1.2 --- pkgs/by-name/ma/macshot/package.nix | 51 +++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 pkgs/by-name/ma/macshot/package.nix diff --git a/pkgs/by-name/ma/macshot/package.nix b/pkgs/by-name/ma/macshot/package.nix new file mode 100644 index 000000000000..30bd9961fa42 --- /dev/null +++ b/pkgs/by-name/ma/macshot/package.nix @@ -0,0 +1,51 @@ +{ + lib, + stdenvNoCC, + fetchurl, + undmg, + nix-update-script, +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "macshot"; + version = "4.1.2"; + + __structuredAttrs = true; + strictDeps = true; + + src = fetchurl { + url = "https://github.com/sw33tLie/macshot/releases/download/v${finalAttrs.version}/MacShot.dmg"; + hash = "sha256-5o8l6MvGs58zSPKaR4RQZ2UgWsqcQRaRUsd8cS62VVg="; + }; + + sourceRoot = "."; + + nativeBuildInputs = [ + undmg + ]; + + installPhase = '' + runHook preInstall + + mkdir -p "$out/Applications" + cp -R macshot.app "$out/Applications/" + + mkdir -p "$out/bin" + ln -s "$out/Applications/macshot.app/Contents/MacOS/macshot" "$out/bin/macshot" + + runHook postInstall + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Feature-packed native macOS screenshot & recording tool"; + homepage = "https://github.com/sw33tLie/macshot"; + changelog = "https://github.com/sw33tLie/macshot/blob/v${finalAttrs.version}/CHANGELOG.md"; + license = lib.licenses.gpl3Only; + sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; + maintainers = with lib.maintainers; [ GaetanLepage ]; + mainProgram = "macshot"; + platforms = lib.platforms.darwin; + }; +})