nixpkgs/pkgs/by-name/cl/clerk/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

103 lines
1.8 KiB
Nix
Raw Normal View History

{
lib,
fetchFromGitHub,
fzf,
installShellFiles,
libnotify,
makeWrapper,
mpc,
perlPackages,
rofi,
stdenv,
tmux,
unstableGitUpdater,
util-linux,
}:
2016-10-13 05:07:43 +00:00
stdenv.mkDerivation {
pname = "clerk";
version = "0-unstable-2024-02-20";
2016-10-13 05:07:43 +00:00
src = fetchFromGitHub {
owner = "carnager";
repo = "clerk";
rev = "a3c4a0b88597e8194a5b29a20bc9eab1a12f4de9";
hash = "sha256-UlACMlH4iYj1l/GIpBf6Pb7MuRHWlgxLPgAqzc+Zol8=";
2016-10-13 05:07:43 +00:00
};
nativeBuildInputs = [
installShellFiles
makeWrapper
];
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;
postPatch = ''
substituteInPlace clerk_rating_client.service \
--replace "/usr" "$out"
'';
installPhase = ''
runHook preInstall
mv clerk.pl clerk
installBin clerk clerk_rating_client
install -D clerk_rating_client.service $out/lib/systemd/user/clerk_rating_client.service
runHook postInstall
'';
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
passthru.updateScript = unstableGitUpdater {
url = "https://github.com/carnager/clerk.git";
hardcodeZeroVersion = true;
};
meta = {
homepage = "https://github.com/carnager/clerk";
description = "MPD client based on rofi/fzf";
license = lib.licenses.mit;
mainProgram = "clerk";
maintainers = with lib.maintainers; [
anderspapitto
rewine
];
platforms = lib.platforms.linux;
2016-10-13 05:07:43 +00:00
};
}