2021-09-18 10:52:07 +00:00
|
|
|
{ fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, lib
|
|
|
|
, pkg-config
|
|
|
|
, rustPlatform
|
|
|
|
, stdenv
|
2022-08-12 12:06:08 +00:00
|
|
|
, withSixel ? false
|
|
|
|
, libsixel
|
2021-09-18 10:52:07 +00:00
|
|
|
, libX11
|
|
|
|
, libXrandr
|
2021-12-06 16:07:01 +00:00
|
|
|
, AppKit
|
2021-09-18 10:52:07 +00:00
|
|
|
, withSki ? true
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "menyoki";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "1.6.1";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "orhun";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-z0OpRnjVfU6vcyZsxkdD2x3l+a9GkDHZcFveGunDYww=";
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
cargoSha256 = "sha256-uSoyfgPlsHeUwnTHE49ErrlB65wcfl5dxn/YrW5EKZw=";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ]
|
|
|
|
++ lib.optional stdenv.isLinux pkg-config;
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
buildInputs = lib.optional withSixel libsixel
|
|
|
|
++ lib.optionals stdenv.isLinux [ libX11 libXrandr ]
|
2021-12-06 16:07:01 +00:00
|
|
|
++ lib.optional stdenv.isDarwin AppKit;
|
2021-09-18 10:52:07 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
buildNoDefaultFeatures = !withSki;
|
2022-08-12 12:06:08 +00:00
|
|
|
buildFeatures = lib.optional withSixel "sixel";
|
|
|
|
|
|
|
|
checkFlags = [
|
|
|
|
# sometimes fails on lower end machines
|
|
|
|
"--skip=record::fps::tests::test_fps"
|
|
|
|
];
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installManPage man/*
|
|
|
|
installShellCompletion completions/menyoki.{bash,fish,zsh}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Screen{shot,cast} and perform ImageOps on the command line";
|
|
|
|
homepage = "https://menyoki.cli.rs/";
|
2021-12-06 16:07:01 +00:00
|
|
|
changelog = "https://github.com/orhun/menyoki/blob/v${version}/CHANGELOG.md";
|
2021-09-18 10:52:07 +00:00
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|