2010-10-02 07:24:06 +02:00
|
|
|
{ stdenv, fetchurl, cmake, kdelibs, gettext, perl, automoc4 }:
|
|
|
|
|
|
|
|
let
|
|
|
|
overrides = { };
|
|
|
|
|
2010-12-06 13:04:27 +01:00
|
|
|
defaultRelease = "4.5.3";
|
|
|
|
releases = [ "4.5.1" "4.5.2" "4.5.3" ];
|
2010-10-02 07:24:06 +02:00
|
|
|
|
2010-10-21 00:42:48 +02:00
|
|
|
sanitizeString = replaceChars [ "@" "." ] [ "_" "_" ];
|
|
|
|
getOverride = name: attrByPath [name] {} overrides;
|
2010-10-02 07:24:06 +02:00
|
|
|
|
2010-10-21 00:42:48 +02:00
|
|
|
inherit (stdenv.lib) replaceChars attrByPath singleton;
|
|
|
|
|
|
|
|
kdeL10nDerivation = {lang, sha256, release} :
|
2010-10-02 07:24:06 +02:00
|
|
|
let
|
2010-10-21 00:42:48 +02:00
|
|
|
name = "kde-l10n-${lang}-${release}";
|
2010-10-21 08:56:28 +02:00
|
|
|
saneName = "kde-l10n-${sanitizeString lang}-${release}";
|
2010-10-02 07:24:06 +02:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation ({
|
2010-10-21 08:56:28 +02:00
|
|
|
name = saneName;
|
2010-10-02 07:24:06 +02:00
|
|
|
src = fetchurl {
|
2010-10-21 00:42:48 +02:00
|
|
|
url = "mirror://kde/stable/${release}/src/kde-l10n/${name}.tar.bz2";
|
2010-10-21 08:56:28 +02:00
|
|
|
name = "${saneName}.tar.bz2";
|
2010-10-02 07:24:06 +02:00
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ cmake perl gettext kdelibs automoc4 ];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "KDE translation for ${lang}";
|
|
|
|
license = "GPL";
|
|
|
|
inherit (kdelibs.meta) maintainers platforms homepage;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
// (getOverride lang) // (getOverride name)
|
|
|
|
);
|
2010-10-21 00:42:48 +02:00
|
|
|
|
|
|
|
kdeL10nRelease = release:
|
|
|
|
let
|
|
|
|
releaseStr = sanitizeString release;
|
|
|
|
in
|
|
|
|
builtins.listToAttrs (
|
|
|
|
map ({lang, sha256}:
|
|
|
|
{
|
|
|
|
name = "${sanitizeString lang}";
|
|
|
|
value = kdeL10nDerivation { inherit lang release sha256;};
|
|
|
|
}
|
|
|
|
) (import (./manifest + "-${release}.nix"))
|
|
|
|
);
|
|
|
|
|
2010-10-02 07:24:06 +02:00
|
|
|
in
|
|
|
|
{
|
|
|
|
inherit kdeL10nDerivation;
|
|
|
|
recurseForDerivations = true;
|
|
|
|
}
|
2010-10-21 00:42:48 +02:00
|
|
|
// builtins.listToAttrs (map (r : { name = sanitizeString r; value =
|
|
|
|
kdeL10nRelease r; }) releases)
|
|
|
|
// (kdeL10nRelease defaultRelease)
|