2021-10-17 09:34:42 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, glib
|
|
|
|
, pkg-config
|
|
|
|
, wrapGAppsHook
|
2022-08-12 12:06:08 +00:00
|
|
|
, gtk4
|
2021-10-17 09:34:42 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "image-roll";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "2.1.0";
|
2021-10-17 09:34:42 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "weclaw1";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-CC40TU38bJFnbJl2EHqeB9RBvbVUrBmRdZVS2GxqGu4=";
|
2021-10-17 09:34:42 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
cargoSha256 = "sha256-cUE2IZOunR/NIo/qytORRfNqCsf87LfpKA8o/v4Nkhk=";
|
2021-10-17 09:34:42 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ glib pkg-config wrapGAppsHook ];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
buildInputs = [ gtk4 ];
|
|
|
|
|
|
|
|
checkFlags = [
|
|
|
|
# fails in the sandbox
|
|
|
|
"--skip=file_list::tests"
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
# sometimes fails on darwin
|
|
|
|
"image_list::tests::save_current_image_overwrites_image_at_current_image_path_when_filename_is_set_to_none"
|
2022-08-12 12:06:08 +00:00
|
|
|
];
|
2021-10-17 09:34:42 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postInstall = ''
|
|
|
|
install -Dm444 src/resources/com.github.weclaw1.ImageRoll.desktop -t $out/share/applications/
|
|
|
|
install -Dm444 src/resources/com.github.weclaw1.ImageRoll.svg -t $out/share/icons/hicolor/scalable/apps/
|
|
|
|
install -Dm444 src/resources/com.github.weclaw1.ImageRoll.metainfo.xml -t $out/share/metainfo/
|
|
|
|
'';
|
|
|
|
|
2021-10-17 09:34:42 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple and fast GTK image viewer with basic image manipulation tools";
|
|
|
|
homepage = "https://github.com/weclaw1/image-roll";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|