REMOVING NIX

This commit is contained in:
Andrew Haynes
2026-03-26 11:32:09 -04:00
parent 9f9c4784b6
commit 25f786043a
2 changed files with 0 additions and 47 deletions
-1
View File
@@ -1 +0,0 @@
use nix
-46
View File
@@ -1,46 +0,0 @@
{
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
outputs = {
self,
nixpkgs,
}: let
system = "aarch64-darwin";
pkgs = nixpkgs.legacyPackages.${system};
in {
packages.${system}.default = pkgs.stdenv.mkDerivation {
name = "image_processor";
src = ./.;
# Add pkg-config here so CMake can find it during the build
nativeBuildInputs = [
pkgs.cmake
pkgs.pkg-config
];
buildInputs = [pkgs.libjpeg_turbo];
# Nix's default CMake phase will run, but we need to ensure
# the library actually gets installed to the nix store output
installPhase = ''
mkdir -p $out/lib $out/include
# Copy the library (looks like your build made a static lib 'libPROCESSOR.a')
cp libPROCESSOR.a $out/lib/
# Copy headers safely.
# If your headers are in a subfolder, change './*.h' to './src/*.h' etc.
# The '|| true' ensures the build doesn't crash if no headers are found.
cp *.h $out/include/ || cp src/*.h $out/include/ || true
echo "✅ Installed libPROCESSOR.a and headers to $out"
'';
};
devShells.${system}.default = pkgs.mkShell {
# This makes sure the shell also has the tools for manual debugging
nativeBuildInputs = [pkgs.pkg-config pkgs.cmake];
buildInputs = [pkgs.libjpeg_turbo];
};
};
}