nixpkgs/pkgs/tools/misc/clipboard-jh/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

67 lines
1.3 KiB
Nix
Raw Normal View History

2022-12-27 08:43:29 +01:00
{ lib
, stdenv
, fetchFromGitHub
, cmake
, libffi
, pkg-config
, wayland-protocols
, wayland
, xorg
2023-04-10 23:47:18 +02:00
, darwin
2023-06-12 01:24:40 +02:00
, nix-update-script
2023-07-28 16:07:59 +02:00
, alsa-lib
2022-12-27 08:43:29 +01:00
}:
stdenv.mkDerivation rec {
pname = "clipboard-jh";
2023-12-27 12:14:10 +01:00
version = "0.9.0.1";
2022-12-27 08:43:29 +01:00
src = fetchFromGitHub {
owner = "Slackadays";
repo = "clipboard";
rev = version;
2023-12-27 12:14:10 +01:00
hash = "sha256-iILtyURYCshicgAV3MWkgMQsXHe7Unj1A08W7tUMU2o=";
2022-12-27 08:43:29 +01:00
};
2023-04-10 23:47:18 +02:00
postPatch = ''
sed -i "/CMAKE_OSX_ARCHITECTURES/d" CMakeLists.txt
'';
2022-12-27 08:43:29 +01:00
nativeBuildInputs = [
cmake
pkg-config
];
2023-05-05 15:49:29 +02:00
buildInputs = lib.optionals stdenv.isLinux [
2022-12-27 08:43:29 +01:00
libffi
wayland-protocols
wayland
xorg.libX11
2023-07-28 16:07:59 +02:00
alsa-lib
2023-04-10 23:47:18 +02:00
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.AppKit
2022-12-27 08:43:29 +01:00
];
cmakeBuildType = "MinSizeRel";
2022-12-27 08:43:29 +01:00
cmakeFlags = [
"-Wno-dev"
"-DINSTALL_PREFIX=${placeholder "out"}"
];
postFixup = lib.optionalString stdenv.isLinux ''
patchelf $out/bin/cb --add-rpath $out/lib
'';
2023-06-12 01:24:40 +02:00
passthru.updateScript = nix-update-script { };
2022-12-27 08:43:29 +01:00
meta = with lib; {
description = "Cut, copy, and paste anything, anywhere, all from the terminal";
homepage = "https://github.com/Slackadays/clipboard";
license = licenses.gpl3Only;
maintainers = with maintainers; [ dit7ya ];
2023-05-05 15:49:29 +02:00
platforms = platforms.all;
2023-05-05 14:05:07 +02:00
mainProgram = "cb";
2022-12-27 08:43:29 +01:00
};
}