about summary refs log tree commit diff
path: root/packages/bruh.nix
blob: 68aefd2cb9bc383e097dcd8e27d9b30e37d7bc8d (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
{
  alsa-utils,
  fetchFromGitHub,
  lib,
  stdenv,
}:
stdenv.mkDerivation (finalAttrs: {
  pname = "bruh";
  version = "2.1";

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

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

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

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

Consider giving Nix/NixOS a try! <3