Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / applications / graphics / image-roll / default.nix
blob461a07837d83bddc2372ecb032837434991d6459
1 { lib
2 , rustPlatform
3 , fetchFromGitHub
4 , glib
5 , pkg-config
6 , wrapGAppsHook4
7 , gtk4
8 }:
10 rustPlatform.buildRustPackage rec {
11   pname = "image-roll";
12   version = "2.1.0";
14   src = fetchFromGitHub {
15     owner = "weclaw1";
16     repo = pname;
17     rev = version;
18     sha256 = "sha256-CC40TU38bJFnbJl2EHqeB9RBvbVUrBmRdZVS2GxqGu4=";
19   };
21   cargoSha256 = "sha256-cUE2IZOunR/NIo/qytORRfNqCsf87LfpKA8o/v4Nkhk=";
23   nativeBuildInputs = [ glib pkg-config wrapGAppsHook4 ];
25   buildInputs = [ gtk4 ];
27   checkFlags = [
28     # fails in the sandbox
29     "--skip=file_list::tests"
31     # sometimes fails on darwin
32     "--skip=image_list::tests::save_current_image_overwrites_image_at_current_image_path_when_filename_is_set_to_none"
33   ];
35   postInstall = ''
36     install -Dm444 src/resources/com.github.weclaw1.ImageRoll.desktop -t $out/share/applications/
37     install -Dm444 src/resources/com.github.weclaw1.ImageRoll.svg -t $out/share/icons/hicolor/scalable/apps/
38     install -Dm444 src/resources/com.github.weclaw1.ImageRoll.metainfo.xml -t $out/share/metainfo/
39   '';
41   meta = with lib; {
42     description = "Simple and fast GTK image viewer with basic image manipulation tools";
43     homepage = "https://github.com/weclaw1/image-roll";
44     license = licenses.mit;
45     maintainers = with maintainers; [ figsoda ];
46   };