2024-04-26 20:24:03 +00:00
|
|
|
{ lib, stdenv, fetchFromGitLab, pkg-config, xfce4-dev-tools, hicolor-icon-theme, xfce, wrapGAppsHook3, gitUpdater }:
|
2020-04-13 21:12:16 +00:00
|
|
|
|
|
|
|
{ category
|
|
|
|
, pname
|
|
|
|
, version
|
|
|
|
, attrPath ? "xfce.${pname}"
|
|
|
|
, rev-prefix ? "${pname}-"
|
|
|
|
, rev ? "${rev-prefix}${version}"
|
|
|
|
, sha256
|
|
|
|
, odd-unstable ? true
|
|
|
|
, patchlevel-unstable ? true
|
2023-11-28 15:54:43 +00:00
|
|
|
, passthru ? { }
|
|
|
|
, meta ? { }
|
2020-04-13 21:12:16 +00:00
|
|
|
, ...
|
|
|
|
} @ args:
|
2017-12-17 15:02:52 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
inherit (builtins) filter getAttr head isList;
|
2021-01-15 13:21:58 +00:00
|
|
|
inherit (lib) attrNames concatLists recursiveUpdate zipAttrsWithNames;
|
2017-12-17 15:02:52 +00:00
|
|
|
|
|
|
|
filterAttrNames = f: attrs:
|
|
|
|
filter (n: f (getAttr n attrs)) (attrNames attrs);
|
|
|
|
|
|
|
|
concatAttrLists = attrsets:
|
|
|
|
zipAttrsWithNames (filterAttrNames isList (head attrsets)) (_: concatLists) attrsets;
|
|
|
|
|
2023-11-28 15:54:43 +00:00
|
|
|
template = {
|
2024-04-26 20:24:03 +00:00
|
|
|
nativeBuildInputs = [ pkg-config xfce4-dev-tools wrapGAppsHook3 ];
|
2018-07-21 21:07:49 +00: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 21:00:53 +00:00
|
|
|
inherit rev sha256;
|
2017-12-17 15:02:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
2020-04-05 01:53:24 +00:00
|
|
|
pos = builtins.unsafeGetAttrPos "pname" args;
|
|
|
|
|
2023-11-28 15:54:43 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = gitUpdater {
|
|
|
|
inherit rev-prefix odd-unstable patchlevel-unstable;
|
|
|
|
};
|
|
|
|
} // passthru;
|
2020-04-13 21:12:16 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2021-06-13 21:00:58 +00:00
|
|
|
homepage = "https://gitlab.xfce.org/${category}/${pname}";
|
2021-03-02 12:07:57 +00:00
|
|
|
license = licenses.gpl2Plus; # some libraries are under LGPLv2+
|
2017-12-17 15:02:52 +00:00
|
|
|
platforms = platforms.linux;
|
2023-11-28 15:54:43 +00:00
|
|
|
} // meta;
|
2017-12-17 15:02:52 +00:00
|
|
|
};
|
|
|
|
|
2023-11-28 15:54:43 +00:00
|
|
|
publicArgs = removeAttrs args [ "category" "sha256" ];
|
2017-12-17 15:02:52 +00:00
|
|
|
in
|
|
|
|
|
2023-11-28 15:54:43 +00:00
|
|
|
stdenv.mkDerivation (publicArgs // template // concatAttrLists [ template args ])
|
2024-11-18 02:40:01 +00:00
|
|
|
|