2021-01-19 06:50:56 +00:00
|
|
|
{ stdenv, fetchurl, pkg-config, glib, gtk2, dbus-glib }:
|
2013-02-09 17:38:26 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-04-25 06:46:07 +00:00
|
|
|
pname = "libunique";
|
|
|
|
version = "1.1.6";
|
|
|
|
|
2013-02-09 17:38:26 +00:00
|
|
|
src = fetchurl {
|
2019-04-25 06:46:07 +00:00
|
|
|
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.bz2";
|
2013-02-09 17:38:26 +00:00
|
|
|
sha256 = "1fsgvmncd9caw552lyfg8swmsd6bh4ijjsph69bwacwfxwf09j75";
|
|
|
|
};
|
|
|
|
|
2019-09-14 20:45:31 +00:00
|
|
|
# glib-2.62 deprecations
|
2019-10-30 00:40:49 +00:00
|
|
|
NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS";
|
2018-09-12 11:29:52 +00:00
|
|
|
|
2019-04-25 06:46:07 +00:00
|
|
|
# Patches from Gentoo portage
|
2013-02-09 17:38:26 +00:00
|
|
|
patches = [
|
|
|
|
./1.1.6-compiler-warnings.patch
|
|
|
|
./1.1.6-fix-test.patch
|
|
|
|
./1.1.6-G_CONST_RETURN.patch
|
|
|
|
./1.1.6-include-terminator.patch
|
2019-04-25 06:46:07 +00:00
|
|
|
] ++ [ ./gcc7-bug.patch ];
|
2013-02-09 17:38:26 +00:00
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2018-02-25 02:23:58 +00:00
|
|
|
buildInputs = [ glib gtk2 dbus-glib ];
|
2013-02-09 17:38:26 +00:00
|
|
|
|
2019-04-25 06:46:07 +00:00
|
|
|
# Don't make deprecated usages hard errors
|
2013-02-09 17:38:26 +00:00
|
|
|
preBuild = ''substituteInPlace unique/dbus/Makefile --replace -Werror ""'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
meta = {
|
2019-05-04 13:59:55 +00:00
|
|
|
homepage = "https://wiki.gnome.org/Attic/LibUnique";
|
2013-02-09 17:38:26 +00:00
|
|
|
description = "A library for writing single instance applications";
|
2014-06-19 04:19:00 +00:00
|
|
|
license = stdenv.lib.licenses.lgpl21;
|
2020-04-02 00:47:55 +00:00
|
|
|
platforms = with stdenv.lib.platforms; linux ++ darwin;
|
2013-02-09 17:38:26 +00:00
|
|
|
};
|
|
|
|
}
|