Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchurl, pkg-config, 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}/${lib.versions.majorMinor version}/${pname}-${version}.tar.bz2"; 9 sha256 = "1fsgvmncd9caw552lyfg8swmsd6bh4ijjsph69bwacwfxwf09j75"; 10 }; 11 12 # Don't make deprecated usages hard errors 13 prePatch = '' 14 substituteInPlace configure --replace "-Werror" ""; 15 ''; 16 17 # glib-2.62 deprecations 18 env.NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS"; 19 20 # Patches from Gentoo portage 21 patches = [ 22 ./1.1.6-compiler-warnings.patch 23 ./1.1.6-fix-test.patch 24 ./1.1.6-G_CONST_RETURN.patch 25 ./1.1.6-include-terminator.patch 26 ] ++ [ ./gcc7-bug.patch ]; 27 28 nativeBuildInputs = [ pkg-config ]; 29 buildInputs = [ glib gtk2 dbus-glib ]; 30 31 doCheck = true; 32 33 meta = { 34 homepage = "https://wiki.gnome.org/Attic/LibUnique"; 35 description = "A library for writing single instance applications"; 36 license = lib.licenses.lgpl21; 37 platforms = with lib.platforms; linux ++ darwin; 38 }; 39}