Unverified Commit 055b5a79 authored by MithicSpirit's avatar MithicSpirit
Browse files

hyprshutdown: track releases rather than unstable commits

This is possible now that v0.1.0 has been released. Note that this
commit does not include any actual updates.

This also permits us to use versionCheckHook, which removes the need for
the runCommand test.
parent 1470e0b0
Loading
Loading
Loading
Loading
+8 −16
Original line number Diff line number Diff line
@@ -13,17 +13,17 @@
  hyprgraphics,
  cairo,
  nix-update-script,
  testers,
  versionCheckHook,
}:

gcc15Stdenv.mkDerivation (finalAttrs: {
  pname = "hyprshutdown";
  version = "0-unstable-2026-01-27";
  version = "0.1.0";

  src = fetchFromGitHub {
    owner = "hyprwm";
    repo = "hyprshutdown";
    rev = "9f18be9c4e1a484c65b22dd53280815dc79a5a56";
    tag = "v${finalAttrs.version}";
    hash = "sha256-dp5lyZzKsjdqJLfwr0S4ILets8eu1kLfBB2y/LxspsU=";
  };

@@ -43,20 +43,12 @@ gcc15Stdenv.mkDerivation (finalAttrs: {
    (glaze.override { enableSSL = false; })
  ];

  doInstallCheck = true;
  nativeInstallCheckInputs = [ versionCheckHook ];
  versionCheckProgramArg = "--help";

  passthru = {
    updateScript = nix-update-script {
      # TODO: remove when stable release available
      extraArgs = [ "--version=branch" ];
    };
    tests = {
      help = testers.runCommand {
        name = "${finalAttrs.pname}-help-test";
        nativeBuildInputs = [ finalAttrs.finalPackage ];
        script = ''
          '${finalAttrs.meta.mainProgram}' --help && touch "$out"
        '';
      };
    };
    updateScript = nix-update-script { };
  };

  meta = {