locigenesis/default.nix

23 lines
471 B
Nix

{ 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
'';
}