Unverified Commit 4cbaf25e authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

gsmartcontrol: 1.1.4 -> 2.0.2 (#402821)

parents 389eeb69 8251ed86
Loading
Loading
Loading
Loading
+17 −18
Original line number Diff line number Diff line
{
  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;
  };
}
})