1 { stdenvNoCC, lib, fetchFromGitHub, jq, gawk, peco, makeWrapper }:
3 stdenvNoCC.mkDerivation rec {
7 src = fetchFromGitHub {
8 owner = "AndreiUlmeyda";
11 sha256 = "12g0fd7h11hh94b2pyg3pqwbf8bc7gcnrnm1qqbf18s6z02b6ixr";
15 substituteInPlace src/oil --replace \
16 "LIBDIR=/usr/local/lib/oil" "LIBDIR=${placeholder "out"}/lib"
18 substituteInPlace src/json-to-line.jq --replace \
19 "/usr/bin/env -S jq" "${jq}/bin/jq"
21 substituteInPlace src/format-columns.awk --replace \
22 "/usr/bin/env -S awk" "${gawk}/bin/awk"
26 "BINDIR=${placeholder "out"}/bin"
27 "LIBDIR=${placeholder "out"}/lib"
30 nativeBuildInputs = [ makeWrapper ];
33 wrapProgram $out/bin/oil \
34 --prefix PATH : ${lib.makeBinPath [ peco ]}
38 description = "Search-as-you-type cli frontend for the buku bookmarks manager using peco";
39 homepage = "https://github.com/AndreiUlmeyda/oil";
40 license = licenses.gpl3Only;
41 maintainers = with maintainers; [ atila ];
43 platforms = platforms.unix;