2024-02-07 01:22:34 +00:00
|
|
|
{ lib
|
|
|
|
, blueprint-compiler
|
|
|
|
, cargo
|
2024-04-21 15:54:59 +00:00
|
|
|
, darwin
|
2024-02-07 01:22:34 +00:00
|
|
|
, desktop-file-utils
|
|
|
|
, fetchFromGitLab
|
|
|
|
, glib
|
|
|
|
, gtk4
|
|
|
|
, libadwaita
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
|
|
|
, rustPlatform
|
|
|
|
, rustc
|
|
|
|
, stdenv
|
|
|
|
, wrapGAppsHook4
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "switcheroo";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "2.2.0";
|
2024-02-07 01:22:34 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "adhami3310";
|
|
|
|
repo = "Switcheroo";
|
|
|
|
rev = "v${finalAttrs.version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-AwecOA8HWGimhQyCEG3Z3hhwa9RVWssykUXsdvqqs9U=";
|
2024-02-07 01:22:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
|
|
src = finalAttrs.src;
|
|
|
|
name = "switcheroo-${finalAttrs.version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-fpI4ue30DhkeWAolyeots+LkaRyaIPhYmIqRmx08i2s=";
|
2024-02-07 01:22:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
blueprint-compiler
|
|
|
|
cargo
|
|
|
|
desktop-file-utils
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
rustPlatform.cargoSetupHook
|
|
|
|
rustc
|
|
|
|
wrapGAppsHook4
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
gtk4
|
|
|
|
libadwaita
|
2024-04-21 15:54:59 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.Foundation
|
2024-02-07 01:22:34 +00:00
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
# Workaround for the gettext-sys issue
|
|
|
|
# https://github.com/Koka/gettext-rs/issues/114
|
|
|
|
env.NIX_CFLAGS_COMPILE = lib.optionalString
|
|
|
|
(
|
|
|
|
stdenv.cc.isClang &&
|
|
|
|
lib.versionAtLeast stdenv.cc.version "16"
|
|
|
|
)
|
|
|
|
"-Wno-error=incompatible-function-pointer-types";
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
meta = with lib; {
|
|
|
|
changelog = "https://gitlab.com/adhami3310/Switcheroo/-/releases/v${finalAttrs.version}";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "App for converting images between different formats";
|
2024-05-15 15:35:15 +00:00
|
|
|
homepage = "https://apps.gnome.org/Converter/";
|
2024-02-07 01:22:34 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
mainProgram = "switcheroo";
|
|
|
|
maintainers = with maintainers; [ michaelgrahamevans ];
|
2024-04-21 15:54:59 +00:00
|
|
|
platforms = platforms.unix;
|
2024-02-07 01:22:34 +00:00
|
|
|
};
|
|
|
|
})
|