forked from mirrors/nixpkgs
slim: remove duplicate code
This commit is contained in:
parent
d573ea576f
commit
f7d5e83abb
|
@ -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>";
|
||||
|
|
|
@ -85,7 +85,9 @@ in
|
|||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.slim;
|
||||
default = pkgs.slim.override {
|
||||
theme = slimThemesDir;
|
||||
};
|
||||
description = ''
|
||||
Configure slim package.
|
||||
'';
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue