Skip to content

Commit

Permalink
arrpc: 3.4.0 -> 3.5.0; add systemd user service
Browse files Browse the repository at this point in the history
  • Loading branch information
UlyssesZh committed Dec 5, 2024
1 parent 376975b commit a611045
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 9 deletions.
13 changes: 13 additions & 0 deletions pkgs/by-name/ar/arrpc/arrpc.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# https://aur.archlinux.org/cgit/aur.git/tree/arrpc.service?h=arrpc

[Unit]
Description=arRPC Discord RPC daemon
After=network.target

[Service]
Type=simple
ExecStart=@arrpc@
Restart=on-failure

[Install]
WantedBy=default.target
21 changes: 12 additions & 9 deletions pkgs/by-name/ar/arrpc/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,34 @@
}:
buildNpmPackage rec {
pname = "arrpc";
version = "3.4.0";
version = "3.5.0";

src = fetchFromGitHub {
owner = "OpenAsar";
repo = "arrpc";
# Release commits are not tagged
# release: 3.4.0
rev = "cca93db585dedf8acc1423f5e2db215de95c4c3b";
hash = "sha256-SeegrCgbjfVxG/9xfOcdfbVdDssZOhjBRnDipu6L7Wg=";
tag = version;
hash = "sha256-3xkqWcLhmSIH6Al2SvM9qBpdcLzEqUmUCgwYBPAgVpo=";
};

npmDepsHash = "sha256-S9cIyTXqCp8++Yj3VjBbcStOjzjgd0Cq7KL7NNzZFpY=";
npmDepsHash = "sha256-lw6pngFC2Pnk+I8818TOTwN4r+8IsjvdMYIyTsTi49g=";

dontNpmBuild = true;

postInstall = ''
mkdir -p $out/lib/systemd/user
substitute ${./arrpc.service} $out/lib/systemd/user/arrpc.service \
--subst-var-by arrpc $out/bin/arrpc
'';

meta = {
# ideally we would do blob/${version}/changelog.md here
# upstream does not tag releases
changelog = "https://github.com/OpenAsar/arrpc/blob/${src.rev}/changelog.md";
changelog = "https://github.com/OpenAsar/arrpc/blob/${version}/changelog.md";
description = "Open Discord RPC server for atypical setups";
homepage = "https://arrpc.openasar.dev/";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
anomalocaris
NotAShelf
ulysseszhan
];
mainProgram = "arrpc";
};
Expand Down

0 comments on commit a611045

Please sign in to comment.