diff --git a/pkgs/tools/misc/gsmartcontrol/default.nix b/pkgs/tools/misc/gsmartcontrol/default.nix
index e52ae44a83f..a1c163f6784 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 905b63bee0c..b8ec19eb256 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 @@
- auth_admin
- auth_admin
-
-- /usr/sbin/gsmartcontrol
-+ @prefix@/bin/gsmartcontrol
- true
-
-
diff --git a/src/Makefile.am b/src/Makefile.am
--- a/src/Makefile.am
+++ b/src/Makefile.am