Revert "slim: remove duplicate code"

This reverts commit f7d5e83abb.  It
breaks the Firefox and Xfce tests:

  in job ‘tests.firefox.x86_64-linux’:
  cannot coerce a boolean to a string

  in job ‘tests.xfce.x86_64-linux’:
  infinite recursion encountered
This commit is contained in:
Eelco Dolstra 2014-03-30 17:03:15 +02:00
parent 1c192e1fea
commit aaf01268ff
3 changed files with 13 additions and 5 deletions

View File

@ -37,7 +37,6 @@
ianwookim = "Ian-Woo Kim <ianwookim@gmail.com>";
iElectric = "Domen Kozar <domen@dev.si>";
iyzsong = "Song Wenwu <iyzsong@gmail.com>";
JagaJaga = "Arseniy Seroka <ars.seroka@gmail.com>";
jcumming = "Jack Cummings <jack@mudshark.org>";
kkallio = "Karn Kallio <tierpluspluslists@gmail.com>";
ktosiek = "Tomasz Kontusz <tomasz.kontusz@gmail.com>";

View File

@ -85,9 +85,7 @@ in
package = mkOption {
type = types.package;
default = pkgs.slim.override {
theme = slimThemesDir;
};
default = pkgs.slim;
description = ''
Configure slim package.
'';

View File

@ -2,7 +2,18 @@
, fontconfig, freetype, pam, dbus_libs, makeWrapper, pkgs, theme ? null }:
let
slimThemesDir = if theme == null then "$out/share/slim/themes" else theme;
slimThemesDir =
let
unpackedTheme = pkgs.stdenv.mkDerivation {
name = "slim-theme";
buildCommand = ''
ensureDir $out
cd $out
unpackFile ${theme}
ln -s * default
'';
};
in if theme == null then "$out/share/slim/themes" else unpackedTheme;
in
stdenv.mkDerivation rec {