2021-11-07 20:29:51 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
|
|
|
, rofi
|
2023-09-05 15:44:29 +00:00
|
|
|
, tmux
|
|
|
|
, fzf
|
2022-01-25 02:15:41 +00:00
|
|
|
, mpc-cli
|
2021-11-07 20:29:51 +00:00
|
|
|
, perl
|
|
|
|
, util-linux
|
|
|
|
, libnotify
|
2023-09-05 15:44:29 +00:00
|
|
|
, perlPackages
|
2021-11-07 20:29:51 +00:00
|
|
|
}:
|
2016-10-13 05:07:43 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2021-11-07 20:29:51 +00:00
|
|
|
pname = "clerk";
|
2023-09-05 15:44:29 +00:00
|
|
|
version = "unstable-2023-01-14";
|
2016-10-13 05:07:43 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "carnager";
|
|
|
|
repo = "clerk";
|
2023-09-05 15:44:29 +00:00
|
|
|
rev = "90c0e702fc4f8b65f0ced7b8944c063629e3686d";
|
|
|
|
hash = "sha256-nkm1vJaWgN8gOkmAbsjPfstax8TwUSkEzYKJ1iEz1hM";
|
2016-10-13 05:07:43 +00:00
|
|
|
};
|
|
|
|
|
2023-09-05 15:44:29 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace clerk_rating_client.service \
|
|
|
|
--replace "/usr" "$out"
|
|
|
|
'';
|
|
|
|
|
2021-02-07 09:17:39 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2023-09-05 15:44:29 +00:00
|
|
|
|
|
|
|
buildInputs = with perlPackages; [
|
|
|
|
perl
|
|
|
|
DataMessagePack
|
|
|
|
DataSectionSimple
|
|
|
|
ConfigSimple
|
|
|
|
TryTiny
|
|
|
|
IPCRun
|
|
|
|
HTTPDate
|
|
|
|
FileSlurper
|
|
|
|
ArrayUtils
|
|
|
|
NetMPD
|
|
|
|
];
|
2016-10-13 05:07:43 +00:00
|
|
|
|
2017-08-10 13:49:56 +00:00
|
|
|
dontBuild = true;
|
2016-10-13 05:07:43 +00:00
|
|
|
|
2021-03-25 10:35:40 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
2023-09-05 15:44:29 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
install -D clerk.pl $out/bin/clerk
|
|
|
|
install -D clerk_rating_client $out/bin/clerk_rating_client
|
|
|
|
install -D clerk_rating_client.service $out/lib/systemd/user/clerk_rating_client.service
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = let
|
|
|
|
binPath = lib.makeBinPath [
|
|
|
|
libnotify
|
|
|
|
mpc-cli
|
|
|
|
rofi
|
|
|
|
tmux
|
|
|
|
fzf
|
|
|
|
util-linux
|
|
|
|
];
|
|
|
|
in
|
|
|
|
''
|
|
|
|
wrapProgram $out/bin/clerk --set PERL5LIB $PERL5LIB --prefix PATH : "${binPath}"
|
|
|
|
wrapProgram $out/bin/clerk_rating_client --set PERL5LIB $PERL5LIB --prefix PATH : "${binPath}"
|
|
|
|
'';
|
2016-10-13 05:07:43 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2023-09-05 15:44:29 +00:00
|
|
|
description = "An MPD client based on rofi/fzf";
|
2021-11-07 20:29:51 +00:00
|
|
|
homepage = "https://github.com/carnager/clerk";
|
|
|
|
license = licenses.mit;
|
2023-09-05 15:44:29 +00:00
|
|
|
maintainers = with maintainers; [ anderspapitto rewine ];
|
|
|
|
mainProgram = "clerk";
|
2016-10-13 05:07:43 +00:00
|
|
|
};
|
|
|
|
}
|