locigenesis/default.nix

23 lines
471 B
Nix
Raw Normal View History

2021-07-06 17:20:00 +02:00
{ sources ? import ./nix/sources.nix, pkgs ? import sources.nixpkgs { } }:
with pkgs;
let
srcNoTarget = dir:
builtins.filterSource
(path: type: type != "directory" || builtins.baseNameOf path != "target")
dir;
src = srcNoTarget ./.;
in stdenv.mkDerivation {
name = "locigenesis";
phases = "installPhase";
installPhase = ''
mkdir -p $out/bin
cp -r ${src}/src $out
cp -r ${src}/data/*.rds $out
cp ${src}/generation.sh $out
'';
}