summaryrefslogtreecommitdiff
path: root/pkgs/pbv/default.nix
blob: c61e02122fd80f5a8b909fb0f8e4458db5c780fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
  lib,
  swiftPackages,
  xcbuild,
  fetchFromGitHub,
}:
swiftPackages.stdenv.mkDerivation {
  pname = "pbv";
  version = "31-08-2020"; # date of commit

  src = fetchFromGitHub {
    owner = "chbrown";
    repo = "macos-pasteboard";
    rev = "6d58ddcff833397b15f4435e661fc31a1ec91321";
    hash = "sha256-6QpvIPy259d7BtA6s2NxS5JqiBPngPwgVgJl509btuY=";
  };

  buildInputs = [
    swiftPackages.swift
    xcbuild
    swiftPackages.apple_sdk.frameworks.Cocoa
  ];

  installPhase = ''
    mkdir -p $out/bin
    make prefix=$out install
  '';

  meta = with lib; {
    description = "Like OS X's built-in pbpaste but more flexible and raw";
    homepage = "https://github.com/chbrown/macos-pasteboard";
    license = licenses.mit;
    platforms = platforms.darwin;
  };
}