about summary refs log tree commit diff
path: root/users/azahi/pkgs/bruh
diff options
context:
space:
mode:
Diffstat (limited to 'users/azahi/pkgs/bruh')
-rw-r--r--users/azahi/pkgs/bruh/default.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/users/azahi/pkgs/bruh/default.nix b/users/azahi/pkgs/bruh/default.nix
new file mode 100644
index 000000000000..5eecf94b6203
--- /dev/null
+++ b/users/azahi/pkgs/bruh/default.nix
@@ -0,0 +1,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";
+  };
+})