Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 100 lines 1.9 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 fzf, 5 installShellFiles, 6 libnotify, 7 makeWrapper, 8 mpc, 9 perlPackages, 10 rofi, 11 stdenv, 12 tmux, 13 unstableGitUpdater, 14 util-linux, 15}: 16 17stdenv.mkDerivation { 18 pname = "clerk"; 19 version = "0-unstable-2024-02-20"; 20 21 src = fetchFromGitHub { 22 owner = "carnager"; 23 repo = "clerk"; 24 rev = "a3c4a0b88597e8194a5b29a20bc9eab1a12f4de9"; 25 hash = "sha256-UlACMlH4iYj1l/GIpBf6Pb7MuRHWlgxLPgAqzc+Zol8="; 26 }; 27 28 nativeBuildInputs = [ 29 installShellFiles 30 makeWrapper 31 ]; 32 33 buildInputs = with perlPackages; [ 34 perl 35 DataMessagePack 36 DataSectionSimple 37 ConfigSimple 38 TryTiny 39 IPCRun 40 HTTPDate 41 FileSlurper 42 ArrayUtils 43 NetMPD 44 ]; 45 46 dontBuild = true; 47 48 strictDeps = true; 49 50 postPatch = '' 51 substituteInPlace clerk_rating_client.service \ 52 --replace "/usr" "$out" 53 ''; 54 55 installPhase = '' 56 runHook preInstall 57 58 mv clerk.pl clerk 59 installBin clerk clerk_rating_client 60 install -D clerk_rating_client.service $out/lib/systemd/user/clerk_rating_client.service 61 62 runHook postInstall 63 ''; 64 65 postFixup = 66 let 67 binPath = lib.makeBinPath [ 68 fzf 69 libnotify 70 mpc 71 rofi 72 tmux 73 util-linux 74 ]; 75 in 76 '' 77 for f in clerk clerk_rating_client; do 78 wrapProgram $out/bin/$f \ 79 --prefix PATH : "${binPath}" \ 80 --set PERL5LIB $PERL5LIB 81 done 82 ''; 83 84 passthru.updateScript = unstableGitUpdater { 85 url = "https://github.com/carnager/clerk.git"; 86 hardcodeZeroVersion = true; 87 }; 88 89 meta = { 90 homepage = "https://github.com/carnager/clerk"; 91 description = "MPD client based on rofi/fzf"; 92 license = lib.licenses.mit; 93 mainProgram = "clerk"; 94 maintainers = with lib.maintainers; [ 95 anderspapitto 96 rewine 97 ]; 98 platforms = lib.platforms.linux; 99 }; 100}