2022-10-06 18:32:54 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
2023-08-04 22:07:22 +00:00
|
|
|
, stdenv
|
|
|
|
, darwin
|
2022-10-06 18:32:54 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "artem";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "2.0.6";
|
2022-10-06 18:32:54 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "finefindus";
|
2023-10-09 19:29:22 +00:00
|
|
|
repo = "artem";
|
2022-10-06 18:32:54 +00:00
|
|
|
rev = "v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-iio0MJG0qVndhQvF2zgZ6Jw0za6bBQYFmtk1Mbxpq1E=";
|
2022-10-06 18:32:54 +00:00
|
|
|
};
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
cargoHash = "sha256-47HNoAA1qr39qQqfq+qZoCFyjKHu5pnRKC2QzA60K3k=";
|
2022-10-06 18:32:54 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
];
|
2022-10-06 18:32:54 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.Security
|
|
|
|
];
|
2022-10-06 18:32:54 +00:00
|
|
|
|
|
|
|
checkFlags = [
|
|
|
|
# require internet access
|
|
|
|
"--skip=arguments::input::url_input"
|
|
|
|
"--skip=full_file_compare_url"
|
|
|
|
|
|
|
|
# flaky
|
|
|
|
"--skip=full_file_compare_html"
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installManPage $releaseDir/build/artem-*/out/artem.1
|
|
|
|
installShellCompletion $releaseDir/build/artem-*/out/artem.{bash,fish} \
|
|
|
|
--zsh $releaseDir/build/artem-*/out/_artem
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A small CLI program to convert images to ASCII art";
|
|
|
|
homepage = "https://github.com/finefindus/artem";
|
|
|
|
changelog = "https://github.com/finefindus/artem/blob/v${version}/CHANGELOG.md";
|
|
|
|
license = licenses.mpl20;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "artem";
|
2022-10-06 18:32:54 +00:00
|
|
|
};
|
|
|
|
}
|