1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 05:00:16 +00:00

* Update kdeadmin and kdegames.

svn path=/nixpkgs/branches/kde-4.7/; revision=27898
This commit is contained in:
Eelco Dolstra 2011-07-22 01:28:09 +00:00
parent a75f9edd10
commit 9379248ef3
8 changed files with 74 additions and 47 deletions

View file

@ -0,0 +1,50 @@
{ kde, cmake, qt4, pkgconfig, perl, pythonPackages
, sip, pycups, pygobject, system_config_printer
, kdelibs, automoc4, phonon, kdepimlibs, pykde4
, cups, nettools } @ args:
let
system_config_printer = args.system_config_printer.override { withGUI = false; };
in
kde.package rec {
buildInputs =
[ cmake kdelibs qt4 automoc4 phonon kdepimlibs
pythonPackages.python
pycups pykde4 sip pygobject system_config_printer
];
passthru = { inherit system_config_printer; };
preConfigure =
''
for i in system-config-printer-kde/cmake-modules/FindSystemConfigPrinter.py system-config-printer-kde/system-config-printer-kde.py; do
substituteInPlace $i \
--replace /usr/share/system-config-printer ${system_config_printer}/share/system-config-printer \
--replace /usr/bin/cupstestppd ${cups}/bin/cupstestppd \
--replace /bin/hostname ${nettools}/bin/hostname
done
'';
postInstall =
''
# Bake the required Python path into the printer configuration program.
res=
for i in $(IFS=:; echo $PYTHONPATH); do res="$res''${res:+,} '$i'"; done
sed -i $out/share/apps/system-config-printer-kde/system-config-printer-kde.py \
-e "1 a import sys\nsys.path = [$res] + sys.path"
mkdir -p $out/nix-support
echo ${pykde4} > $out/nix-support/propagated-user-env-packages
'';
meta = {
description = "KDE Administration Utilities";
license = "GPL";
kde.name = "kdeadmin";
};
}

View file

@ -1,13 +0,0 @@
source $stdenv/setup
myPatchPhase()
{
for i in system-config-printer-kde/cmake-modules/FindSystemConfigPrinter.py system-config-printer-kde/system-config-printer-kde.py
do
sed -i -e "s|/usr/share/system-config-printer|$system_config_printer/share/system-config-printer|" $i
done
sed -i -e "s|import cupshelpers.ppds, cupshelpers.cupshelpers|import ppds, cupshelpers|" system-config-printer-kde/cmake-modules/FindSystemConfigPrinter.py
}
patchPhase=myPatchPhase
genericBuild

View file

@ -1,23 +0,0 @@
{ kde, cmake, qt4, pkgconfig, perl, python
, sip, pyqt4, pycups, rhpl, system_config_printer
, kdelibs, kdepimlibs, kdebindings, automoc4}:
kde.package {
builder = ./builder.sh;
inherit system_config_printer;
# TODO: split, check which packages work on nixos
PYTHONPATH = "${pycups}/lib/python${python.majorVersion}/site-packages";
buildInputs = [ cmake qt4 pkgconfig perl python sip pyqt4 pycups rhpl system_config_printer
kdelibs kdepimlibs kdebindings automoc4 ];
meta = {
description = "KDE Administration Utilities";
license = "GPL";
kde.name = "kdeadmin";
};
}

View file

@ -83,6 +83,8 @@ recurseIntoAttrs rec {
kde_wallpapers = callPackage ./wallpapers.nix { };
kdeadmin = callPackage ./admin.nix { };
kdegames = callPackage ./games.nix { };
/*

View file

@ -13,10 +13,7 @@ kde.package rec {
# TODO: ggz
postInstall =
''
wrapPythonPrograms
'';
postInstall = "wrapPythonPrograms";
meta = {
description = "KDE Games";

View file

@ -1,11 +1,11 @@
{ kde, cmake, qt4, automoc4, kdelibs, phonon, python, sip, pyqt4
, soprano, kdepimlibs, shared_desktop_ontologies, boost }:
, soprano, kdepimlibs, shared_desktop_ontologies, boost, lndir }:
kde.package {
buildInputs =
[ cmake kdelibs qt4 automoc4 phonon python sip pyqt4 soprano
kdepimlibs shared_desktop_ontologies boost
kdepimlibs shared_desktop_ontologies boost lndir
];
NIX_CFLAGS_COMPILE = "-I${phonon}/include/phonon";
@ -14,6 +14,12 @@ kde.package {
''
substituteInPlace CMakeLists.txt \
--replace '{SIP_DEFAULT_SIP_DIR}' '{CMAKE_INSTALL_PREFIX}/share/sip'
# Symlink PyQt into PyKDE. This is necessary because PyQt looks
# in its PyQt4/uic/widget-plugins directory for plugins, and KDE
# needs to install a plugin.
mkdir -p $out/lib/python2.7
lndir ${pyqt4}/lib/python2.7 $out/lib/python2.7
'';
meta = {

View file

@ -9,6 +9,11 @@ stdenv.mkDerivation rec {
};
configurePhase = ''
mkdir -p $out
lndir ${pythonDBus} $out
export PYTHONPATH=$PYTHONPATH:$out/lib/${python.libPrefix}/site-packages
substituteInPlace configure.py \
--replace 'install_dir=pydbusmoddir' "install_dir='$out/lib/${python.libPrefix}/site-packages/dbus/mainloop'"
@ -16,18 +21,18 @@ stdenv.mkDerivation rec {
--confirm-license --bindir $out/bin \
--destdir $out/lib/${python.libPrefix}/site-packages \
--plugin-destdir $out/lib/qt4/plugins --sipdir $out/share/sip \
--dbus=${pythonDBus}/include/dbus-1.0 --verbose)
--dbus=$out/include/dbus-1.0 --verbose)
python configure.py $configureFlags "''${configureFlagsArray[@]}"
'';
buildInputs = [ python pkgconfig makeWrapper qt4 ];
buildInputs = [ python pkgconfig makeWrapper qt4 lndir ];
propagatedBuildInputs = [ sip pythonDBus ];
propagatedBuildInputs = [ sip ];
postInstall = ''
for i in $out/bin/*; do
wrapProgram $i --prefix PYTHONPATH : $out/lib/${python.libPrefix}/site-packages:$PYTHONPATH
wrapProgram $i --prefix PYTHONPATH : "$PYTHONPATH"
done
''; # */

View file

@ -2,6 +2,7 @@
, makeWrapper, pygobject, pygtk, docbook_xml_dtd_412, docbook_xsl
, pythonDBus, libxml2, desktop_file_utils, libusb, cups, pycups
, xz, pythonPackages
, withGUI ? true
}:
stdenv.mkDerivation rec {
@ -18,7 +19,9 @@ stdenv.mkDerivation rec {
pythonPackages.python pythonPackages.wrapPython
];
pythonPath = [ pythonDBus pycups pygtk pythonPackages.notify ];
pythonPath =
[ pythonDBus pycups pygobject ]
++ stdenv.lib.optionals withGUI [ pygtk pythonPackages.notify ];
configureFlags = "--with-udev-rules";