38 lines
829 B
Nix
38 lines
829 B
Nix
|
{ pkgs, lib, buildEnv, stdenv, darknet, ... }:
|
||
|
|
||
|
with lib;
|
||
|
buildEnv {
|
||
|
name = "yolov3-data";
|
||
|
paths = let
|
||
|
cfg = stdenv.mkDerivation {
|
||
|
name = "yolov3-cfg";
|
||
|
src = darknet;
|
||
|
phases = [ "installPhase" ];
|
||
|
installPhase = ''
|
||
|
mkdir -p $out
|
||
|
cp $src/cfg/yolov3.cfg $out/yolov3.cfg
|
||
|
'';
|
||
|
};
|
||
|
|
||
|
labels = stdenv.mkDerivation {
|
||
|
name = "yolov3-labels";
|
||
|
src = darknet;
|
||
|
phases = [ "installPhase" ];
|
||
|
installPhase = ''
|
||
|
mkdir -p $out
|
||
|
cp $src/data/coco.names $out/labels
|
||
|
'';
|
||
|
};
|
||
|
|
||
|
weights = stdenv.mkDerivation {
|
||
|
name = "yolov3-weights";
|
||
|
src = ./data;
|
||
|
phases = [ "installPhase" ];
|
||
|
installPhase = ''
|
||
|
mkdir -p $out
|
||
|
cp $src/yolov3.weights $out/yolov3.weights
|
||
|
'';
|
||
|
};
|
||
|
in [ cfg labels weights ];
|
||
|
}
|