mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 18:33:00 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
49 lines
1.3 KiB
Nix
49 lines
1.3 KiB
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, glib
|
|
, pkg-config
|
|
, wrapGAppsHook4
|
|
, gtk4
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "image-roll";
|
|
version = "2.1.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "weclaw1";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "sha256-CC40TU38bJFnbJl2EHqeB9RBvbVUrBmRdZVS2GxqGu4=";
|
|
};
|
|
|
|
cargoHash = "sha256-cUE2IZOunR/NIo/qytORRfNqCsf87LfpKA8o/v4Nkhk=";
|
|
|
|
nativeBuildInputs = [ glib pkg-config wrapGAppsHook4 ];
|
|
|
|
buildInputs = [ gtk4 ];
|
|
|
|
checkFlags = [
|
|
# fails in the sandbox
|
|
"--skip=file_list::tests"
|
|
|
|
# sometimes fails on darwin
|
|
"--skip=image_list::tests::save_current_image_overwrites_image_at_current_image_path_when_filename_is_set_to_none"
|
|
];
|
|
|
|
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/
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Simple and fast GTK image viewer with basic image manipulation tools";
|
|
mainProgram = "image-roll";
|
|
homepage = "https://github.com/weclaw1/image-roll";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ figsoda ];
|
|
};
|
|
}
|