diff options
-rw-r--r-- | home/dev-utils/default.nix | 5 | ||||
-rw-r--r-- | pkgs/default.nix | 2 | ||||
-rw-r--r-- | pkgs/pbv/default.nix | 34 |
3 files changed, 40 insertions, 1 deletions
diff --git a/home/dev-utils/default.nix b/home/dev-utils/default.nix index 67bf017..7239c28 100644 --- a/home/dev-utils/default.nix +++ b/home/dev-utils/default.nix @@ -33,7 +33,10 @@ clojure leiningen ] - ++ lib.optional pkgs.stdenv.isDarwin trash; + ++ lib.optionals pkgs.stdenv.isDarwin [ + pbv + trash + ]; # Add system manual pages to the search path on Darwin. home.sessionVariables.MANPATH = lib.optionalString pkgs.stdenv.isDarwin "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man:/Applications/Xcode.app/Contents/Developer/usr/share/man:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man:$MANPATH"; diff --git a/pkgs/default.nix b/pkgs/default.nix index 0a7fac8..d0efcc3 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -15,6 +15,8 @@ pkgs: { # from the repo where they spellcheck LaTex files. yalafi-shell = pkgs.callPackage ./yalafi-shell {}; + pbv = pkgs.callPackage ./pbv {}; + # TODO: These should be contained in the 'vimPlugins' attrset. This turns out # to be non-trivial because this module is both consumed in a flake output # context and an overlay context. diff --git a/pkgs/pbv/default.nix b/pkgs/pbv/default.nix new file mode 100644 index 0000000..7b642af --- /dev/null +++ b/pkgs/pbv/default.nix @@ -0,0 +1,34 @@ +{ + lib, + swiftPackages, + 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 + swiftPackages.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; + }; +} |