1{ stdenv, fetchurl, pkgconfig, glib, gtk2, dbus-glib }:
2
3stdenv.mkDerivation rec {
4 name = "libunique-1.1.6";
5 src = fetchurl {
6 url = "mirror://gnome/sources/libunique/1.1/${name}.tar.bz2";
7 sha256 = "1fsgvmncd9caw552lyfg8swmsd6bh4ijjsph69bwacwfxwf09j75";
8 };
9
10 # patches from Gentoo portage
11 patches = [
12 ./1.1.6-compiler-warnings.patch
13 ./1.1.6-fix-test.patch
14 ./1.1.6-G_CONST_RETURN.patch
15 ./1.1.6-include-terminator.patch
16 ]
17 ++ [ ./gcc7-bug.patch ];
18
19 nativeBuildInputs = [ pkgconfig ];
20 buildInputs = [ glib gtk2 dbus-glib ];
21
22 # don't make deprecated usages hard errors
23 preBuild = ''substituteInPlace unique/dbus/Makefile --replace -Werror ""'';
24
25 doCheck = true;
26
27 meta = {
28 homepage = https://wiki.gnome.org/Attic/LibUnique;
29 description = "A library for writing single instance applications";
30 license = stdenv.lib.licenses.lgpl21;
31 platforms = stdenv.lib.platforms.linux;
32 };
33}