22 stdenv.mkDerivation (finalAttrs: {
26 src = fetchFromGitLab {
29 rev = "v${finalAttrs.version}";
30 hash = "sha256-AwecOA8HWGimhQyCEG3Z3hhwa9RVWssykUXsdvqqs9U=";
33 cargoDeps = rustPlatform.fetchCargoTarball {
35 name = "switcheroo-${finalAttrs.version}";
36 hash = "sha256-fpI4ue30DhkeWAolyeots+LkaRyaIPhYmIqRmx08i2s=";
46 rustPlatform.cargoSetupHook
57 ++ lib.optionals stdenv.hostPlatform.isDarwin [
58 darwin.apple_sdk.frameworks.Foundation
63 --prefix PATH : "${lib.makeBinPath [ imagemagick ]}"
67 # Workaround for the gettext-sys issue
68 # https://github.com/Koka/gettext-rs/issues/114
69 env.NIX_CFLAGS_COMPILE = lib.optionalString (
70 stdenv.cc.isClang && lib.versionAtLeast stdenv.cc.version "16"
71 ) "-Wno-error=incompatible-function-pointer-types";
74 updateScript = nix-update-script { };
78 changelog = "https://gitlab.com/adhami3310/Switcheroo/-/releases/v${finalAttrs.version}";
79 description = "App for converting images between different formats";
80 homepage = "https://apps.gnome.org/Converter/";
81 license = lib.licenses.gpl3Plus;
82 mainProgram = "switcheroo";
83 maintainers = lib.teams.gnome-circle.members;
84 platforms = lib.platforms.unix;