diff options
author | rewine <luhongxu@deepin.org> | 2023-09-05 23:44:29 +0800 |
---|---|---|
committer | Jörg Thalheim <Mic92@users.noreply.github.com> | 2023-09-06 22:31:11 +0200 |
commit | 1652c8cf87800bdf16a368e92b0163db77689e0f (patch) | |
tree | 82f48c37e10a713b26dde0f9652f307cc63f21be | |
parent | b13b23f4f02dde765d246ec8fe796e2af8b3f34f (diff) | |
download | nixpkgs-1652c8cf87800bdf16a368e92b0163db77689e0f.tar nixpkgs-1652c8cf87800bdf16a368e92b0163db77689e0f.tar.gz nixpkgs-1652c8cf87800bdf16a368e92b0163db77689e0f.tar.bz2 nixpkgs-1652c8cf87800bdf16a368e92b0163db77689e0f.tar.lz nixpkgs-1652c8cf87800bdf16a368e92b0163db77689e0f.tar.xz nixpkgs-1652c8cf87800bdf16a368e92b0163db77689e0f.tar.zst nixpkgs-1652c8cf87800bdf16a368e92b0163db77689e0f.zip |
clerk: unstable-2016-10-14 -> unstable-2023-01-14
-rw-r--r-- | pkgs/applications/audio/clerk/default.nix | 76 |
1 files changed, 50 insertions, 26 deletions
diff --git a/pkgs/applications/audio/clerk/default.nix b/pkgs/applications/audio/clerk/default.nix index 15b2ad85ea7..11f93e00b23 100644 --- a/pkgs/applications/audio/clerk/default.nix +++ b/pkgs/applications/audio/clerk/default.nix @@ -3,55 +3,79 @@ , fetchFromGitHub , makeWrapper , rofi +, tmux +, fzf , mpc-cli , perl , util-linux -, python3Packages , libnotify +, perlPackages }: stdenv.mkDerivation { pname = "clerk"; - version = "unstable-2016-10-14"; + version = "unstable-2023-01-14"; src = fetchFromGitHub { owner = "carnager"; repo = "clerk"; - rev = "875963bcae095ac1db174627183c76ebe165f787"; - sha256 = "0y045my65hr3hjyx13jrnyg6g3wb41phqb1m7azc4l6vx6r4124b"; + rev = "90c0e702fc4f8b65f0ced7b8944c063629e3686d"; + hash = "sha256-nkm1vJaWgN8gOkmAbsjPfstax8TwUSkEzYKJ1iEz1hM"; }; + postPatch = '' + substituteInPlace clerk_rating_client.service \ + --replace "/usr" "$out" + ''; + nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ python3Packages.mpd2 ]; + + buildInputs = with perlPackages; [ + perl + DataMessagePack + DataSectionSimple + ConfigSimple + TryTiny + IPCRun + HTTPDate + FileSlurper + ArrayUtils + NetMPD + ]; dontBuild = true; strictDeps = true; - installPhase = - let - binPath = lib.makeBinPath [ - libnotify - mpc-cli - perl - rofi - util-linux - ]; - in - '' - runHook preInstall - - DESTDIR=$out PREFIX=/ make install - wrapProgram $out/bin/clerk --prefix PATH : "${binPath}" - - runHook postInstall - ''; + 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}" + ''; meta = with lib; { - description = "An MPD client built on top of rofi"; + description = "An MPD client based on rofi/fzf"; homepage = "https://github.com/carnager/clerk"; license = licenses.mit; - broken = true; # not compatible with current version of rofi - maintainers = with maintainers; [ anderspapitto ]; + maintainers = with maintainers; [ anderspapitto rewine ]; + mainProgram = "clerk"; }; } |