57 lines
1.2 KiB
Nix
57 lines
1.2 KiB
Nix
{ config, lib, pkgs, stdenv, fetchurl, meson, ninja, pkg-config, git, cmake
|
|
, makeDesktopItem, wayland, wayland-protocols, json_c, libxkbcommon, fontconfig
|
|
, giflib, libjpeg, libjxl, libpng, librsvg, libwebp, libheif, libtiff, libexif
|
|
, bash-completion, openexr_3, ... }:
|
|
let
|
|
vals = builtins.fromJSON (builtins.readFile ../../sources/swayimg.json);
|
|
version = vals.version;
|
|
url = vals.url;
|
|
hash = vals.hash;
|
|
in stdenv.mkDerivation rec {
|
|
pname = "swayimg";
|
|
inherit version;
|
|
|
|
src = fetchurl {
|
|
inherit url;
|
|
inherit hash;
|
|
name = "${pname}-${version}.tar.gz";
|
|
};
|
|
|
|
nativeBuildInputs = [ meson ninja pkg-config git cmake ];
|
|
buildInputs = [
|
|
wayland
|
|
wayland-protocols
|
|
json_c
|
|
libxkbcommon
|
|
fontconfig
|
|
giflib
|
|
libjpeg
|
|
libjxl
|
|
libpng
|
|
librsvg
|
|
libwebp
|
|
libheif
|
|
libtiff
|
|
libexif
|
|
bash-completion
|
|
openexr_3
|
|
];
|
|
|
|
desktopItem = makeDesktopItem {
|
|
name = "swayimg-open";
|
|
desktopName = "swayimg";
|
|
exec = "swayimg %u";
|
|
terminal = false;
|
|
mimeTypes = [
|
|
"image/jpeg"
|
|
"image/png"
|
|
"image/gif"
|
|
"image/svg+xml"
|
|
"image/webp"
|
|
"image/avif"
|
|
"image/tiff"
|
|
"image/bmp"
|
|
];
|
|
};
|
|
}
|