nixpkgs-suyu/pkgs/applications/kde-apps-14.12/default.nix

322 lines
9.2 KiB
Nix
Raw Normal View History

# Maintainer's Notes:
#
# Minor updates:
# 1. Edit ./manifest.sh to point to the updated URL. Upstream sometimes
# releases updates that include only the changed packages; in this case,
# multiple URLs can be provided and the results will be merged.
# 2. Run ./manifest.sh and ./dependencies.sh.
# 3. Build and enjoy.
#
# Major updates:
# We prefer not to immediately overwrite older versions with major updates, so
# make a copy of this directory first. After copying, be sure to delete ./tmp
# if it exists. Then follow the minor update instructions.
2015-02-21 17:57:50 +01:00
{ autonix, symlinkJoin, kde4, kf5, pkgs, qt4, qt5, stdenv, debug ? false }:
2015-01-19 18:39:04 +01:00
with stdenv.lib; with autonix;
2015-02-01 17:25:19 +01:00
let kf5Orig = kf5; in
2015-01-19 18:39:04 +01:00
let
2015-02-21 17:57:50 +01:00
kf5 = kf5Orig.override { inherit debug qt5; };
2015-01-19 18:39:04 +01:00
mirror = "mirror://kde";
renames =
2015-01-25 19:47:17 +01:00
(builtins.removeAttrs
2015-01-19 18:39:04 +01:00
(import ./renames.nix {})
2015-01-25 19:47:17 +01:00
["Backend" "CTest"])
// {
"KDE4" = "kdelibs";
"Kexiv2" = "libkexiv2";
"Kdcraw" = "libkdcraw";
"Kipi" = "libkipi";
"LibKMahjongg" = "libkmahjongg";
"LibKonq" = "kde-baseapps";
};
2015-01-19 18:39:04 +01:00
2015-02-21 17:57:50 +01:00
mkDerivation = drv: kf5.mkDerivation (drv // {
preHook = (drv.preHook or "") + ''
addQt4Plugins() {
if [[ -d "$1/lib/qt4/plugins" ]]; then
propagatedUserEnvPkgs+=" $1"
fi
if [[ -d "$1/lib/kde4/plugins" ]]; then
propagatedUserEnvPkgs+=" $1"
fi
}
envHooks+=(addQt4Plugins)
'';
});
2015-01-19 18:39:04 +01:00
scope =
# packages in this collection
(mapAttrs (dep: name: kdeApps."${name}") renames) //
# packages from KDE Frameworks 5
kf5.scope //
# packages from nixpkgs
(with pkgs;
{
2015-01-25 19:47:17 +01:00
ACL = acl;
Akonadi = kde4.akonadi;
2015-01-19 18:39:04 +01:00
Alsa = alsaLib;
2015-01-25 19:47:17 +01:00
Automoc4 = automoc4;
Avahi = avahi;
BISON = bison;
Baloo = kde4.baloo;
Boost = boost156;
Canberra = libcanberra;
2015-01-19 18:39:04 +01:00
Cdparanoia = cdparanoia;
CUPS = cups;
2015-01-25 19:47:17 +01:00
DBusMenuQt = libdbusmenu_qt;
2015-01-19 18:39:04 +01:00
DjVuLibre = djvulibre;
2015-01-25 19:47:17 +01:00
ENCHANT = enchant;
2015-01-19 18:39:04 +01:00
EPub = ebook_tools;
Eigen2 = eigen2;
Eigen3 = eigen;
Exiv2 = exiv2;
2015-01-25 19:47:17 +01:00
FAM = fam;
2015-01-19 18:39:04 +01:00
FFmpeg = ffmpeg;
Flac = flac;
2015-01-25 19:47:17 +01:00
FLEX = flex;
2015-01-19 18:39:04 +01:00
Freetype = freetype;
GMP = gmp;
Gettext = gettext;
Gpgme = gpgme;
Gphoto2 = libgphoto2;
Grantlee = grantlee;
GSL = gsl;
HUNSPELL = hunspell;
2015-01-25 19:47:17 +01:00
HUpnp = herqq;
Jasper = jasper;
2015-01-19 18:39:04 +01:00
KActivities = kde4.kactivities;
LCMS2 = lcms2;
2015-01-25 19:47:17 +01:00
Ldap = openldap;
2015-01-19 18:39:04 +01:00
LibAttica = attica;
LibGcrypt = libgcrypt;
LibSSH = libssh;
LibSpectre = libspectre;
LibVNCServer = libvncserver;
2015-01-25 19:47:17 +01:00
Libical = libical;
2015-01-19 18:39:04 +01:00
MusicBrainz3 = libmusicbrainz;
NetworkManager = networkmanager;
OggVorbis = libvorbis;
OpenAL = openal;
OpenEXR = openexr;
Poppler = poppler.poppler_qt4;
2015-01-25 19:47:17 +01:00
Prison = prison;
2015-01-19 18:39:04 +01:00
PulseAudio = pulseaudio;
2015-01-25 19:47:17 +01:00
PythonLibrary = python;
2015-01-19 18:39:04 +01:00
Qalculate = libqalculate;
QCA2 = qca2;
2015-01-25 19:47:17 +01:00
QImageBlitz = qimageblitz;
QJSON = qjson;
Qt4 = qt4;
2015-01-19 18:39:04 +01:00
Samba = samba;
2015-01-25 19:47:17 +01:00
Sasl2 = cyrus_sasl;
SharedDesktopOntologies = shared_desktop_ontologies;
2015-01-19 18:39:04 +01:00
SndFile = libsndfile;
Speechd = speechd;
TIFF = libtiff;
Taglib = taglib;
TelepathyQt4 = telepathy_qt;
TunePimp = libtunepimp;
2015-01-25 19:47:17 +01:00
UDev = udev;
USB = libusb;
2015-01-19 18:39:04 +01:00
Xscreensaver = xscreensaver;
2015-01-25 19:47:17 +01:00
Xsltproc = libxslt;
2015-01-19 18:39:04 +01:00
}
);
2015-02-01 17:25:19 +01:00
qt5Only = tgt:
let qt4Deps = [ "KDE4" "Phonon" ];
in mapAttrs (name: if name == tgt then removePkgDeps qt4Deps else id);
2015-01-19 18:39:04 +01:00
preResolve = super:
fold (f: x: f x) super
[
2015-02-01 17:25:19 +01:00
(qt5Only "kmix")
2015-01-19 18:39:04 +01:00
(userEnvPkg "SharedMimeInfo")
(userEnvPkg "SharedDesktopOntologies")
(blacklist ["artikulate"]) # build failure, wrong boost?
(blacklist ["kde-dev-scripts" "kde-dev-utils"]) # docbook errors
(blacklist ["kdewebdev"]) # unknown build failure
];
2015-02-21 17:57:50 +01:00
l10nPkgQt4 = orig:
let drvName = builtins.parseDrvName orig.name; in
mkDerivation {
name = "${drvName.name}-qt4-${drvName.version}";
inherit (orig) src;
buildInputs = [ kdeApps.kdelibs ];
nativeBuildInputs = with pkgs; [ cmake gettext perl ];
preConfigure = ''
cd 4/
'';
};
l10nPkgQt5 = orig:
let drvName = builtins.parseDrvName orig.name; in
mkDerivation {
name = "${drvName.name}-qt5-${drvName.version}";
inherit (orig) src;
buildInputs = with kf5; [ kdoctools ki18n ];
nativeBuildInputs = with pkgs; [ cmake kf5.extra-cmake-modules gettext perl ];
preConfigure = ''
cd 5/
'';
};
l10nPkg = name: orig: symlinkJoin orig.name [(l10nPkgQt4 orig) (l10nPkgQt5 orig)];
removeL10nPkgs = filterAttrs (n: v: !(hasPrefix "kde-l10n") n);
2015-01-19 18:39:04 +01:00
postResolve = super:
2015-02-21 17:57:50 +01:00
(removeL10nPkgs super) // {
2015-01-19 18:39:04 +01:00
2015-01-24 17:24:55 +01:00
ark = with pkgs; super.ark // {
buildInputs = (super.ark.buildInputs or []) ++ [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/ark --prefix PATH : "${unzipNLS}/bin"
'';
};
2015-01-19 18:39:04 +01:00
ffmpegthumbs = with pkgs; super.ffmpegthumbs // {
nativeBuildInputs = super.ffmpegthumbs.nativeBuildInputs ++ [pkgconfig];
};
kalzium = with pkgs; super.kalzium // {
nativeBuildInputs = super.kalzium.nativeBuildInputs ++ [pkgconfig];
};
kde-runtime = with pkgs; super.kde-runtime // {
buildInputs =
super.kde-runtime.buildInputs ++ [libcanberra];
nativeBuildInputs =
super.kde-runtime.nativeBuildInputs ++ [pkgconfig];
NIX_CFLAGS_COMPILE =
(super.kde-runtime.NIX_CFLAGS_COMPILE or "")
+ " -I${ilmbase}/include/OpenEXR";
};
2015-01-25 19:47:17 +01:00
kde-workspace = with pkgs; super.kde-workspace // {
buildInputs = with xlibs;
super.kde-workspace.buildInputs
++
[
libxkbfile libXcomposite xcbutilimage xcbutilkeysyms
xcbutilrenderutil
];
nativeBuildInputs =
super.kde-workspace.nativeBuildInputs
++ [ pkgconfig ];
};
kdelibs = with pkgs; super.kdelibs // {
buildInputs =
super.kdelibs.buildInputs ++ [ attr libxslt polkit_qt4 xz ];
nativeBuildInputs =
super.kdelibs.nativeBuildInputs ++ [ pkgconfig ];
NIX_CFLAGS_COMPILE = "-I${ilmbase}/include/OpenEXR";
propagatedBuildInputs =
super.kdelibs.propagatedBuildInputs ++ [ qt4 soprano phonon strigi ];
propagatedNativeBuildInputs =
super.kdelibs.propagatedNativeBuildInputs
++ [ automoc4 cmake perl shared_mime_info ];
patches = [ ./kdelibs/polkit-install.patch ];
cmakeFlags = [
"-DDOCBOOKXML_CURRENTDTD_DIR=${docbook_xml_dtd_42}/xml/dtd/docbook"
"-DDOCBOOKXSL_DIR=${docbook_xsl}/xml/xsl/docbook"
"-DHUPNP_ENABLED=ON"
"-DWITH_SOLID_UDISKS2=ON"
];
};
kdepim = with pkgs; super.kdepim // {
buildInputs =
super.kdepim.buildInputs ++ [ gpgme libassuan ];
nativeBuildInputs =
super.kdepim.nativeBuildInputs ++ [ pkgconfig ];
};
kdepimlibs = with pkgs; super.kdepimlibs // {
nativeBuildInputs =
super.kdepimlibs.nativeBuildInputs ++ [ pkgconfig ];
};
2015-01-19 18:39:04 +01:00
kdesdk-thumbnailers = with pkgs; super.kdesdk-thumbnailers // {
nativeBuildInputs =
super.kdesdk-thumbnailers.nativeBuildInputs
++ [gettext];
};
kgpg = with pkgs; super.kgpg // {
buildInputs = super.kgpg.buildInputs ++ [boost];
};
kmix = with pkgs; super.kmix // {
nativeBuildInputs = super.kmix.nativeBuildInputs ++ [pkgconfig];
2015-01-25 19:47:17 +01:00
cmakeFlags = [ "-DKMIX_KF5_BUILD=ON" ];
2015-01-19 18:39:04 +01:00
};
kmousetool = with pkgs; super.kmousetool // {
buildInputs = with xlibs;
super.kmousetool.buildInputs
++ [libXtst libXt];
};
kremotecontrol = with pkgs; super.kremotecontrol // {
buildInputs = super.kremotecontrol.buildInputs ++ [xlibs.libXtst];
};
krfb = with pkgs; super.krfb // {
buildInputs =
super.krfb.buildInputs
++ [xlibs.libXtst kde4.telepathy.common_internals];
};
libkdcraw = with pkgs; super.libkdcraw // {
2015-01-25 19:47:17 +01:00
buildInputs = super.libkdcraw.buildInputs ++ [scope.KDE4 libraw];
2015-01-19 18:39:04 +01:00
nativeBuildInputs = super.libkdcraw.nativeBuildInputs ++ [pkgconfig];
};
libkexiv2 = with pkgs; super.libkexiv2 // {
2015-01-25 19:47:17 +01:00
buildInputs = super.libkexiv2.buildInputs ++ [exiv2 scope.KDE4];
2015-01-19 18:39:04 +01:00
};
libkface = with pkgs; super.libkface // {
2015-01-25 19:47:17 +01:00
buildInputs = super.libkface.buildInputs ++ [scope.KDE4 opencv];
2015-01-19 18:39:04 +01:00
};
libkipi = with pkgs; super.libkipi // {
2015-01-25 19:47:17 +01:00
buildInputs = super.libkipi.buildInputs ++ [scope.KDE4];
2015-01-19 18:39:04 +01:00
};
libksane = with pkgs; super.libksane // {
2015-01-25 19:47:17 +01:00
buildInputs = super.libksane.buildInputs ++ [scope.KDE4 saneBackends];
2015-01-19 18:39:04 +01:00
};
};
2015-02-21 17:57:50 +01:00
l10nManifest =
filterAttrs
(n: v: hasPrefix "kde-l10n" n)
(importManifest ./manifest.nix { inherit mirror; });
2015-01-19 18:39:04 +01:00
kdeApps = generateCollection ./. {
2015-02-21 17:57:50 +01:00
inherit mkDerivation;
2015-01-25 19:47:17 +01:00
inherit mirror preResolve postResolve renames scope;
2015-01-19 18:39:04 +01:00
};
2015-02-21 17:57:50 +01:00
in kdeApps // (mapAttrs l10nPkg l10nManifest)