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>";
|
ianwookim = "Ian-Woo Kim <ianwookim@gmail.com>";
|
||||||
iElectric = "Domen Kozar <domen@dev.si>";
|
iElectric = "Domen Kozar <domen@dev.si>";
|
||||||
iyzsong = "Song Wenwu <iyzsong@gmail.com>";
|
iyzsong = "Song Wenwu <iyzsong@gmail.com>";
|
||||||
|
JagaJaga = "Arseniy Seroka <ars.seroka@gmail.com>";
|
||||||
jcumming = "Jack Cummings <jack@mudshark.org>";
|
jcumming = "Jack Cummings <jack@mudshark.org>";
|
||||||
kkallio = "Karn Kallio <tierpluspluslists@gmail.com>";
|
kkallio = "Karn Kallio <tierpluspluslists@gmail.com>";
|
||||||
ktosiek = "Tomasz Kontusz <tomasz.kontusz@gmail.com>";
|
ktosiek = "Tomasz Kontusz <tomasz.kontusz@gmail.com>";
|
||||||
|
|
|
@ -85,7 +85,9 @@ in
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
default = pkgs.slim;
|
default = pkgs.slim.override {
|
||||||
|
theme = slimThemesDir;
|
||||||
|
};
|
||||||
description = ''
|
description = ''
|
||||||
Configure slim package.
|
Configure slim package.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -2,18 +2,7 @@
|
||||||
, fontconfig, freetype, pam, dbus_libs, makeWrapper, pkgs, theme ? null }:
|
, fontconfig, freetype, pam, dbus_libs, makeWrapper, pkgs, theme ? null }:
|
||||||
|
|
||||||
let
|
let
|
||||||
slimThemesDir =
|
slimThemesDir = if theme == null then "$out/share/slim/themes" else theme;
|
||||||
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
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
|
Loading…
Reference in a new issue