make directories configurable

This commit is contained in:
xenofem 2022-04-16 01:57:34 -04:00
parent 774f3195de
commit 4eeabbb770
3 changed files with 24 additions and 10 deletions

View file

@ -36,10 +36,20 @@
})
{ inherit pkgs; };
in rec {
packages.${name} = project.rootCrate.build;
packages.${name} = pkgs.symlinkJoin {
inherit name;
paths = [ packages."${name}-unwrapped" ];
buildInputs = [ pkgs.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/${name} \
--set STATIC_DIR ${./static}
'';
};
defaultPackage = packages.${name};
packages."${name}-unwrapped" = project.rootCrate.build;
devShell = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ rustc cargo cargo-audit stdenv.cc ];
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";