about summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--packages/lampray.nix13
1 files changed, 13 insertions, 0 deletions
diff --git a/packages/lampray.nix b/packages/lampray.nix
index 876bf60..e9caa13 100644
--- a/packages/lampray.nix
+++ b/packages/lampray.nix
@@ -6,9 +6,12 @@
   fetchFromGitHub,
   lib,
   lz4,
+  makeWrapper,
   ninja,
+  p7zip,
   pkg-config,
   stdenv,
+  zenity,
 }:
 stdenv.mkDerivation {
   pname = "lampray";
@@ -24,6 +27,7 @@ stdenv.mkDerivation {
   nativeBuildInputs = [
     autoPatchelfHook
     cmake
+    makeWrapper
     ninja
     pkg-config
   ];
@@ -34,10 +38,17 @@ stdenv.mkDerivation {
     lz4
   ];
 
+  postPatch = ''
+    substituteInPlace Lampray/Control/lampConfig.cpp \
+      --replace-fail '/usr/libexec/p7zip/7z.so' '${p7zip.lib}/lib/p7zip/7z.so'
+  '';
+
   installPhase = ''
     runHook preInstall
 
     install -Dm755 Lampray $out/bin/lampray
+    wrapProgram $out/bin/lampray \
+      --prefix PATH : "${lib.makeBinPath [ zenity ]}"
 
     runHook postInstall
   '';
@@ -54,5 +65,7 @@ stdenv.mkDerivation {
     ];
     platforms = [ "x86_64-linux" ];
     maintainers = with maintainers; [ azahi ];
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+    mainProgram = "lampray";
   };
 }

Consider giving Nix/NixOS a try! <3