From 3a37abc3cef1e3f63c7333511043d5e7c3975cfa Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sun, 25 Feb 2007 22:25:25 +0000 Subject: * SLiM, a lightweight display manager. svn path=/nixpkgs/trunk/; revision=8044 --- .../applications/display-managers/slim/default.nix | 15 ++++++++ .../display-managers/slim/runtime-paths.patch | 41 ++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 pkgs/applications/display-managers/slim/default.nix create mode 100644 pkgs/applications/display-managers/slim/runtime-paths.patch (limited to 'pkgs/applications') diff --git a/pkgs/applications/display-managers/slim/default.nix b/pkgs/applications/display-managers/slim/default.nix new file mode 100644 index 000000000000..748e0947a640 --- /dev/null +++ b/pkgs/applications/display-managers/slim/default.nix @@ -0,0 +1,15 @@ +{stdenv, fetchurl, x11, libjpeg, libpng, libXmu, freetype}: + +stdenv.mkDerivation { + name = "slim-1.2.6"; + src = fetchurl { + url = http://download.berlios.de/slim/slim-1.2.6.tar.gz; + sha256 = "0plcmm955rnv67sx67ka6dccanr4rfzwzvsj6lnr8kqdip4522jg"; + }; + patches = [./runtime-paths.patch]; + buildInputs = [x11 libjpeg libpng libXmu freetype]; + NIX_CFLAGS_COMPILE = "-I${freetype}/include/freetype2"; + preBuild = " + makeFlagsArray=(CC=gcc CXX=g++ PREFIX=$out MANDIR=$out/share/man CFGDIR=$out/etc) + "; +} diff --git a/pkgs/applications/display-managers/slim/runtime-paths.patch b/pkgs/applications/display-managers/slim/runtime-paths.patch new file mode 100644 index 000000000000..b59b32f31114 --- /dev/null +++ b/pkgs/applications/display-managers/slim/runtime-paths.patch @@ -0,0 +1,41 @@ +diff -rc slim-1.2.6-orig/app.cpp slim-1.2.6/app.cpp +*** slim-1.2.6-orig/app.cpp Fri Sep 15 23:00:37 2006 +--- slim-1.2.6/app.cpp Sun Feb 25 17:30:50 2007 +*************** +*** 113,119 **** + + // Read configuration and theme + cfg = new Cfg; +! cfg->readConf(CFGFILE); + string themebase = ""; + string themefile = ""; + string themedir = ""; +--- 113,121 ---- + + // Read configuration and theme + cfg = new Cfg; +! char *cfgfile = getenv("SLIM_CFGFILE"); +! if (!cfgfile) cfgfile = CFGFILE; +! cfg->readConf(cfgfile); + string themebase = ""; + string themefile = ""; + string themedir = ""; +*************** +*** 121,127 **** + if (testing) { + themeName = testtheme; + } else { +! themebase = string(THEMESDIR) + "/"; + themeName = cfg->getOption("current_theme"); + string::size_type pos; + if ((pos = themeName.find(",")) != string::npos) { +--- 123,131 ---- + if (testing) { + themeName = testtheme; + } else { +! char *themesdir = getenv("SLIM_THEMESDIR"); +! if (!themesdir) themesdir = THEMESDIR; +! themebase = string(themesdir) + "/"; + themeName = cfg->getOption("current_theme"); + string::size_type pos; + if ((pos = themeName.find(",")) != string::npos) { -- cgit 1.4.1