kitsune/overlay.nix

19 lines
424 B
Nix
Raw Normal View History

self: final: prev:
let
packages = self.packages.${prev.stdenv.targetPlatform.system};
in
{
kitsune = prev.stdenv.mkDerivation {
inherit (packages.main) name version meta src;
installPhase = ''
mkdir -p $out
cp -R ${packages.main}/bin $out
Fix and improve the nix flake (#512) * fix(flake): `public` assets were moved to `kitsune/assets` Signed-off-by: Harald Hoyer <harald@hoyer.xyz> * feat(flake): use mold linker Signed-off-by: Harald Hoyer <harald@hoyer.xyz> * fix(flake): fix build dependency for openssl Native deps need the tools which run on the build host (when cross compiling). Normal build deps are the libs linked to the binary. OPENSSL_NO_VENDOR ensures that openssl-sys uses the system lib. Remove the rest of the workarounds for openssl. Signed-off-by: Harald Hoyer <harald@hoyer.xyz> * fix(flake): proper `mkYarnPackage` Signed-off-by: Harald Hoyer <harald@hoyer.xyz> * feat(flake): add overlay test Signed-off-by: Harald Hoyer <harald@hoyer.xyz> * fix(flake): skip more tests Signed-off-by: Harald Hoyer <harald@hoyer.xyz> * feat(flake): use the crane nix lib https://crane.dev/ enables caching of artifacts and potentially reducing build time. Even End to End(E2E) testing could be added: https://crane.dev/examples/end-to-end-testing.html Signed-off-by: Harald Hoyer <harald@hoyer.xyz> * ci(flake): add nix github action Signed-off-by: Harald Hoyer <harald@hoyer.xyz> * ci(flake): disable `cargo check` in nix flake Left as a separate commit, so it is easy to revert. Signed-off-by: Harald Hoyer <harald@hoyer.xyz> * ci(flake): run nixci in debug build by default normal flake produces release code still. Signed-off-by: Harald Hoyer <harald@hoyer.xyz> * ci(flake): build heavy stuff sequentially and skip running nixci. Signed-off-by: Harald Hoyer <harald@hoyer.xyz> * feat(flake): add `mrf-tool` and `kitsune-job-runner` Signed-off-by: Harald Hoyer <harald@hoyer.xyz> --------- Signed-off-by: Harald Hoyer <harald@hoyer.xyz>
2024-03-29 12:49:25 +00:00
cp -R ${packages.main.src}/kitsune/assets $out/public
cp -R ${packages.frontend}/dist $out/kitsune-fe
'';
};
kitsune-cli = packages.cli;
}