mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +00:00
nixos/enso-os: don't wrap in module
This commit is contained in:
parent
feab607ae5
commit
7814a2f566
@ -10,32 +10,6 @@ let
|
||||
icons = cfg.iconTheme.package;
|
||||
cursors = cfg.cursorTheme.package;
|
||||
|
||||
# We need a few things in the environment for the greeter to run with
|
||||
# fonts/icons.
|
||||
wrappedEnsoGreeter = pkgs.runCommand "lightdm-enso-os-greeter" {
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
preferLocalBuild = true;
|
||||
} ''
|
||||
# This wrapper ensures that we actually get themes
|
||||
makeWrapper ${pkgs.lightdm-enso-os-greeter}/bin/pantheon-greeter \
|
||||
$out/greeter \
|
||||
--prefix PATH : "${pkgs.glibc.bin}/bin" \
|
||||
--set GDK_PIXBUF_MODULE_FILE "${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" \
|
||||
--set GTK_PATH "${theme}:${pkgs.gtk3.out}" \
|
||||
--set GTK_EXE_PREFIX "${theme}" \
|
||||
--set GTK_DATA_PREFIX "${theme}" \
|
||||
--set XDG_DATA_DIRS "${theme}/share:${icons}/share:${cursors}/share" \
|
||||
--set XDG_CONFIG_HOME "${theme}/share"
|
||||
|
||||
cat - > $out/lightdm-enso-os-greeter.desktop << EOF
|
||||
[Desktop Entry]
|
||||
Name=LightDM Greeter
|
||||
Comment=This runs the LightDM Greeter
|
||||
Exec=$out/greeter
|
||||
Type=Application
|
||||
EOF
|
||||
'';
|
||||
|
||||
ensoGreeterConf = pkgs.writeText "lightdm-enso-os-greeter.conf" ''
|
||||
[greeter]
|
||||
default-wallpaper=${ldmcfg.background}
|
||||
@ -144,10 +118,16 @@ in {
|
||||
config = mkIf (ldmcfg.enable && cfg.enable) {
|
||||
environment.etc."lightdm/greeter.conf".source = ensoGreeterConf;
|
||||
|
||||
environment.systemPackages = [
|
||||
cursors
|
||||
icons
|
||||
theme
|
||||
];
|
||||
|
||||
services.xserver.displayManager.lightdm = {
|
||||
greeter = mkDefault {
|
||||
package = wrappedEnsoGreeter;
|
||||
name = "lightdm-enso-os-greeter";
|
||||
package = pkgs.lightdm-enso-os-greeter.xgreeters;
|
||||
name = "pantheon-greeter";
|
||||
};
|
||||
|
||||
greeters = {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ stdenv, fetchgit, pkgconfig
|
||||
{ stdenv, fetchgit, pkgconfig, linkFarm, lightdm-enso-os-greeter
|
||||
, dbus, pcre, epoxy, libXdmcp, at-spi2-core, libxklavier, libxkbcommon, libpthreadstubs
|
||||
, gtk3, vala, cmake, libgee, libX11, lightdm, gdk-pixbuf, clutter-gtk }:
|
||||
, gtk3, vala, cmake, libgee, libX11, lightdm, gdk-pixbuf, clutter-gtk, wrapGAppsHook, librsvg }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
version = "0.2.1";
|
||||
@ -12,12 +12,21 @@ stdenv.mkDerivation {
|
||||
sha256 = "11jm181jq1vbn83h235avpdxz7pqq6prqyzki5yryy53mkj4kgxz";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./fix-paths.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkgconfig
|
||||
vala
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
dbus
|
||||
gtk3
|
||||
pcre
|
||||
vala
|
||||
cmake
|
||||
epoxy
|
||||
libgee
|
||||
libX11
|
||||
@ -29,31 +38,21 @@ stdenv.mkDerivation {
|
||||
at-spi2-core
|
||||
libxkbcommon
|
||||
libpthreadstubs
|
||||
librsvg
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgconfig
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
sed -i "s@\''${CMAKE_INSTALL_PREFIX}/@@" greeter/CMakeLists.txt
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
cd greeter
|
||||
'';
|
||||
|
||||
installFlags = [
|
||||
"DESTDIR=$(out)"
|
||||
];
|
||||
|
||||
preFixup = ''
|
||||
mv $out/usr/* $out
|
||||
rm -r $out/usr
|
||||
'';
|
||||
passthru.xgreeters = linkFarm "enso-os-greeter-xgreeters" [{
|
||||
path = "${lightdm-enso-os-greeter}/share/xgreeters/pantheon-greeter.desktop";
|
||||
name = "pantheon-greeter.desktop";
|
||||
}];
|
||||
|
||||
postFixup = ''
|
||||
rm -r $out/sbin
|
||||
substituteInPlace $out/share/xgreeters/pantheon-greeter.desktop \
|
||||
--replace "pantheon-greeter" "$out/bin/pantheon-greeter"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -0,0 +1,24 @@
|
||||
diff --git a/greeter/CMakeLists.txt b/greeter/CMakeLists.txt
|
||||
index 57aebb0..ab50bff 100644
|
||||
--- a/greeter/CMakeLists.txt
|
||||
+++ b/greeter/CMakeLists.txt
|
||||
@@ -9,7 +9,6 @@ list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
|
||||
set (CONF_DIR "/etc/lightdm")
|
||||
set (DATADIR "${CMAKE_INSTALL_PREFIX}/share")
|
||||
set (PKGDATADIR "${DATADIR}/enso/greeter")
|
||||
-set (CMAKE_INSTALL_PREFIX /usr)
|
||||
set (VERSION "1.0.6")
|
||||
|
||||
|
||||
@@ -94,9 +93,9 @@ glib_compile_resources (GLIB_RESOURCES_CSS SOURCE data/css.gresource.xml)
|
||||
add_executable (pantheon-greeter ${VALA_C} ${GLIB_RESOURCES_CSS})
|
||||
target_link_libraries(pantheon-greeter m)
|
||||
|
||||
-install (TARGETS pantheon-greeter RUNTIME DESTINATION sbin)
|
||||
+install (TARGETS pantheon-greeter RUNTIME DESTINATION bin)
|
||||
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/pantheon-greeter.desktop DESTINATION share/xgreeters)
|
||||
-install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/greeter.conf DESTINATION ${CONF_DIR})
|
||||
+install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/greeter.conf DESTINATION etc/lightdm)
|
||||
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/fingerprint.svg DESTINATION ${PKGDATADIR})
|
||||
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/power.svg DESTINATION ${PKGDATADIR})
|
||||
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/checked.svg DESTINATION ${PKGDATADIR})
|
Loading…
Reference in New Issue
Block a user