From 443c6cc9525e321c588866606c5577c5bd102dc6 Mon Sep 17 00:00:00 2001 From: Aaron Pham <29749331+aarnphm@users.noreply.github.com> Date: Tue, 12 Jul 2022 14:01:03 -0700 Subject: [PATCH 1/2] fix(providers): installing haskell on arm container Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com> --- src/providers/haskell.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/providers/haskell.rs b/src/providers/haskell.rs index b56a3f0fd..e8def46f6 100644 --- a/src/providers/haskell.rs +++ b/src/providers/haskell.rs @@ -27,6 +27,16 @@ impl Provider for HaskellStackProvider { let mut setup_phase = SetupPhase::new(vec![Pkg::new("stack")]); setup_phase.add_apt_pkgs(vec![ "libgmp-dev".to_string(), + "libnuma1".to_string(), + "libnuma-dev".to_string(), + "libtinfo-dev".to_string(), + "libtinfo5".to_string(), + "libc6-dev".to_string(), + "libtinfo6".to_string(), + "llvm-11".to_string(), + "clang".to_string(), + "ninja-build".to_string(), + "zlib1g-dev".to_string(), "gcc".to_string(), "binutils".to_string(), "make".to_string(), From 346871f846192cc5f0e3bcd5808be80fa7ad6075 Mon Sep 17 00:00:00 2001 From: Aaron Pham <29749331+aarnphm@users.noreply.github.com> Date: Wed, 13 Jul 2022 02:56:35 -0700 Subject: [PATCH 2/2] chore: only add build dependencies for arm-based Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com> --- src/providers/haskell.rs | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/providers/haskell.rs b/src/providers/haskell.rs index e8def46f6..23c518ac8 100644 --- a/src/providers/haskell.rs +++ b/src/providers/haskell.rs @@ -11,6 +11,7 @@ use crate::nixpacks::{ use anyhow::Result; use super::Provider; +use std::env::consts::ARCH; pub struct HaskellStackProvider {} @@ -27,20 +28,25 @@ impl Provider for HaskellStackProvider { let mut setup_phase = SetupPhase::new(vec![Pkg::new("stack")]); setup_phase.add_apt_pkgs(vec![ "libgmp-dev".to_string(), - "libnuma1".to_string(), - "libnuma-dev".to_string(), - "libtinfo-dev".to_string(), - "libtinfo5".to_string(), - "libc6-dev".to_string(), - "libtinfo6".to_string(), - "llvm-11".to_string(), - "clang".to_string(), - "ninja-build".to_string(), - "zlib1g-dev".to_string(), "gcc".to_string(), "binutils".to_string(), "make".to_string(), ]); + if ARCH == "aarch64" { + setup_phase.add_apt_pkgs(vec![ + "libnuma1".to_string(), + "libnuma-dev".to_string(), + "libtinfo-dev".to_string(), + "libtinfo5".to_string(), + "libc6-dev".to_string(), + "libtinfo6".to_string(), + "llvm-11".to_string(), + "clang".to_string(), + "ninja-build".to_string(), + "zlib1g-dev".to_string(), + ]) + } + Ok(Some(setup_phase)) }