base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / im / image-roll / package.nix
blob2c1e86f22c7cd6630c00663866c589f9e8bf4b9c
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   cargoHash = "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     mainProgram = "image-roll";
44     homepage = "https://github.com/weclaw1/image-roll";
45     license = licenses.mit;
46     maintainers = with maintainers; [ figsoda ];
47   };