From 4389ae5208ec9b7e80b3b0e4ee10e2709333519f Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Tue, 26 May 2015 02:45:34 -0700 Subject: [PATCH] libverto: Add derivation --- .../libraries/libverto/default.nix | 41 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 2 files changed, 45 insertions(+) create mode 100644 pkgs/development/libraries/libverto/default.nix diff --git a/pkgs/development/libraries/libverto/default.nix b/pkgs/development/libraries/libverto/default.nix new file mode 100644 index 00000000000..e4097aa57d6 --- /dev/null +++ b/pkgs/development/libraries/libverto/default.nix @@ -0,0 +1,41 @@ +{ stdenv, fetchurl, pkgconfig + +# Optional Dependencies +, glib ? null, libev ? null, libevent ? null, tevent ? null, talloc ? null +}: +with stdenv; +let + optGlib = shouldUsePkg glib; + optLibev = shouldUsePkg libev; + optLibevent = shouldUsePkg libevent; + optTevent = shouldUsePkg tevent; + optTalloc = shouldUsePkg talloc; +in +with stdenv.lib; +stdenv.mkDerivation rec { + name = "libverto-0.2.6"; + + src = fetchurl { + url = "https://fedorahosted.org/releases/l/i/libverto/${name}.tar.gz"; + sha256 = "17hwr55ga0rkm5cnyfiipyrk9n372x892ph9wzi88j2zhnisdv0p"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ optGlib optLibev optLibevent ] + ++ optionals (optTevent != null && optTalloc != null) [ + optTevent optTalloc + ]; + + postInstall = '' + # In v0.2.6 the shipped pkg-config files have an out of order + # declaration of exec_prefix breaking them. This fixes that issue + sed -i 's,''${exec_prefix},''${prefix},g' $out/lib/pkgconfig/*.pc + ''; + + meta = { + homepage = https://fedorahosted.org/libverto/; + license = licenses.mit; + platforms = platforms.all; + maintainers = with maintainers; [ wkennington ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 60cffbbf4d9..1d9ac42ac3a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7170,6 +7170,10 @@ let libvdpau = callPackage ../development/libraries/libvdpau { }; + libverto = callPackage ../development/libraries/libverto { + glib = null; # Don't include fairly heavy dependency + }; + libvirt = callPackage ../development/libraries/libvirt { }; libvirt-glib = callPackage ../development/libraries/libvirt-glib { };