2021-09-09 23:10:15 +02:00
|
|
|
{ fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, lib
|
|
|
|
, pkg-config
|
|
|
|
, rustPlatform
|
|
|
|
, stdenv
|
|
|
|
, libX11
|
|
|
|
, libXrandr
|
2021-11-17 03:05:36 +01:00
|
|
|
, AppKit
|
2021-09-09 23:10:15 +02:00
|
|
|
, withSki ? true
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "menyoki";
|
2022-03-08 14:36:46 +01:00
|
|
|
version = "1.6.0";
|
2021-09-09 23:10:15 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "orhun";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-03-08 14:36:46 +01:00
|
|
|
sha256 = "sha256-7dqV18+Q0M1PrSXfMro5bUqSeA72Stj5JfP4MsTlrjM=";
|
2021-09-09 23:10:15 +02:00
|
|
|
};
|
|
|
|
|
2022-03-08 14:36:46 +01:00
|
|
|
cargoSha256 = "sha256-c3VpHr/X2tKh7mY4dOQac0lS7oem0GGqjzv7feNwc24=";
|
2021-09-09 23:10:15 +02:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ]
|
|
|
|
++ lib.optional stdenv.isLinux pkg-config;
|
|
|
|
|
2021-11-17 03:05:36 +01:00
|
|
|
buildInputs = lib.optionals stdenv.isLinux [ libX11 libXrandr ]
|
|
|
|
++ lib.optional stdenv.isDarwin AppKit;
|
2021-09-09 23:10:15 +02:00
|
|
|
|
2021-11-16 14:35:09 +01:00
|
|
|
buildNoDefaultFeatures = !withSki;
|
2021-09-09 23:10:15 +02: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-10-23 03:26:15 +02:00
|
|
|
changelog = "https://github.com/orhun/menyoki/blob/v${version}/CHANGELOG.md";
|
2021-09-09 23:10:15 +02:00
|
|
|
license = licenses.gpl3Only;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|