From cbe518b29381638d07ac72c321a2ae1b328d8bfe Mon Sep 17 00:00:00 2001 From: Sam Willcocks Date: Mon, 21 Feb 2022 22:30:39 +0000 Subject: pngpaste: init at 0.2.3 --- pkgs/os-specific/darwin/pngpaste/default.nix | 37 ++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 +++ 2 files changed, 41 insertions(+) create mode 100644 pkgs/os-specific/darwin/pngpaste/default.nix (limited to 'pkgs') diff --git a/pkgs/os-specific/darwin/pngpaste/default.nix b/pkgs/os-specific/darwin/pngpaste/default.nix new file mode 100644 index 0000000000000..99ae8048f7fde --- /dev/null +++ b/pkgs/os-specific/darwin/pngpaste/default.nix @@ -0,0 +1,37 @@ +{ lib, stdenv, fetchFromGitHub, AppKit, Cocoa }: + +let + pname = "pngpaste"; + version = "0.2.3"; +in stdenv.mkDerivation { + inherit pname version; + src = fetchFromGitHub { + owner = "jcsalterego"; + repo = pname; + rev = version; + sha256 = "uvajxSelk1Wfd5is5kmT2fzDShlufBgC0PDCeabEOSE="; + }; + + buildInputs = [ AppKit Cocoa ]; + + installPhase = '' + mkdir -p $out/bin + cp pngpaste $out/bin + ''; + + meta = with lib; { + description = "Paste image files from clipboard to file on MacOS"; + longDescription = '' + Paste PNG into files on MacOS, much like pbpaste does for text. + Supported input formats are PNG, PDF, GIF, TIF, JPEG. + Supported output formats are PNG, GIF, JPEG, TIFF. Output + formats are determined by the provided filename extension, + falling back to PNG. + ''; + homepage = "https://github.com/jcsalterego/pngpaste"; + changelog = "https://github.com/jcsalterego/pngpaste/raw/${version}/CHANGELOG.md"; + platforms = platforms.darwin; + license = licenses.bsd2; + maintainers = with maintainers; [ samw ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 76e76202d6ee4..5a63a7f0699ed 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9806,6 +9806,10 @@ with pkgs; libpng = libpng12; }; + pngpaste = callPackage ../os-specific/darwin/pngpaste { + inherit (darwin.apple_sdk.frameworks) AppKit Cocoa; + }; + pngtools = callPackage ../tools/graphics/pngtools { }; pngpp = callPackage ../development/libraries/png++ { }; -- cgit 1.4.1