11 stdenv.mkDerivation rec {
12 pname = "photonvision";
16 "x86_64-linux" = fetchurl {
17 url = "https://github.com/PhotonVision/photonvision/releases/download/v${version}/photonvision-v${version}-linuxx64.jar";
18 hash = "sha256-t9drkGFA3IurZqWAkzEaONVJkp5JHMEFBBW50r+SD68=";
20 "aarch64-linux" = fetchurl {
21 url = "https://github.com/PhotonVision/photonvision/releases/download/v${version}/photonvision-v${version}-linuxarm64.jar";
22 hash = "sha256-ninCVxse0x6lBA2NL3kwMeuHAeNzSa9rdP2dnmMNFgc=";
24 }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
28 nativeBuildInputs = [ makeWrapper ];
33 install -D $src $out/lib/photonvision.jar
35 makeWrapper ${temurin-jre-bin-11}/bin/java $out/bin/photonvision \
36 --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ stdenv.cc.cc suitesparse ]} \
37 --prefix PATH : ${lib.makeBinPath [ temurin-jre-bin-11 bash.out ]} \
38 --add-flags "-jar $out/lib/photonvision.jar"
44 starts-web-server = nixosTests.photonvision;
48 description = "Free, fast, and easy-to-use computer vision solution for the FIRST Robotics Competition";
49 homepage = "https://photonvision.org/";
50 license = licenses.gpl3;
51 maintainers = with maintainers; [ max-niederman ];
52 mainProgram = "photonvision";
53 platforms = [ "x86_64-linux" "aarch64-linux" ];