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 Oct 27, 2024
1 parent 67c66d0 commit 2fc6488
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 14 deletions.
9 changes: 9 additions & 0 deletions pkgs/by-name/ar/arrpc/arrpc.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Unit]
Description=arRPC

[Service]
Type=simple
ExecStart=@arrpc@

[Install]
WantedBy=default.target
36 changes: 22 additions & 14 deletions pkgs/by-name/ar/arrpc/package.nix
Original file line number Diff line number Diff line change
@@ -1,31 +1,39 @@
{ lib
, buildNpmPackage
, fetchFromGitHub
}: buildNpmPackage rec {
{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
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=";
rev = version;
hash = "sha256-3xkqWcLhmSIH6Al2SvM9qBpdcLzEqUmUCgwYBPAgVpo=";
};

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

dontNpmBuild = true;

postInstall = ''
mkdir -p $out/share/systemd/user
substitute ${./arrpc.service} $out/share/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 ];
maintainers = with lib.maintainers; [
anomalocaris
NotAShelf
ulysseszhan
];
mainProgram = "arrpc";
};
}

0 comments on commit 2fc6488

Please sign in to comment.