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