about summary refs log tree commit diff
path: root/users/azahi/pkgs/bruh/default.nix
blob: 5eecf94b62031b9fba10c899636f27765504014f (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
41
42
{ pkgs
, lib
, ...
}:

let
  inherit (pkgs)
    alsa-utils
    fetchFromGitHub
    stdenv
    ;
in

stdenv.mkDerivation (finalAttrs: {
  pname = "bruh";
  version = "2.1";

  src =
    with finalAttrs;
    fetchFromGitHub {
      owner = "kejpies";
      repo = pname;
      rev = version;
      hash = "sha256-Uw6Qes0IZkkfBchFnvnX9l1ZG5T5pyExmV7yUJLPOJ0=";
    };

  postPatch = ''
    substituteInPlace bruh.c \
      --replace-fail "aplay" "${alsa-utils}/bin/aplay"
  '';

  makeFlags = [ "PREFIX=$(out)" ];

  meta = with lib; {
    description = "Bruh sound, but as a program";
    inherit (finalAttrs.src.meta) homepage;
    license = licenses.gpl3Only;
    platforms = platforms.linux;
    maintainers = with maintainers; [ azahi ];
    mainProgram = "bruh";
  };
})