58ca4111ad
svn path=/nixpkgs/trunk/; revision=25279
59 lines
1.5 KiB
Nix
59 lines
1.5 KiB
Nix
{ stdenv, fetchurl, cmake, kdelibs, gettext, perl, automoc4 }:
|
|
|
|
let
|
|
overrides = { };
|
|
|
|
defaultRelease = "4.5.4";
|
|
releases = [ "4.5.1" "4.5.2" "4.5.3" "4.5.4" ];
|
|
|
|
sanitizeString = replaceChars [ "@" "." ] [ "_" "_" ];
|
|
getOverride = name: attrByPath [name] {} overrides;
|
|
|
|
inherit (stdenv.lib) replaceChars attrByPath singleton;
|
|
|
|
kdeL10nDerivation = {lang, sha256, release} :
|
|
let
|
|
name = "kde-l10n-${lang}-${release}";
|
|
saneName = "kde-l10n-${sanitizeString lang}-${release}";
|
|
in
|
|
stdenv.mkDerivation ({
|
|
name = saneName;
|
|
src = fetchurl {
|
|
url = "mirror://kde/stable/${release}/src/kde-l10n/${name}.tar.bz2";
|
|
name = "${saneName}.tar.bz2";
|
|
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)
|
|
);
|
|
|
|
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"))
|
|
);
|
|
|
|
in
|
|
{
|
|
inherit kdeL10nDerivation;
|
|
recurseForDerivations = true;
|
|
}
|
|
// builtins.listToAttrs (map (r : { name = sanitizeString r; value =
|
|
kdeL10nRelease r; }) releases)
|
|
// (kdeL10nRelease defaultRelease)
|