From 1b432980ae3ecfd8dec0b02460024e13ddc636d2 Mon Sep 17 00:00:00 2001
From: Able <abl3theabove@gmail.com>
Date: Wed, 19 Mar 2025 17:26:23 -0500
Subject: [PATCH] Changes

---
 rlbuild/src/environ/pkg_environ.rs | 13 +++++++++++--
 rlbuild/src/packages.rs            |  6 ++++--
 2 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/rlbuild/src/environ/pkg_environ.rs b/rlbuild/src/environ/pkg_environ.rs
index 86a482a..87f7395 100644
--- a/rlbuild/src/environ/pkg_environ.rs
+++ b/rlbuild/src/environ/pkg_environ.rs
@@ -36,13 +36,22 @@ pub fn extend_environ<'a>(mut env: Environ<'a>) -> Environ<'a> {
                     .map(|d| match d {
                         Expr::List(dep_list) => {
                             if dep_list.len() != 2 {
-                                return Err(RispError::Reason("dependency must have source".to_string()));
+                                return Err(RispError::Reason("dependency must have type and source".to_string()));
                             }
+                            let dep_type = match &dep_list[0] {
+                                Expr::Symbol(s) => s.clone(),
+                                _ => return Err(RispError::Reason("dependency type must be a symbol".to_string())),
+                            };
                             let source = match &dep_list[1] {
                                 Expr::Str(s) => s.clone(),
                                 _ => return Err(RispError::Reason("dependency source must be a string".to_string())),
                             };
-                            Ok(Dependency { source })
+                            match dep_type.as_str() {
+                                "library" => Ok(Dependency::Library { source }),
+                                "binary" => Ok(Dependency::Binary { source }),
+                                "source" => Ok(Dependency::Source { source }),
+                                _ => Err(RispError::Reason(format!("Unknown dependency type: {}", dep_type))),
+                            }
                         }
                         _ => Err(RispError::Reason("dependency must be a list".to_string())),
                     })
diff --git a/rlbuild/src/packages.rs b/rlbuild/src/packages.rs
index 4d7c2e1..77fefab 100644
--- a/rlbuild/src/packages.rs
+++ b/rlbuild/src/packages.rs
@@ -8,8 +8,10 @@ pub struct Package {
 }
 
 #[derive(Debug, Clone)]
-pub struct Dependency {
-    pub source: String,
+pub enum Dependency {
+    Library { source: String },
+    Binary { source: String },
+    Source { source: String },
 }
 
 impl Package {