2024-10-17 00:34:54 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fzf,
|
|
|
|
installShellFiles,
|
|
|
|
libnotify,
|
|
|
|
makeWrapper,
|
|
|
|
mpc,
|
|
|
|
perlPackages,
|
|
|
|
rofi,
|
|
|
|
stdenv,
|
|
|
|
tmux,
|
|
|
|
unstableGitUpdater,
|
|
|
|
util-linux,
|
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";
|
2024-11-03 00:06:28 +00:00
|
|
|
version = "0-unstable-2024-02-20";
|
2016-10-13 05:07:43 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "carnager";
|
|
|
|
repo = "clerk";
|
2024-11-03 00:06:28 +00:00
|
|
|
rev = "a3c4a0b88597e8194a5b29a20bc9eab1a12f4de9";
|
|
|
|
hash = "sha256-UlACMlH4iYj1l/GIpBf6Pb7MuRHWlgxLPgAqzc+Zol8=";
|
2016-10-13 05:07:43 +00:00
|
|
|
};
|
|
|
|
|
2024-10-17 00:34:54 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
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;
|
|
|
|
|
2024-10-17 00:34:54 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace clerk_rating_client.service \
|
|
|
|
--replace "/usr" "$out"
|
|
|
|
'';
|
|
|
|
|
2023-09-05 15:44:29 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
2024-10-17 00:34:54 +00:00
|
|
|
mv clerk.pl clerk
|
|
|
|
installBin clerk clerk_rating_client
|
2023-09-05 15:44:29 +00:00
|
|
|
install -D clerk_rating_client.service $out/lib/systemd/user/clerk_rating_client.service
|
2024-10-17 00:34:54 +00:00
|
|
|
|
2023-09-05 15:44:29 +00:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2024-10-17 00:34:54 +00:00
|
|
|
postFixup =
|
|
|
|
let
|
|
|
|
binPath = lib.makeBinPath [
|
|
|
|
fzf
|
|
|
|
libnotify
|
|
|
|
mpc
|
|
|
|
rofi
|
|
|
|
tmux
|
|
|
|
util-linux
|
|
|
|
];
|
|
|
|
in
|
|
|
|
''
|
|
|
|
pushd $out/bin
|
|
|
|
for f in clerk clerk_rating_client; do
|
|
|
|
wrapProgram $f \
|
|
|
|
--prefix PATH : "${binPath}" \
|
|
|
|
--set PERL5LIB $PERL5LIB
|
|
|
|
done
|
|
|
|
popd
|
|
|
|
'';
|
2016-10-13 05:07:43 +00:00
|
|
|
|
2024-10-17 00:34:54 +00:00
|
|
|
passthru.updateScript = unstableGitUpdater {
|
|
|
|
url = "https://github.com/carnager/clerk.git";
|
|
|
|
hardcodeZeroVersion = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = {
|
2021-11-07 20:29:51 +00:00
|
|
|
homepage = "https://github.com/carnager/clerk";
|
2024-10-17 00:34:54 +00:00
|
|
|
description = "MPD client based on rofi/fzf";
|
|
|
|
license = lib.licenses.mit;
|
2023-09-05 15:44:29 +00:00
|
|
|
mainProgram = "clerk";
|
2024-10-17 00:34:54 +00:00
|
|
|
maintainers = with lib.maintainers; [
|
|
|
|
anderspapitto
|
|
|
|
rewine
|
|
|
|
];
|
|
|
|
platforms = lib.platforms.linux;
|
2016-10-13 05:07:43 +00:00
|
|
|
};
|
|
|
|
}
|