2020-12-27 13:34:29 +00:00
|
|
|
{ stdenv, fetchFromGitLab, pkgconfig, xfce4-dev-tools, hicolor-icon-theme, xfce, wrapGAppsHook }:
|
2020-04-13 22:12:16 +01:00
|
|
|
|
|
|
|
{ category
|
|
|
|
, pname
|
|
|
|
, version
|
|
|
|
, attrPath ? "xfce.${pname}"
|
|
|
|
, rev-prefix ? "${pname}-"
|
|
|
|
, rev ? "${rev-prefix}${version}"
|
|
|
|
, sha256
|
|
|
|
, odd-unstable ? true
|
|
|
|
, patchlevel-unstable ? true
|
|
|
|
, ...
|
|
|
|
} @ args:
|
2017-12-17 15:02:52 +00: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;
|
|
|
|
|
2020-04-13 22:12:16 +01:00
|
|
|
template = rec {
|
2020-12-27 20:28:16 +00:00
|
|
|
inherit pname version;
|
2017-12-17 15:02:52 +00:00
|
|
|
|
2019-08-17 03:56:44 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig xfce4-dev-tools wrapGAppsHook ];
|
2018-07-21 22:07:49 +01:00
|
|
|
buildInputs = [ hicolor-icon-theme ];
|
2017-12-17 15:02:52 +00:00
|
|
|
configureFlags = [ "--enable-maintainer-mode" ];
|
|
|
|
|
2020-12-27 13:34:29 +00:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.xfce.org";
|
|
|
|
owner = category;
|
|
|
|
repo = pname;
|
2018-07-21 22:00:53 +01:00
|
|
|
inherit rev sha256;
|
2017-12-17 15:02:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2020-04-05 02:53:24 +01:00
|
|
|
pos = builtins.unsafeGetAttrPos "pname" args;
|
|
|
|
|
2020-04-13 22:12:16 +01:00
|
|
|
passthru.updateScript = xfce.updateScript {
|
|
|
|
inherit pname version attrPath rev-prefix odd-unstable patchlevel-unstable;
|
2020-12-27 13:34:29 +00:00
|
|
|
versionLister = xfce.gitLister src.meta.homepage;
|
2020-04-13 22:12:16 +01:00
|
|
|
};
|
|
|
|
|
2017-12-17 15:02:52 +00:00
|
|
|
meta = with stdenv.lib; {
|
2020-12-27 13:34:29 +00:00
|
|
|
homepage = "https://gitlab.xfce.org/${category}/${pname}/about";
|
2017-12-17 15:02:52 +00:00
|
|
|
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 ])
|