2022-10-21 18:38:19 +00:00
|
|
|
{ lib, stdenv, fetchFromSourcehut, fetchpatch, pixman, libpng, libjpeg, meson, ninja, wayland, pkg-config, scdoc, wayland-protocols }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "grim";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "1.4.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
src = fetchFromSourcehut {
|
|
|
|
owner = "~emersion";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "sha256-lwJn1Lysv1qLauqmrduUlzdoKUrUM5uBjv+dWSsrM6w=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
mesonFlags = [
|
|
|
|
"-Dwerror=false"
|
|
|
|
];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# Fixes build on 32bit platforms. Patch is upstream, but unreleased
|
|
|
|
(fetchpatch {
|
|
|
|
name = "grim-fix-32bit-printf.patch";
|
|
|
|
url = "https://git.sr.ht/~emersion/grim/commit/89e02e663fabc534b7e7039514f60a8c5d70070d.patch";
|
|
|
|
sha256 = "1gwb060v3q856p84y0mqqpkqmgb9jwn70y4mzv35y4b9xld8inci";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
scdoc
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2022-02-10 20:34:41 +00:00
|
|
|
pixman
|
|
|
|
libpng
|
2020-04-24 23:36:52 +00:00
|
|
|
libjpeg
|
|
|
|
wayland
|
|
|
|
wayland-protocols
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Grab images from a Wayland compositor";
|
|
|
|
homepage = "https://github.com/emersion/grim";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ buffet ];
|
|
|
|
};
|
|
|
|
}
|