Merge pull request #150340 from justinas/freon-45
gnomeExtensions.freon: 44 -> 45, patch binary paths
This commit is contained in:
commit
0dadd5fabb
@ -1,8 +1,20 @@
|
||||
{ lib, stdenv, fetchFromGitHub, glib }:
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, glib
|
||||
, substituteAll
|
||||
, hddtemp
|
||||
, liquidctl
|
||||
, lm_sensors
|
||||
, netcat-gnu
|
||||
, nvme-cli
|
||||
, procps
|
||||
, smartmontools
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gnome-shell-extension-freon";
|
||||
version = "44";
|
||||
version = "45";
|
||||
|
||||
passthru = {
|
||||
extensionUuid = "freon@UshakovVasilii_Github.yahoo.com";
|
||||
@ -13,11 +25,20 @@ stdenv.mkDerivation rec {
|
||||
owner = "UshakovVasilii";
|
||||
repo = "gnome-shell-extension-freon";
|
||||
rev = "EGO-${version}";
|
||||
sha256 = "sha256-4DYAIC9N5id3vQe0WaOFP+MymsrPK18hbYqO4DjG+2U=";
|
||||
sha256 = "sha256-tPb7SzHSwvz7VV+kZTmcw1eAdtL1J7FJ3BOtg4Us8jc=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ glib ];
|
||||
|
||||
patches = [
|
||||
(substituteAll {
|
||||
src = ./fix_paths.patch;
|
||||
inherit hddtemp liquidctl lm_sensors procps smartmontools;
|
||||
netcat = netcat-gnu;
|
||||
nvmecli = nvme-cli;
|
||||
})
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
glib-compile-schemas --strict --targetdir="freon@UshakovVasilii_Github.yahoo.com/schemas" "freon@UshakovVasilii_Github.yahoo.com/schemas"
|
||||
|
85
pkgs/desktops/gnome/extensions/freon/fix_paths.patch
Normal file
85
pkgs/desktops/gnome/extensions/freon/fix_paths.patch
Normal file
@ -0,0 +1,85 @@
|
||||
diff --git a/freon@UshakovVasilii_Github.yahoo.com/hddtempUtil.js b/freon@UshakovVasilii_Github.yahoo.com/hddtempUtil.js
|
||||
index e5d1d6d..856654b 100644
|
||||
--- a/freon@UshakovVasilii_Github.yahoo.com/hddtempUtil.js
|
||||
+++ b/freon@UshakovVasilii_Github.yahoo.com/hddtempUtil.js
|
||||
@@ -7,7 +7,7 @@ var HddtempUtil = class extends CommandLineUtil.CommandLineUtil {
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
- let hddtempArgv = GLib.find_program_in_path('hddtemp');
|
||||
+ let hddtempArgv = GLib.find_program_in_path('@hddtemp@/bin/hddtemp');
|
||||
if(hddtempArgv) {
|
||||
// check if this user can run hddtemp directly.
|
||||
if(!GLib.spawn_command_line_sync(hddtempArgv)[3]){
|
||||
@@ -19,8 +19,8 @@ var HddtempUtil = class extends CommandLineUtil.CommandLineUtil {
|
||||
// doesn't seem to be the case… is it running as a daemon?
|
||||
// Check first for systemd
|
||||
let systemctl = GLib.find_program_in_path('systemctl');
|
||||
- let pidof = GLib.find_program_in_path('pidof');
|
||||
- let nc = GLib.find_program_in_path('nc');
|
||||
+ let pidof = GLib.find_program_in_path('@procps@/bin/pidof');
|
||||
+ let nc = GLib.find_program_in_path('@netcat@/bin/nc');
|
||||
let pid = undefined;
|
||||
|
||||
if(systemctl) {
|
||||
@@ -35,7 +35,7 @@ var HddtempUtil = class extends CommandLineUtil.CommandLineUtil {
|
||||
|
||||
// systemd isn't used on this system, try sysvinit instead
|
||||
if(!pid && pidof) {
|
||||
- let output = GLib.spawn_command_line_sync("pidof hddtemp")[1].toString().trim();
|
||||
+ let output = GLib.spawn_command_line_sync("@procps@/bin/pidof hddtemp")[1].toString().trim();
|
||||
if(output.length)
|
||||
pid = Number(output.trim());
|
||||
}
|
||||
diff --git a/freon@UshakovVasilii_Github.yahoo.com/liquidctlUtil.js b/freon@UshakovVasilii_Github.yahoo.com/liquidctlUtil.js
|
||||
index 766bf62..7cd4e94 100644
|
||||
--- a/freon@UshakovVasilii_Github.yahoo.com/liquidctlUtil.js
|
||||
+++ b/freon@UshakovVasilii_Github.yahoo.com/liquidctlUtil.js
|
||||
@@ -8,7 +8,7 @@ const commandLineUtil = Me.imports.commandLineUtil;
|
||||
var LiquidctlUtil = class extends commandLineUtil.CommandLineUtil {
|
||||
constructor() {
|
||||
super();
|
||||
- const path = GLib.find_program_in_path('liquidctl');
|
||||
+ const path = GLib.find_program_in_path('@liquidctl@/bin/liquidctl');
|
||||
this._argv = path ? [path, 'status', '--json'] : null;
|
||||
}
|
||||
|
||||
diff --git a/freon@UshakovVasilii_Github.yahoo.com/nvmecliUtil.js b/freon@UshakovVasilii_Github.yahoo.com/nvmecliUtil.js
|
||||
index ae2ea93..2349b9e 100644
|
||||
--- a/freon@UshakovVasilii_Github.yahoo.com/nvmecliUtil.js
|
||||
+++ b/freon@UshakovVasilii_Github.yahoo.com/nvmecliUtil.js
|
||||
@@ -3,7 +3,7 @@ const GLib = imports.gi.GLib;
|
||||
const Me = imports.misc.extensionUtils.getCurrentExtension();
|
||||
|
||||
function getNvmeData (argv){
|
||||
- const nvme = GLib.find_program_in_path('nvme')
|
||||
+ const nvme = GLib.find_program_in_path('@nvmecli@/bin/nvme')
|
||||
return JSON.parse(GLib.spawn_command_line_sync(`${nvme} ${argv} -o json`)[1].toString())
|
||||
}
|
||||
|
||||
diff --git a/freon@UshakovVasilii_Github.yahoo.com/sensorsUtil.js b/freon@UshakovVasilii_Github.yahoo.com/sensorsUtil.js
|
||||
index 62fa580..c017748 100644
|
||||
--- a/freon@UshakovVasilii_Github.yahoo.com/sensorsUtil.js
|
||||
+++ b/freon@UshakovVasilii_Github.yahoo.com/sensorsUtil.js
|
||||
@@ -7,7 +7,7 @@ var SensorsUtil = class extends CommandLineUtil.CommandLineUtil {
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
- let path = GLib.find_program_in_path('sensors');
|
||||
+ let path = GLib.find_program_in_path('@lm_sensors@/bin/sensors');
|
||||
// -A: Do not show adapter -j: JSON output
|
||||
this._argv = path ? [path, '-A', '-j'] : null;
|
||||
}
|
||||
diff --git a/freon@UshakovVasilii_Github.yahoo.com/smartctlUtil.js b/freon@UshakovVasilii_Github.yahoo.com/smartctlUtil.js
|
||||
index 03d469b..6057a3b 100644
|
||||
--- a/freon@UshakovVasilii_Github.yahoo.com/smartctlUtil.js
|
||||
+++ b/freon@UshakovVasilii_Github.yahoo.com/smartctlUtil.js
|
||||
@@ -3,7 +3,7 @@ const GLib = imports.gi.GLib;
|
||||
const Me = imports.misc.extensionUtils.getCurrentExtension();
|
||||
const ByteArray = imports.byteArray;
|
||||
function getSmartData (argv){
|
||||
- const smartctl = GLib.find_program_in_path('smartctl')
|
||||
+ const smartctl = GLib.find_program_in_path('@smartmontools@/bin/smartctl')
|
||||
return JSON.parse(ByteArray.toString( GLib.spawn_command_line_sync(`${smartctl} ${argv} -j`)[1] ))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user