diff --git a/pkgs/by-name/gs/gsmartcontrol/package.nix b/pkgs/by-name/gs/gsmartcontrol/package.nix index 36f616d94cc1..27bff9bb23b3 100644 --- a/pkgs/by-name/gs/gsmartcontrol/package.nix +++ b/pkgs/by-name/gs/gsmartcontrol/package.nix @@ -1,10 +1,9 @@ { - fetchurl, lib, stdenv, + fetchFromGitHub, smartmontools, - autoreconfHook, - gettext, + cmake, gtkmm3, pkg-config, wrapGAppsHook3, @@ -12,29 +11,28 @@ adwaita-icon-theme, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "gsmartcontrol"; - version = "1.1.4"; + version = "2.0.2"; - src = fetchurl { - url = "https://github.com/ashaduri/gsmartcontrol/releases/download/v${version}/gsmartcontrol-${version}.tar.bz2"; - sha256 = "sha256-/ECfK4qEzEC7ED1sgkAbnUwBgtWjsiPJOVnHrWYZGEc="; + src = fetchFromGitHub { + owner = "ashaduri"; + repo = "gsmartcontrol"; + tag = "v${finalAttrs.version}"; + hash = "sha256-eLzwFZ1PYqijFTxos9Osf7A2v4C8toM+TGV4/bU82NE="; }; - patches = [ - ./fix-paths.patch - ]; - postPatch = '' - substituteInPlace data/org.gsmartcontrol.policy --replace "/usr/sbin" $out/bin + substituteInPlace data/gsmartcontrol.in.desktop \ + --replace-fail "@CMAKE_INSTALL_FULL_BINDIR@/" "" ''; nativeBuildInputs = [ - autoreconfHook - gettext + cmake pkg-config wrapGAppsHook3 ]; + buildInputs = [ gtkmm3 pcre-cpp @@ -60,9 +58,10 @@ 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.shaduri.dev/"; + homepage = "https://gsmartcontrol.shaduri.dev"; + mainProgram = "gsmartcontrol"; license = lib.licenses.gpl2Plus; maintainers = with lib.maintainers; [ qknight ]; - platforms = with lib.platforms; linux; + platforms = lib.platforms.linux; }; -} +})