slim: remove duplicate code

This commit is contained in:
Arseniy Seroka 2014-03-09 14:32:02 +04:00
parent d573ea576f
commit f7d5e83abb
3 changed files with 5 additions and 13 deletions

View File

@ -31,6 +31,7 @@
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,7 +85,9 @@ in
package = mkOption {
type = types.package;
default = pkgs.slim;
default = pkgs.slim.override {
theme = slimThemesDir;
};
description = ''
Configure slim package.
'';

View File

@ -2,18 +2,7 @@
, fontconfig, freetype, pam, dbus_libs, makeWrapper, pkgs, theme ? null }:
let
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;
slimThemesDir = if theme == null then "$out/share/slim/themes" else theme;
in
stdenv.mkDerivation rec {