Merge pull request #161288 from wlcx/pngpaste-0.2.3

This commit is contained in:
Sandro 2022-08-11 23:47:54 +02:00 committed by GitHub
commit 56ad3d56c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 47 additions and 0 deletions

View File

@ -11468,6 +11468,12 @@
githubId = 107703;
name = "Samuel Rivas";
};
samw = {
email = "sam@wlcx.cc";
github = "wlcx";
githubId = 3065381;
name = "Sam Willcocks";
};
samyak = {
name = "Samyak Sarnayak";
email = "samyak201@gmail.com";

View File

@ -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 ];
};
}

View File

@ -9829,6 +9829,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++ { };