pico-sdk: 2.0.0 -> 2.1.0 (#364401)
[NixPkgs.git] / pkgs / by-name / sw / switcheroo / package.nix
blob796a84638ad558f34de4a0742c1b19663ecd2f14
2   lib,
3   blueprint-compiler,
4   cargo,
5   darwin,
6   desktop-file-utils,
7   fetchFromGitLab,
8   glib,
9   gtk4,
10   imagemagick,
11   libadwaita,
12   meson,
13   ninja,
14   nix-update-script,
15   pkg-config,
16   rustPlatform,
17   rustc,
18   stdenv,
19   wrapGAppsHook4,
22 stdenv.mkDerivation (finalAttrs: {
23   pname = "switcheroo";
24   version = "2.2.0";
26   src = fetchFromGitLab {
27     owner = "adhami3310";
28     repo = "Switcheroo";
29     rev = "v${finalAttrs.version}";
30     hash = "sha256-AwecOA8HWGimhQyCEG3Z3hhwa9RVWssykUXsdvqqs9U=";
31   };
33   cargoDeps = rustPlatform.fetchCargoTarball {
34     src = finalAttrs.src;
35     name = "switcheroo-${finalAttrs.version}";
36     hash = "sha256-fpI4ue30DhkeWAolyeots+LkaRyaIPhYmIqRmx08i2s=";
37   };
39   nativeBuildInputs = [
40     blueprint-compiler
41     cargo
42     desktop-file-utils
43     meson
44     ninja
45     pkg-config
46     rustPlatform.cargoSetupHook
47     rustc
48     wrapGAppsHook4
49   ];
51   buildInputs =
52     [
53       glib
54       gtk4
55       libadwaita
56     ]
57     ++ lib.optionals stdenv.hostPlatform.isDarwin [
58       darwin.apple_sdk.frameworks.Foundation
59     ];
61   preFixup = ''
62     gappsWrapperArgs+=(
63       --prefix PATH : "${lib.makeBinPath [ imagemagick ]}"
64     )
65   '';
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";
73   passthru = {
74     updateScript = nix-update-script { };
75   };
77   meta = {
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;
85   };