mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 05:00:16 +00:00
Adding a KDE wrapper, to easily have KDE programs in nix-env.
Specially for those not running KDE.
This commit is contained in:
parent
e083d32d22
commit
4e7208fe2e
40
pkgs/build-support/kdewrapper/default.nix
Normal file
40
pkgs/build-support/kdewrapper/default.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{ stdenv, kde4, shared_mime_info, extraLibs ? [] }:
|
||||
|
||||
/* Supply a KDE program, and it will have the necessary KDE vars to
|
||||
get icons, mime types, etc. working.
|
||||
For example:
|
||||
|
||||
packageOverrides = pkgs : {
|
||||
kdenliveWrapped = kde4.wrapper kde4.kdenlive;
|
||||
};
|
||||
*/
|
||||
program:
|
||||
|
||||
let
|
||||
libs = with kde4; [ kdelibs kde_runtime oxygen_icons shared_mime_info ] + extra;
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = program.name + "-wrapped";
|
||||
|
||||
inherit libs;
|
||||
|
||||
buildCommand = ''
|
||||
ensureDir $out/bin
|
||||
|
||||
KDEDIRS=
|
||||
QT_PLUGIN_PATH=
|
||||
for a in $libs; do
|
||||
KDEDIRS=$a''${KDEDIRS:+:}$KDEDIRS
|
||||
QT_PLUGIN_PATH=$a''${KDEDIRS:+:}$KDEDIRS
|
||||
done
|
||||
for a in ${program}/bin/*; do
|
||||
PROG=$out/bin/`basename $a`
|
||||
cat > $PROG << END
|
||||
export KDEDIRS=$KDEDIRS
|
||||
export QT_PLUGIN_PATH=$KDEDIRS
|
||||
exec $a "\$@"
|
||||
END
|
||||
chmod +x $PROG
|
||||
done
|
||||
'';
|
||||
}
|
|
@ -8609,6 +8609,8 @@ let
|
|||
in kde4 // {
|
||||
inherit kde4;
|
||||
|
||||
wrapper = callPackage ../build-support/kdewrapper {};
|
||||
|
||||
recurseForRelease = true;
|
||||
|
||||
akunambol = callPackage ../applications/networking/sync/akunambol { };
|
||||
|
|
Loading…
Reference in a new issue