Commit 203f135f authored by Yiyu Zhou's avatar Yiyu Zhou
Browse files

mpris-timer: cleanup

parent a15df52a
Loading
Loading
Loading
Loading
+7 −15
Original line number Diff line number Diff line
@@ -12,21 +12,19 @@
  wrapGAppsHook4,
}:

buildGoModule rec {
buildGoModule (finalAttrs: {
  pname = "mpris-timer";
  version = "2.2.2";

  src = fetchFromGitHub {
    owner = "efogdev";
    repo = "mpris-timer";
    tag = version;
    tag = finalAttrs.version;
    hash = "sha256-JuOBLm7+/zOSNhH+sBqvUQV0+AhTAmr+UxhPFtt0NU8=";
  };

  vendorHash = "sha256-Htni2cMc1vYewVL8oOXL2gPS4h+S3d5y4i5yAZdqFJo=";

  strictDeps = true;

  nativeBuildInputs = [
    pkg-config
    glib
@@ -45,13 +43,10 @@ buildGoModule rec {
    "-w"
  ];

  tags = [
    "wayland"
  ];
  tags = [ "wayland" ];

  postInstall = ''
    mv $out/bin/cmd $out/bin/mpris-timer

    mv $out/bin/{cmd,mpris-timer}
    install -Dm644 internal/ui/res/icon.svg $out/share/icons/hicolor/scalable/apps/io.github.efogdev.mpris-timer.svg
    install -Dm644 misc/io.github.efogdev.mpris-timer.desktop -t $out/share/applications
    install -Dm644 misc/io.github.efogdev.mpris-timer.metainfo.xml -t $out/share/metainfo
@@ -59,9 +54,7 @@ buildGoModule rec {
    glib-compile-schemas $out/share/glib-2.0/schemas
  '';

  passthru = {
    updateScript = nix-update-script { };
  };
  passthru.updateScript = nix-update-script { };

  meta = {
    description = "Timer app with seamless GNOME integration";
@@ -72,7 +65,6 @@ buildGoModule rec {
      getchoo
    ];
    mainProgram = "mpris-timer";
    # Always uses ALSA
    platforms = lib.platforms.linux;
    platforms = lib.platforms.linux; # Always uses ALSA
  };
}
})