2020-10-21 18:18:43 +02:00
|
|
|
{
|
|
|
|
stdenv
|
2022-09-01 16:27:29 +02:00
|
|
|
, lib
|
2020-10-21 18:18:43 +02:00
|
|
|
}:
|
|
|
|
|
2021-05-03 12:48:49 +02:00
|
|
|
datasets:
|
2020-10-21 18:18:43 +02:00
|
|
|
|
2022-09-01 16:27:29 +02:00
|
|
|
with lib;
|
2020-10-21 18:18:43 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2021-05-03 12:48:49 +02:00
|
|
|
name = "merged-dataset";
|
2020-10-21 18:18:43 +02:00
|
|
|
preferLocalBuild = true;
|
|
|
|
phases = [ "installPhase" ];
|
2021-05-03 12:48:49 +02:00
|
|
|
inherit datasets;
|
2020-10-21 18:18:43 +02:00
|
|
|
installPhase = ''
|
2021-05-03 12:48:49 +02:00
|
|
|
mkdir -p $out
|
|
|
|
n=1
|
|
|
|
for d in $datasets; do
|
|
|
|
ln -s $d $out/$n
|
|
|
|
let n=n+1
|
|
|
|
cat $d/dataset >> $out/dataset
|
|
|
|
done
|
2020-10-21 18:18:43 +02:00
|
|
|
'';
|
|
|
|
}
|