about summary refs log tree commit diff
path: root/overlays/patches/nixpkgs-wayland/pkgs/wldash/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'overlays/patches/nixpkgs-wayland/pkgs/wldash/default.nix')
-rw-r--r--overlays/patches/nixpkgs-wayland/pkgs/wldash/default.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/overlays/patches/nixpkgs-wayland/pkgs/wldash/default.nix b/overlays/patches/nixpkgs-wayland/pkgs/wldash/default.nix
new file mode 100644
index 000000000000..d7afca489853
--- /dev/null
+++ b/overlays/patches/nixpkgs-wayland/pkgs/wldash/default.nix
@@ -0,0 +1,41 @@
+{ lib, rustPlatform, fetchFromGitHub
+, pkgconfig
+, dbus, libpulseaudio, alsaLib, libxkbcommon
+, wayland, fontconfig
+}:
+
+let
+  metadata = import ./metadata.nix;
+  libraryPath = lib.makeLibraryPath [ wayland libxkbcommon ];
+in
+rustPlatform.buildRustPackage rec {
+  name = "wldash-${version}";
+  version = metadata.rev;
+
+  src = fetchFromGitHub {
+    owner = "kennylevinsen";
+    repo = "wldash";
+    rev = metadata.rev;
+    sha256 = metadata.sha256;
+  };
+
+  cargoSha256 = metadata.cargoSha256;
+
+  nativeBuildInputs = [ pkgconfig ];
+
+  buildInputs = [ dbus libpulseaudio alsaLib fontconfig ];
+
+  dontPatchELF = true;
+  
+  postInstall = ''
+    patchelf --set-rpath ${libraryPath}:$(patchelf --print-rpath $out/bin/wldash) $out/bin/wldash
+  '';
+
+  meta = with lib; {
+    description = "Wayland launcher/dashboard";
+    homepage = "https://wldash.org";
+    licence = licenses.gpl3;
+    maintainers = with maintainers; [ alexarice ];
+    platforms = [ "x86_64-linux" "i686-linux" ];
+  };
+}