From f7d5e83abbe95ed06aac58f4d1a2e971fae4d186 Mon Sep 17 00:00:00 2001 From: Arseniy Seroka Date: Sun, 9 Mar 2014 14:32:02 +0400 Subject: [PATCH] slim: remove duplicate code --- lib/maintainers.nix | 1 + .../modules/services/x11/display-managers/slim.nix | 4 +++- pkgs/applications/display-managers/slim/default.nix | 13 +------------ 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/lib/maintainers.nix b/lib/maintainers.nix index fa0d1d81e611..d056d4ca7e4d 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -31,6 +31,7 @@ ianwookim = "Ian-Woo Kim "; iElectric = "Domen Kozar "; iyzsong = "Song Wenwu "; + JagaJaga = "Arseniy Seroka "; jcumming = "Jack Cummings "; kkallio = "Karn Kallio "; ktosiek = "Tomasz Kontusz "; diff --git a/nixos/modules/services/x11/display-managers/slim.nix b/nixos/modules/services/x11/display-managers/slim.nix index b4f42ec7649c..29cdc4cdabcf 100644 --- a/nixos/modules/services/x11/display-managers/slim.nix +++ b/nixos/modules/services/x11/display-managers/slim.nix @@ -85,7 +85,9 @@ in package = mkOption { type = types.package; - default = pkgs.slim; + default = pkgs.slim.override { + theme = slimThemesDir; + }; description = '' Configure slim package. ''; diff --git a/pkgs/applications/display-managers/slim/default.nix b/pkgs/applications/display-managers/slim/default.nix index caf8a7c4222e..96c9e149c9f1 100644 --- a/pkgs/applications/display-managers/slim/default.nix +++ b/pkgs/applications/display-managers/slim/default.nix @@ -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 {