diff options
| author | Sam Willcocks <sam@wlcx.cc> | 2022-02-21 22:30:39 +0000 |
|---|---|---|
| committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2022-08-28 12:49:57 +0000 |
| commit | 2cabcacc41f7c7b911e403aa6e0c4d1c1dbe4744 (patch) | |
| tree | f9842f54590d4b7f53801f366baa034b0ea4a7cc | |
| parent | maintainers: add samw (diff) | |
| download | nixpkgs-origin/backport-161288-to-release-22.05.tar.gz | |
pngpaste: init at 0.2.3origin/backport-161288-to-release-22.05
(cherry picked from commit cbe518b29381638d07ac72c321a2ae1b328d8bfe)
| -rw-r--r-- | pkgs/os-specific/darwin/pngpaste/default.nix | 37 | ||||
| -rw-r--r-- | pkgs/top-level/all-packages.nix | 4 |
2 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/os-specific/darwin/pngpaste/default.nix b/pkgs/os-specific/darwin/pngpaste/default.nix new file mode 100644 index 000000000000..99ae8048f7fd --- /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 61787449d62d..6c2d80ffbd0a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9458,6 +9458,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++ { }; |
