2019-08-17 04:56:44 +02:00
|
|
|
{ stdenv, fetchgit, pkgconfig, xfce4-dev-tools, hicolor-icon-theme, wrapGAppsHook }:
|
2017-12-17 16:02:52 +01:00
|
|
|
|
2018-07-21 23:00:53 +02:00
|
|
|
{ category, pname, version, rev ? "${pname}-${version}", sha256, ... } @ args:
|
2017-12-17 16:02:52 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
inherit (builtins) filter getAttr head isList;
|
|
|
|
inherit (stdenv.lib) attrNames concatLists recursiveUpdate zipAttrsWithNames;
|
|
|
|
|
|
|
|
filterAttrNames = f: attrs:
|
|
|
|
filter (n: f (getAttr n attrs)) (attrNames attrs);
|
|
|
|
|
|
|
|
concatAttrLists = attrsets:
|
|
|
|
zipAttrsWithNames (filterAttrNames isList (head attrsets)) (_: concatLists) attrsets;
|
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
template = {
|
2017-12-17 16:02:52 +01:00
|
|
|
name = "${pname}-${version}";
|
|
|
|
|
2019-08-17 04:56:44 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig xfce4-dev-tools wrapGAppsHook ];
|
2018-07-21 23:07:49 +02:00
|
|
|
buildInputs = [ hicolor-icon-theme ];
|
2017-12-17 16:02:52 +01:00
|
|
|
configureFlags = [ "--enable-maintainer-mode" ];
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "git://git.xfce.org/${category}/${pname}";
|
2018-07-21 23:00:53 +02:00
|
|
|
inherit rev sha256;
|
2017-12-17 16:02:52 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = "https://git.xfce.org/${category}/${pname}/about";
|
|
|
|
license = licenses.gpl2; # some libraries are under LGPLv2+
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
publicArgs = removeAttrs args [ "category" "pname" "sha256" ];
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation (recursiveUpdate template publicArgs // concatAttrLists [ template args ])
|