From c600845d179039a030239c10b28766aa14b0eb2b Mon Sep 17 00:00:00 2001
From: xenofem <xenofem@xeno.science>
Date: Fri, 30 Jun 2023 16:33:41 -0400
Subject: [PATCH 1/2] add wrapped package to flake

---
 flake.nix | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/flake.nix b/flake.nix
index 080e2a9..fbc05ad 100644
--- a/flake.nix
+++ b/flake.nix
@@ -5,11 +5,32 @@
     pkgs = import nixpkgs {
       system = "x86_64-linux";
     };
-  in {
-    devShells.x86_64-linux.default = pkgs.mkShell {
+    buildDeps = {
       buildInputs = with pkgs; [ ffmpeg openssl ];
       nativeBuildInputs = with pkgs; [ rustc cargo pkgconfig clang ];
       LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
     };
+    pname = "screencap-bot";
+    version = "0.1";
+  in rec {
+    packages.x86_64-linux."${pname}-unwrapped" = pkgs.rustPlatform.buildRustPackage ({
+      inherit pname version;
+      src = ./.;
+      cargoLock.lockFile = ./Cargo.lock;
+    } // buildDeps);
+
+    packages.x86_64-linux.${pname} = pkgs.symlinkJoin {
+      name = "${pname}-${version}";
+      paths = [ packages.x86_64-linux."${pname}-unwrapped" ];
+      buildInputs = [ pkgs.makeWrapper ];
+      postBuild = ''
+        wrapProgram $out/bin/${pname} \
+          --prefix PATH : ${pkgs.ffmpeg}/bin
+      '';
+    };
+
+    packages.x86_64-linux.default = packages.x86_64-linux.${pname};
+
+    devShells.x86_64-linux.default = pkgs.mkShell buildDeps;
   };
 }

From 06cb5398e328d4e649e834bfad4d010881f32822 Mon Sep 17 00:00:00 2001
From: xenofem <xenofem@xeno.science>
Date: Fri, 30 Jun 2023 16:33:55 -0400
Subject: [PATCH 2/2] ignore nix build results and shows.yaml

---
 .gitignore | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitignore b/.gitignore
index ea8c4bf..a50a321 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
 /target
+/result
+/shows.yaml
\ No newline at end of file