uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
130
pkgs/desktops/pantheon/desktop/elementary-greeter/default.nix
Normal file
130
pkgs/desktops/pantheon/desktop/elementary-greeter/default.nix
Normal file
|
|
@ -0,0 +1,130 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, nix-update-script
|
||||
, linkFarm
|
||||
, substituteAll
|
||||
, elementary-greeter
|
||||
, pkg-config
|
||||
, meson
|
||||
, ninja
|
||||
, vala
|
||||
, desktop-file-utils
|
||||
, gtk3
|
||||
, granite
|
||||
, libgee
|
||||
, libhandy
|
||||
, gnome-settings-daemon
|
||||
, mutter
|
||||
, elementary-icon-theme
|
||||
, wingpanel-with-indicators
|
||||
, elementary-gtk-theme
|
||||
, nixos-artwork
|
||||
, lightdm
|
||||
, gdk-pixbuf
|
||||
, clutter-gtk
|
||||
, dbus
|
||||
, accountsservice
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "elementary-greeter";
|
||||
version = "6.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "elementary";
|
||||
repo = "greeter";
|
||||
rev = version;
|
||||
sha256 = "sha256-CY+dPSyQ/ovSdI80uEipDdnWy1KjbZnwpn9sd8HrbPQ=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./sysconfdir-install.patch
|
||||
# Needed until https://github.com/elementary/greeter/issues/360 is fixed
|
||||
(substituteAll {
|
||||
src = ./hardcode-fallback-background.patch;
|
||||
default_wallpaper = "${nixos-artwork.wallpapers.simple-dark-gray.gnomeFilePath}";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
desktop-file-utils
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
vala
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
accountsservice
|
||||
clutter-gtk # else we get could not generate cargs for mutter-clutter-2
|
||||
elementary-icon-theme
|
||||
gnome-settings-daemon
|
||||
gdk-pixbuf
|
||||
granite
|
||||
gtk3
|
||||
libgee
|
||||
libhandy
|
||||
lightdm
|
||||
mutter
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
# A hook does this but after wrapGAppsHook so the files never get wrapped.
|
||||
"--sbindir=${placeholder "out"}/bin"
|
||||
# baked into the program for discovery of the greeter configuration
|
||||
"--sysconfdir=/etc"
|
||||
"-Dgsd-dir=${gnome-settings-daemon}/libexec/" # trailing slash is needed
|
||||
];
|
||||
|
||||
preFixup = ''
|
||||
gappsWrapperArgs+=(
|
||||
# dbus-launch needed in path
|
||||
--prefix PATH : "${dbus}/bin"
|
||||
|
||||
# for `io.elementary.wingpanel -g`
|
||||
--prefix PATH : "${wingpanel-with-indicators}/bin"
|
||||
|
||||
# for the compositor
|
||||
--prefix PATH : "$out/bin"
|
||||
|
||||
# the GTK theme is hardcoded
|
||||
--prefix XDG_DATA_DIRS : "${elementary-gtk-theme}/share"
|
||||
|
||||
# the icon theme is hardcoded
|
||||
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS"
|
||||
)
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
# Use NixOS default wallpaper
|
||||
substituteInPlace $out/etc/lightdm/io.elementary.greeter.conf \
|
||||
--replace "#default-wallpaper=/usr/share/backgrounds/elementaryos-default" \
|
||||
"default-wallpaper=${nixos-artwork.wallpapers.simple-dark-gray.gnomeFilePath}"
|
||||
|
||||
substituteInPlace $out/share/xgreeters/io.elementary.greeter.desktop \
|
||||
--replace "Exec=io.elementary.greeter" "Exec=$out/bin/io.elementary.greeter"
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script {
|
||||
attrPath = "pantheon.${pname}";
|
||||
};
|
||||
|
||||
xgreeters = linkFarm "pantheon-greeter-xgreeters" [{
|
||||
path = "${elementary-greeter}/share/xgreeters/io.elementary.greeter.desktop";
|
||||
name = "io.elementary.greeter.desktop";
|
||||
}];
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "LightDM Greeter for Pantheon";
|
||||
homepage = "https://github.com/elementary/greeter";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = teams.pantheon.members;
|
||||
mainProgram = "io.elementary.greeter";
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
diff --git a/src/Widgets/BackgroundImage.vala b/src/Widgets/BackgroundImage.vala
|
||||
index ae9431c..f0f2a49 100644
|
||||
--- a/src/Widgets/BackgroundImage.vala
|
||||
+++ b/src/Widgets/BackgroundImage.vala
|
||||
@@ -9,7 +9,7 @@ public class Greeter.BackgroundImage : Gtk.EventBox {
|
||||
|
||||
public BackgroundImage (string? path) {
|
||||
if (path == null) {
|
||||
- path = "/usr/share/backgrounds/elementaryos-default";
|
||||
+ path = "@default_wallpaper@";
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -19,7 +19,7 @@ public class Greeter.BackgroundImage : Gtk.EventBox {
|
||||
critical ("Fallback to default wallpaper");
|
||||
|
||||
try {
|
||||
- full_pixbuf = new Gdk.Pixbuf.from_file ("/usr/share/backgrounds/elementaryos-default");
|
||||
+ full_pixbuf = new Gdk.Pixbuf.from_file ("@default_wallpaper@");
|
||||
} catch (GLib.Error e) {
|
||||
critical (e.message);
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
From 7bb0d507cbb0122f167127b9f6460bd53d8234de Mon Sep 17 00:00:00 2001
|
||||
From: worldofpeace <worldofpeace@users.noreply.github.com>
|
||||
Date: Sat, 16 Mar 2019 16:07:24 -0400
|
||||
Subject: [PATCH] 'sysconfdir' will be etc not /etc for install
|
||||
|
||||
---
|
||||
data/meson.build | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/data/meson.build b/data/meson.build
|
||||
index fd54b75..b1120ae 100644
|
||||
--- a/data/meson.build
|
||||
+++ b/data/meson.build
|
||||
@@ -20,7 +20,7 @@ i18n.merge_file (
|
||||
|
||||
install_data(
|
||||
meson.project_name() + '.conf',
|
||||
- install_dir: join_paths(get_option('sysconfdir'), 'lightdm')
|
||||
+ install_dir: join_paths(get_option('prefix'), 'etc', 'lightdm')
|
||||
)
|
||||
|
||||
test (
|
||||
--
|
||||
2.19.2
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue