about summary refs log tree commit diff
path: root/pkgs/by-name/ra/raffi/package.nix
blob: d32478ba7069a380efcbefecefb7189de38e35da (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ lib
, fetchFromGitHub
, rustPlatform
, makeBinaryWrapper
, fuzzel
, additionalPrograms ? [ ]
}:

rustPlatform.buildRustPackage rec {
  pname = "raffi";
  version = "0.4.0";

  src = fetchFromGitHub {
    owner = "chmouel";
    repo = "raffi";
    rev = "v${version}";
    hash = "sha256-i4PM82vGb9Z2pwW006114/h9crokVLUpLxNjr7tgAU8=";
  };

  cargoHash = "sha256-DS56H2XjEgdXC9TKLjwyfLpFHB9dUThhr8pNFEJuAZE=";

  nativeBuildInputs = [
    makeBinaryWrapper
  ];

  postFixup = ''
    wrapProgram $out/bin/raffi \
      --prefix PATH : ${lib.makeBinPath ([ fuzzel ] ++ additionalPrograms)}
  '';

  meta = {
    description = "Fuzzel launcher based on yaml configuration";
    homepage = "https://github.com/chmouel/raffi";
    changelog = "https://github.com/chmouel/raffi/releases/tag/v${version}";
    license = with lib.licenses; [ asl20 ];
    maintainers = with lib.maintainers; [ aos ];
    mainProgram = "raffi";
    platforms = lib.platforms.linux;
  };
}