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
69
pkgs/desktops/pantheon/apps/switchboard/default.nix
Normal file
69
pkgs/desktops/pantheon/apps/switchboard/default.nix
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, nix-update-script
|
||||
, pkg-config
|
||||
, meson
|
||||
, python3
|
||||
, ninja
|
||||
, vala
|
||||
, gtk3
|
||||
, libgee
|
||||
, libhandy
|
||||
, granite
|
||||
, gettext
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "switchboard";
|
||||
version = "6.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "elementary";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-QMh9m6Xc0BeprZHrOgcmSireWb8Ja7Td0COYMgYw+5M=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
gettext
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
python3
|
||||
vala
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
granite
|
||||
gtk3
|
||||
libgee
|
||||
libhandy
|
||||
];
|
||||
|
||||
patches = [
|
||||
./plugs-path-env.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
chmod +x meson/post_install.py
|
||||
patchShebangs meson/post_install.py
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script {
|
||||
attrPath = "pantheon.${pname}";
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Extensible System Settings app for Pantheon";
|
||||
homepage = "https://github.com/elementary/switchboard";
|
||||
license = licenses.lgpl21Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = teams.pantheon.members;
|
||||
mainProgram = "io.elementary.switchboard";
|
||||
};
|
||||
}
|
||||
21
pkgs/desktops/pantheon/apps/switchboard/plugs-path-env.patch
Normal file
21
pkgs/desktops/pantheon/apps/switchboard/plugs-path-env.patch
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
diff --git a/lib/PlugsManager.vala b/lib/PlugsManager.vala
|
||||
index 8b21e7b..bc36321 100644
|
||||
--- a/lib/PlugsManager.vala
|
||||
+++ b/lib/PlugsManager.vala
|
||||
@@ -36,7 +36,15 @@ public class Switchboard.PlugsManager : GLib.Object {
|
||||
|
||||
private PlugsManager () {
|
||||
plugs = new Gee.LinkedList<Switchboard.Plug> ();
|
||||
- var base_folder = File.new_for_path (Build.PLUGS_DIR);
|
||||
+
|
||||
+ var plugs_path = Environment.get_variable("SWITCHBOARD_PLUGS_PATH");
|
||||
+ if (plugs_path != null) {
|
||||
+ debug ("SWITCHBOARD_PLUGS_PATH set to %s", plugs_path);
|
||||
+ } else {
|
||||
+ critical ("SWITCHBOARD_PLUGS_PATH not set");
|
||||
+ }
|
||||
+
|
||||
+ var base_folder = File.new_for_path (plugs_path);
|
||||
find_plugins (base_folder);
|
||||
}
|
||||
|
||||
63
pkgs/desktops/pantheon/apps/switchboard/wrapper.nix
Normal file
63
pkgs/desktops/pantheon/apps/switchboard/wrapper.nix
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{ wrapGAppsHook
|
||||
, glib
|
||||
, lib
|
||||
, stdenv
|
||||
, xorg
|
||||
, switchboard
|
||||
, switchboardPlugs
|
||||
, plugs
|
||||
# Only useful to disable for development testing.
|
||||
, useDefaultPlugs ? true
|
||||
, testName ? null
|
||||
}:
|
||||
|
||||
let
|
||||
selectedPlugs =
|
||||
if plugs == null then switchboardPlugs
|
||||
else plugs ++ (lib.optionals useDefaultPlugs switchboardPlugs);
|
||||
|
||||
testingName = lib.optionalString (testName != null) "${testName}-";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "${testingName}${switchboard.pname}-with-plugs";
|
||||
inherit (switchboard) version;
|
||||
|
||||
src = null;
|
||||
|
||||
paths = [
|
||||
switchboard
|
||||
] ++ selectedPlugs;
|
||||
|
||||
passAsFile = [ "paths" ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
glib
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
buildInputs = lib.forEach selectedPlugs (x: x.buildInputs)
|
||||
++ selectedPlugs;
|
||||
|
||||
dontUnpack = true;
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
for i in $(cat $pathsPath); do
|
||||
${xorg.lndir}/bin/lndir -silent $i $out
|
||||
done
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
gappsWrapperArgs+=(
|
||||
--set SWITCHBOARD_PLUGS_PATH "$out/lib/switchboard"
|
||||
)
|
||||
'';
|
||||
|
||||
inherit (switchboard) meta;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue