Files
video-streaming-poc/flake.nix
2025-10-10 20:18:37 -05:00

64 lines
1.4 KiB
Nix

{
description = "video-streaming-poc devShell";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in with pkgs;
let
opencv-custom = pkgs.opencv.override {
enableGtk3 = true;
#enableCuda = true;
enablePython = true;
};
in {
devShells.default = mkShell rec {
buildInputs = [
# Meson
meson
pkg-config
ninja
# Boost
boost
# OpenCV
opencv-custom
];
};
packages.default = pkgs.stdenv.mkDerivation {
name = "video-streaming-poc";
src = ./.;
nativeBuildInputs = with pkgs; [
meson
ninja
pkg-config
];
buildInputs = with pkgs; [
boost
opencv-custom
];
buildPhase = ''
meson setup --wipe build
meson compile
'';
installPhase = ''
mkdir -p $out/bin
cp build/client $out/bin/
cp build/server $out/bin/
'';
};
}
);
}