about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgbtb <goodbetterthebeast3@gmail.com>2023-01-01 19:29:42 +1000
committergbtb <goodbetterthebeast3@gmail.com>2023-01-17 10:14:49 +1000
commit2dedd1b74305b00b7bf9a1c25789a569b9dba2e1 (patch)
treedb720ff4371f9de80478ab8f65bbd1bc3f673999
parente989ef9671a711bdff9a096e4d5e6a495e631920 (diff)
gsmartcontrol: 1.1.3 -> 1.1.4
-rw-r--r--pkgs/tools/misc/gsmartcontrol/default.nix12
-rw-r--r--pkgs/tools/misc/gsmartcontrol/fix-paths.patch25
2 files changed, 8 insertions, 29 deletions
diff --git a/pkgs/tools/misc/gsmartcontrol/default.nix b/pkgs/tools/misc/gsmartcontrol/default.nix
index e52ae44a83f9f..a1c163f6784e8 100644
--- a/pkgs/tools/misc/gsmartcontrol/default.nix
+++ b/pkgs/tools/misc/gsmartcontrol/default.nix
@@ -1,18 +1,22 @@
 { fetchurl, lib, stdenv, smartmontools, autoreconfHook, gettext, gtkmm3, pkg-config, wrapGAppsHook, pcre-cpp, gnome }:
 
 stdenv.mkDerivation rec {
-  version="1.1.3";
   pname = "gsmartcontrol";
+  version = "1.1.4";
 
   src = fetchurl {
-    url = "mirror://sourceforge/gsmartcontrol/gsmartcontrol-${version}.tar.bz2";
-    sha256 = "1a8j7dkml9zvgpk83xcdajfz7g6mmpmm5k86dl5sjc24zb7n4kxn";
+    url = "https://github.com/ashaduri/gsmartcontrol/releases/download/v${version}/gsmartcontrol-${version}.tar.bz2";
+    sha256 = "sha256-/ECfK4qEzEC7ED1sgkAbnUwBgtWjsiPJOVnHrWYZGEc=";
   };
 
   patches = [
     ./fix-paths.patch
   ];
 
+  postPatch = ''
+    substituteInPlace data/org.gsmartcontrol.policy --replace "/usr/sbin" $out/bin
+  '';
+
   nativeBuildInputs = [ autoreconfHook gettext pkg-config wrapGAppsHook ];
   buildInputs = [ gtkmm3 pcre-cpp gnome.adwaita-icon-theme ];
 
@@ -35,7 +39,7 @@ stdenv.mkDerivation rec {
       It allows you to inspect the drive's SMART data to determine its health,
       as well as run various tests on it.
     '';
-    homepage = "https://gsmartcontrol.sourceforge.io/";
+    homepage = "https://gsmartcontrol.shaduri.dev/";
     license = lib.licenses.gpl2Plus;
     maintainers = with lib.maintainers; [qknight];
     platforms = with lib.platforms; linux;
diff --git a/pkgs/tools/misc/gsmartcontrol/fix-paths.patch b/pkgs/tools/misc/gsmartcontrol/fix-paths.patch
index 905b63bee0c4f..b8ec19eb25633 100644
--- a/pkgs/tools/misc/gsmartcontrol/fix-paths.patch
+++ b/pkgs/tools/misc/gsmartcontrol/fix-paths.patch
@@ -1,14 +1,3 @@
-diff --git a/configure.ac b/configure.ac
---- a/configure.ac
-+++ b/configure.ac
-@@ -475,6 +475,7 @@
- 
- 
- AC_CONFIG_FILES([ data/gsmartcontrol.desktop data/gsmartcontrol.appdata.xml \
-+	data/org.gsmartcontrol.policy \
- 	data/nsis/distribution.txt data/nsis/gsmartcontrol.nsi \
- 	debian.dist/changelog \
- 	src/gsc_winres.rc src/gsmartcontrol.exe.manifest \
 diff --git a/data/gsmartcontrol-root.in b/data/gsmartcontrol-root.in
 --- a/data/gsmartcontrol-root.in
 +++ b/data/gsmartcontrol-root.in
@@ -30,20 +19,6 @@ diff --git a/data/gsmartcontrol-root.in b/data/gsmartcontrol-root.in
  export PATH="$EXTRA_PATHS:$PATH"
  
  
-diff --git a/data/org.gsmartcontrol.policy b/data/org.gsmartcontrol.policy.in
-rename from data/org.gsmartcontrol.policy
-rename to data/org.gsmartcontrol.policy.in
---- a/data/org.gsmartcontrol.policy
-+++ b/data/org.gsmartcontrol.policy.in
-@@ -12,7 +12,7 @@
-       <allow_inactive>auth_admin</allow_inactive>
-       <allow_active>auth_admin</allow_active>
-     </defaults>
--    <annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/gsmartcontrol</annotate>
-+    <annotate key="org.freedesktop.policykit.exec.path">@prefix@/bin/gsmartcontrol</annotate>
-     <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
-   </action>
- 
 diff --git a/src/Makefile.am b/src/Makefile.am
 --- a/src/Makefile.am
 +++ b/src/Makefile.am