Files
almond-bench/flake.nix
T
2026-07-18 17:18:13 +02:00

32 lines
773 B
Nix

{
description = "benchmarking languages with mandelbrot image generation";
inputs.nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in {
devShells.${system}.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
clang
janet
];
};
packages.${system}.c = pkgs.stdenv.mkDerivation {
name = "mandelbrot-c";
src = ./src;
nativeBuildInputs = [ pkgs.clang ];
buildPhase = ''
cc mandelbrot.c -o mandelbrot-c -lm
'';
installPhase = ''
mkdir -p $out/bin/
cp mandelbrot-c $out/bin/
'';
};
};
}