From 861fae01fd7ffb2719ff1547bd7200f35c288739 Mon Sep 17 00:00:00 2001 From: Pallav Agarwal Date: Tue, 23 Feb 2016 21:06:54 +0530 Subject: wpsoffice: Add new package --- pkgs/applications/office/wpsoffice/default.nix | 52 ++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 pkgs/applications/office/wpsoffice/default.nix (limited to 'pkgs/applications/office/wpsoffice') diff --git a/pkgs/applications/office/wpsoffice/default.nix b/pkgs/applications/office/wpsoffice/default.nix new file mode 100644 index 000000000000..093c2cd59bb0 --- /dev/null +++ b/pkgs/applications/office/wpsoffice/default.nix @@ -0,0 +1,52 @@ +{stdenv, fetchurl, unzip, libX11, libcxxabi, glib, xorg, qt4, fontconfig, phonon, freetype, zlib, libpng12, libICE, libXrender, cups, lib}: + +stdenv.mkDerivation rec{ + name = "wpsoffice-${version}"; + version = "10.1.0.5503"; + + src = fetchurl { + name = "${name}.tar.gz"; + url = "http://kdl.cc.ksosoft.com/wps-community/download/a20/wps-office_10.1.0.5503~a20p2_x86_64.tar.xz"; + sha256 = "0h9f8s7zkpd056ibrj978mr04imv631sp1wljplh99l5ncns6hws"; + }; + + meta = { + description = "Office program originally named Kingsoft Office"; + homepage = http://wps-community.org/; + platforms = [ "x86_64-linux" ]; + # Binary for i686 is also available if someone can package it + license = lib.licenses.unfree-redistributable; + }; + + libPath = stdenv.lib.makeLibraryPath [ + libX11 + libcxxabi + libpng12 + glib + xorg.libSM + xorg.libXext + fontconfig + phonon + zlib + freetype + libICE + cups + libXrender + ]; + + phases = [ "unpackPhase" "installPhase" ]; + + installPhase = '' + cp -r . "$out" + chmod +x "$out/office6/wpp" + patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) --force-rpath --set-rpath "$out/office6:$libPath" "$out/office6/wpp" + chmod +x "$out/office6/wps" + patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) --force-rpath --set-rpath "$out/office6:$libPath" "$out/office6/wps" + chmod +x "$out/office6/et" + patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) --force-rpath --set-rpath "$out/office6:$libPath" "$out/office6/et" + mkdir -p "$out/bin/" + ln -s "$out/office6/wpp" "$out/bin/wpspresentation" + ln -s "$out/office6/wps" "$out/bin/wpswriter" + ln -s "$out/office6/et" "$out/bin/wpsspreadsheets" + ''; +} -- cgit 1.4.1