@@ -1,44 +1,35 @@
1−{ stdenv, fetchurl, pkgconfig, xorg, pcre, gstreamer, glib, libxml2
2−, aspell, cairo, imlib2, xosd, libnotify, gtk2, pango, atk, enchant,
3− gdk_pixbuf}:
4−
5−let s = import ./src-for-default.nix; in
1+{ stdenv, fetchurl, pkgconfig, intltool, xorg, pcre, gst_all_1, glib
2+, xosd, libnotify, enchant, wrapGAppsHook, gdk_pixbuf }:
63
74stdenv.mkDerivation rec {
8− inherit (s) version name;
5+ name = "xneur-${version}";
6+ version = "0.20.0";
7+
98 src = fetchurl {
10− inherit(s) url;
11− sha256 = s.hash;
9+ url = "https://github.com/AndrewCrewKuznetsov/xneur-devel/raw/f66723feb272c68f7c22a8bf0dbcafa5e3a8a5ee/dists/0.20.0/xneur_0.20.0.orig.tar.gz";
10+ sha256 = "1lg3qpi9pkx9f5xvfc8yf39wwc98f769yb7i2438vqn66kla1xpr";
1211 };
1312
14− buildInputs =
15− [ xorg.libX11 pkgconfig pcre gstreamer glib libxml2 aspell cairo
16− xorg.libXpm imlib2 xosd xorg.libXt xorg.libXext xorg.libXi libnotify
17− gtk2 pango enchant gdk_pixbuf
18− ];
13+ nativeBuildInputs = [
14+ pkgconfig intltool wrapGAppsHook
15+ ];
1916
20− preConfigure = ''
21− sed -e 's/-Werror//' -i configure
22− sed -e 's@for aspell_dir in@for aspell_dir in ${aspell} @' -i configure
23− sed -e 's@for imlib2_dir in@for imlib2_dir in ${imlib2} @' -i configure
24− sed -e 's@for xosd_dir in@for xosd_dir in ${xosd} @' -i configure
17+ buildInputs = [
18+ xorg.libX11 xorg.libXtst pcre gst_all_1.gstreamer glib
19+ xosd xorg.libXext xorg.libXi libnotify
20+ enchant gdk_pixbuf
21+ gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good
22+ ];
2523
26− export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gtk2.dev}/include/gtk-2.0"
27− export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gtk2.out}/lib/gtk-2.0/include"
28− export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${cairo.dev}/include/cairo"
29− export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${pango.dev}/include/pango-1.0"
30− export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${atk.dev}/include/atk-1.0"
31− export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gdk_pixbuf.dev}/include/gdk-pixbuf-2.0"
32− export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${gdk_pixbuf.out}/lib/gdk-pixbuf-2.0/include"
33−
34− export NIX_LDFLAGS="$NIX_LDFLAGS -lnotify"
24+ postPatch = ''
25+ sed -e 's@for xosd_dir in@for xosd_dir in ${xosd} @' -i configure
3526 '';
3627
37− meta = {
28+ meta = with stdenv.lib; {
3829 description = "Utility for switching between keyboard layouts";
3930 homepage = https://xneur.ru;
40− license = stdenv.lib.licenses.gpl2Plus;
41− maintainers = [ stdenv.lib.maintainers.raskin ];
42− platforms = stdenv.lib.platforms.linux;
31+ license = licenses.gpl2Plus;
32+ maintainers = [ maintainers.raskin ];
33+ platforms = platforms.linux;
4334 };
4435}