make directories configurable
This commit is contained in:
parent
774f3195de
commit
4eeabbb770
3 changed files with 24 additions and 10 deletions
12
flake.nix
12
flake.nix
|
@ -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}";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue