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:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,158 @@
{ lib
, stdenv
, fetchFromGitHub
, nix-update-script
, desktop-file-utils
, pkg-config
, writeScript
, gnome-keyring
, gnome-session
, wingpanel
, orca
, onboard
, elementary-default-settings
, gnome-settings-daemon
, runtimeShell
, writeText
, meson
, ninja
}:
let
#
# ─── ENSURES PLANK GETS ELEMENTARY'S DEFAULT DOCKITEMS ────────────────────────────
#
#
# Upstream relies on /etc/skel to initiate a new users home directory with plank's dockitems.
#
# That is not possible within nixos, but we can achieve this easily with a simple script that copies
# them. We then use a xdg autostart and initalize it during the "EarlyInitialization" phase of a gnome session
# which is most appropriate for installing files into $HOME.
#
dockitems-script = writeScript "dockitems-script" ''
#!${runtimeShell}
elementary_default_settings="${elementary-default-settings}"
dock_items="$elementary_default_settings/etc/skel/.config/plank/dock1/launchers"/*
if [ ! -d "$HOME/.config/plank/dock1" ]; then
echo "Instantiating default Plank Dockitems..."
mkdir -p "$HOME/.config/plank/dock1/launchers"
cp -r --no-preserve=mode,ownership $dock_items "$HOME/.config/plank/dock1/launchers/"
else
echo "Plank Dockitems already instantiated"
fi
'';
dockitemAutostart = writeText "default-elementary-dockitems.desktop" ''
[Desktop Entry]
Type=Application
Name=Instantiate Default elementary dockitems
Exec=${dockitems-script}
StartupNotify=false
NoDisplay=true
OnlyShowIn=Pantheon;
X-GNOME-Autostart-Phase=EarlyInitialization
'';
executable = writeScript "pantheon" ''
# gnome-session can find RequiredComponents for `pantheon` session (notably pantheon's patched g-s-d autostarts)
export XDG_CONFIG_DIRS=@out@/etc/xdg:$XDG_CONFIG_DIRS
# Make sure we use our gtk-3.0/settings.ini
export XDG_CONFIG_DIRS=${elementary-default-settings}/etc:$XDG_CONFIG_DIRS
# * gnome-session can find the `pantheon' session
# * use pantheon-mimeapps.list
export XDG_DATA_DIRS=@out@/share:$XDG_DATA_DIRS
# Start pantheon session. Keep in sync with upstream
exec ${gnome-session}/bin/gnome-session --builtin --session=pantheon "$@"
'';
# Absolute path patched version of the upstream xsession
xsession = writeText "pantheon.desktop" ''
[Desktop Entry]
Name=Pantheon
Comment=This session provides elementary experience
Exec=@out@/libexec/pantheon
TryExec=${wingpanel}/bin/io.elementary.wingpanel
Icon=
DesktopNames=Pantheon
Type=Application
'';
in
stdenv.mkDerivation rec {
pname = "elementary-session-settings";
version = "6.0.0";
src = fetchFromGitHub {
owner = "elementary";
repo = "session-settings";
rev = version;
sha256 = "1faglpa7q3a4335gnd074a3lnsdspyjdnskgy4bfnf6xmwjx7kjx";
};
nativeBuildInputs = [
desktop-file-utils
meson
ninja
pkg-config
];
buildInputs = [
gnome-keyring
gnome-settings-daemon
onboard
orca
];
mesonFlags = [
"-Dmimeapps-list=false"
"-Dfallback-session=GNOME"
"-Ddetect-program-prefixes=true"
"--sysconfdir=${placeholder "out"}/etc"
];
postInstall = ''
# our mimeapps patched from upstream to exclude:
# * evince.desktop -> org.gnome.Evince.desktop
mkdir -p $out/share/applications
cp -av ${./pantheon-mimeapps.list} $out/share/applications/pantheon-mimeapps.list
# instantiates pantheon's dockitems
cp "${dockitemAutostart}" $out/etc/xdg/autostart/default-elementary-dockitems.desktop
# script `Exec` to start pantheon
mkdir -p $out/libexec
substitute ${executable} $out/libexec/pantheon --subst-var out
chmod +x $out/libexec/pantheon
# absolute path patched xsession
substitute ${xsession} $out/share/xsessions/pantheon.desktop --subst-var out
'';
passthru = {
updateScript = nix-update-script {
attrPath = "pantheon.${pname}";
};
providedSessions = [
"pantheon"
];
};
meta = with lib; {
description = "Session settings for elementary";
homepage = "https://github.com/elementary/session-settings";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = teams.pantheon.members;
};
}

View file

@ -0,0 +1,168 @@
[Default Applications]
application/ogg=io.elementary.music.desktop
application/oxps=org.gnome.Evince.desktop
application/pdf=org.gnome.Evince.desktop
application/postscript=org.gnome.Evince.desktop
application/vnd.ms-xpsdocument=org.gnome.Evince.desktop
application/vnd.rn-realmedia=io.elementary.videos.desktop
application/x-ar=org.gnome.FileRoller.desktop
application/x-arj=org.gnome.FileRoller.desktop
application/x-bzdvi=org.gnome.Evince.desktop
application/x-bzip-compressed-tar=org.gnome.FileRoller.desktop
application/x-bzip=org.gnome.FileRoller.desktop
application/x-bzpdf=org.gnome.Evince.desktop
application/x-bzpostscript=org.gnome.Evince.desktop
application/x-cbr=org.gnome.Evince.desktop
application/x-cbt=org.gnome.Evince.desktop
application/x-cbz=org.gnome.Evince.desktop
application/x-compress=org.gnome.FileRoller.desktop
application/x-compressed-tar=org.gnome.FileRoller.desktop
application/x-dvi=org.gnome.Evince.desktop
application/x-ear=org.gnome.FileRoller.desktop
application/x-extension-m4a=io.elementary.videos.desktop
application/x-extension-mp4=io.elementary.videos.desktop
application/x-flac=io.elementary.music.desktop
application/x-gtar=org.gnome.FileRoller.desktop
application/x-gzdvi=org.gnome.Evince.desktop
application/x-gzip=org.gnome.FileRoller.desktop
application/x-gzpdf=org.gnome.Evince.desktop
application/x-gzpostscript=org.gnome.Evince.desktop
application/x-lha=org.gnome.FileRoller.desktop
application/x-lhz=org.gnome.FileRoller.desktop
application/x-lzop=org.gnome.FileRoller.desktop
application/x-matroska=io.elementary.videos.desktop
application/x-ogg=io.elementary.music.desktop
application/x-perl=io.elementary.code.desktop
application/x-rar-compressed=org.gnome.FileRoller.desktop
application/x-rar=org.gnome.FileRoller.desktop
application/x-rpm=org.gnome.FileRoller.desktop
application/x-tar=org.gnome.FileRoller.desktop
application/x-war=org.gnome.FileRoller.desktop
application/x-xz-compressed-tar=org.gnome.FileRoller.desktop
application/x-xz=org.gnome.FileRoller.desktop
application/x-xzpdf=org.gnome.Evince.desktop
application/x-zip-compressed=org.gnome.FileRoller.desktop
application/x-zip=org.gnome.FileRoller.desktop
application/x-zoo=org.gnome.FileRoller.desktop
application/xhtml+xml=org.gnome.Epiphany.desktop
application/zip=org.gnome.FileRoller.desktop
audio/3gpp=io.elementary.music.desktop
audio/ac3=io.elementary.music.desktop
audio/AMR-WB=io.elementary.music.desktop
audio/AMR=io.elementary.music.desktop
audio/basic=io.elementary.music.desktop
audio/flac=io.elementary.music.desktop
audio/midi=io.elementary.music.desktop
audio/mp4=io.elementary.music.desktop
audio/mpeg=io.elementary.music.desktop
audio/mpegurl=io.elementary.music.desktop
audio/ogg=io.elementary.music.desktop
audio/prs.sid=io.elementary.music.desktop
audio/vnd.rn-realaudio=io.elementary.music.desktop
audio/x-ape=io.elementary.music.desktop
audio/x-flac=io.elementary.music.desktop
audio/x-gsm=io.elementary.music.desktop
audio/x-it=io.elementary.music.desktop
audio/x-m4a=io.elementary.music.desktop
audio/x-matroska=io.elementary.music.desktop
audio/x-mod=io.elementary.music.desktop
audio/x-mp3=io.elementary.music.desktop
audio/x-mpeg=io.elementary.music.desktop
audio/x-mpegurl=io.elementary.music.desktop
audio/x-ms-asf=io.elementary.music.desktop
audio/x-ms-asx=io.elementary.music.desktop
audio/x-ms-wax=io.elementary.music.desktop
audio/x-ms-wma=io.elementary.music.desktop
audio/x-musepack=io.elementary.music.desktop
audio/x-pn-aiff=io.elementary.music.desktop
audio/x-pn-au=io.elementary.music.desktop
audio/x-pn-realaudio-plugin=io.elementary.music.desktop
audio/x-pn-realaudio=io.elementary.music.desktop
audio/x-pn-wav=io.elementary.music.desktop
audio/x-pn-windows-acm=io.elementary.music.desktop
audio/x-real-audio=io.elementary.music.desktop
audio/x-realaudio=io.elementary.music.desktop
audio/x-sbc=io.elementary.music.desktop
audio/x-scpls=io.elementary.music.desktop
audio/x-speex=io.elementary.music.desktop
audio/x-tta=io.elementary.music.desktop
audio/x-vorbis+ogg=io.elementary.music.desktop
audio/x-vorbis=io.elementary.music.desktop
audio/x-wav=io.elementary.music.desktop
audio/x-wavpack=io.elementary.music.desktop
audio/x-xm=io.elementary.music.desktop
image/bmp=io.elementary.photos-viewer.desktop
image/gif=io.elementary.photos-viewer.desktop
image/jpeg=io.elementary.photos-viewer.desktop
image/jpg=io.elementary.photos-viewer.desktop
image/pjpeg=io.elementary.photos-viewer.desktop
image/png=io.elementary.photos-viewer.desktop
image/tiff=io.elementary.photos-viewer.desktop
image/vnd.djvu=org.gnome.Evince.desktop
image/vnd.rn-realpix=io.elementary.videos.desktop
image/webp=io.elementary.photos-viewer.desktop
image/x-bmp=io.elementary.photos-viewer.desktop
image/x-bzeps=org.gnome.Evince.desktop
image/x-eps=org.gnome.Evince.desktop
image/x-gzeps=org.gnome.Evince.desktop
image/x-png=io.elementary.photos-viewer.desktop
inode/directory=io.elementary.files.desktop
misc/ultravox=io.elementary.videos.desktop
multipart/x-zip=org.gnome.FileRoller.desktop
text/calendar=io.elementary.calendar.desktop
text/html=org.gnome.Epiphany.desktop
text/mathml=io.elementary.code.desktop
text/plain=io.elementary.code.desktop
text/x-chdr=io.elementary.code.desktop
text/x-csrc=io.elementary.code.desktop
text/x-dtd=io.elementary.code.desktop
text/x-java=io.elementary.code.desktop
text/x-python=io.elementary.code.desktop
text/x-sql=io.elementary.code.desktop
text/xml=io.elementary.code.desktop
video/3gpp=io.elementary.videos.desktop
video/dv=io.elementary.videos.desktop
video/fli=io.elementary.videos.desktop
video/flv=io.elementary.videos.desktop
video/mp2t=io.elementary.videos.desktop
video/mp4=io.elementary.videos.desktop
video/mp4v-es=io.elementary.videos.desktop
video/mpeg=io.elementary.videos.desktop
video/msvideo=io.elementary.videos.desktop
video/ogg=io.elementary.videos.desktop
video/quicktime=io.elementary.videos.desktop
video/vivo=io.elementary.videos.desktop
video/vnd.divx=io.elementary.videos.desktop
video/vnd.rn-realvideo=io.elementary.videos.desktop
video/vnd.vivo=io.elementary.videos.desktop
video/webm=io.elementary.videos.desktop
video/x-anim=io.elementary.videos.desktop
video/x-avi=io.elementary.videos.desktop
video/x-flc=io.elementary.videos.desktop
video/x-fli=io.elementary.videos.desktop
video/x-flic=io.elementary.videos.desktop
video/x-flv=io.elementary.videos.desktop
video/x-m4v=io.elementary.videos.desktop
video/x-matroska=io.elementary.videos.desktop
video/x-mpeg=io.elementary.videos.desktop
video/x-ms-asf=io.elementary.videos.desktop
video/x-ms-asx=io.elementary.videos.desktop
video/x-ms-wm=io.elementary.videos.desktop
video/x-ms-wmv=io.elementary.videos.desktop
video/x-ms-wmx=io.elementary.videos.desktop
video/x-ms-wvx=io.elementary.videos.desktop
video/x-msvideo=io.elementary.videos.desktop
video/x-nsv=io.elementary.videos.desktop
video/x-ogm+ogg=io.elementary.videos.desktop
video/x-theora+ogg=io.elementary.videos.desktop
video/x-totem-stream=io.elementary.videos.desktop
x-content/image-dcf=io.elementary.photos.desktop
x-content/image-picturecd=io.elementary.photos.desktop
x-content/video-dvd=io.elementary.videos.desktop
x-content/video-svcd=io.elementary.videos.desktop
x-content/video-vcd=io.elementary.videos.desktop
x-scheme-handler/http=org.gnome.Epiphany.desktop
x-scheme-handler/https=org.gnome.Epiphany.desktop
x-scheme-handler/mailto=io.elementary.mail.desktop
x-scheme-handler/trash=io.elementary.files.desktop