about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/rlaunch/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/misc/rlaunch/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/misc/rlaunch/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/misc/rlaunch/default.nix b/nixpkgs/pkgs/applications/misc/rlaunch/default.nix
new file mode 100644
index 000000000000..da90dbe5d74a
--- /dev/null
+++ b/nixpkgs/pkgs/applications/misc/rlaunch/default.nix
@@ -0,0 +1,34 @@
+{ lib
+, fetchFromGitHub
+, fetchpatch
+, rustPlatform
+, xorg
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "rlaunch";
+  version = "1.3.14";
+
+  src = fetchFromGitHub {
+    owner = "PonasKovas";
+    repo = pname;
+    rev = version;
+    hash = "sha256-PyCR/ob947W+6T56y1se74aNy1avJDb2ELyv2aGf1og=";
+  };
+
+  cargoHash = "sha256-/a1SjGDcauOy1vmXvmWBZmag8G+T2au+Z7b0y1Vj3C8=";
+
+  # The x11_dl crate dlopen()s these libraries, so we have to inject them into rpath.
+  postFixup = ''
+    patchelf --set-rpath ${lib.makeLibraryPath (with xorg; [ libX11 libXft libXinerama ])} $out/bin/rlaunch
+  '';
+
+  meta = with lib; {
+    description = "A lightweight application launcher for X11";
+    homepage = "https://github.com/PonasKovas/rlaunch";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ danc86 ];
+    mainProgram = "rlaunch";
+  };
+}