zaphyra's git: nixfiles

zaphyra's nixfiles

commit 387960832efea10c43536deadec379eb26c5fd73
parent f87d8e37779a6ebf163e43379052887e1836c893
Author: Katja Ramona Sophie Kwast (zaphyra) <git@zaphyra.eu>
Date: Thu, 18 Jun 2026 19:16:56 +0200

packages: add `librepods-rust`
1 file changed, 57 insertions(+), 0 deletions(-)
A
packages/librepods-rust/package.nix
|
57
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
diff --git a/packages/librepods-rust/package.nix b/packages/librepods-rust/package.nix
@@ -0,0 +1,57 @@
+{
+  lib,
+  rustPlatform,
+  fetchFromGitHub,
+  makeWrapper,
+  pkg-config,
+  dbus,
+  libpulseaudio,
+  libxkbcommon,
+  wayland,
+  ...
+}:
+
+rustPlatform.buildRustPackage (finalAttrs: {
+  pname = "librepods";
+  version = "0.0.0";
+  cargoHash = "sha256-17dE+oYvECU4f1SL6LHS95sXEea/Z0VgTPQ4u6TZTic=";
+
+  src =
+    (fetchFromGitHub {
+      owner = "kavishdevar";
+      repo = finalAttrs.pname;
+      hash = "sha256-EuIYvBqBtpgutVqPOLIO3E9OhVzQ5q5TDoz/F+9MHEE=";
+      rev = "linux/rust";
+    })
+    + "/linux-rust";
+
+  nativeBuildInputs = [
+    pkg-config
+    makeWrapper
+  ];
+
+  buildInputs = [
+    dbus
+    libpulseaudio
+    libxkbcommon
+    wayland
+  ];
+
+  postFixup = ''
+    for executable in $(find $out/bin -type f -executable); do
+      wrapProgram $executable \
+        --prefix LD_LIBRARY_PATH : ${
+          lib.makeLibraryPath [
+            wayland
+            libxkbcommon
+          ]
+        }
+    done
+  '';
+
+  meta = {
+    mainProgram = "librepods";
+    platforms = lib.platforms.linux;
+    maintainers = with lib.maintainers; [ zaphyra ];
+  };
+})