Ryujinx-Ldn-Website/flake.nix

46 lines
1.2 KiB
Nix
Raw Normal View History

{
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
};
outputs = { self, nixpkgs, flake-utils }:
let
wesbite_overlay = final: prev: {
ryujinx-ldn-website = with final;
buildNpmPackage {
pname = "ryujinx-ldn-website";
version = "1.0.0";
src = ./.;
installPhase = ''
runHook preInstall
cp -r dist $out/
cp -r public package.json package-lock.json node_modules $out/
makeWrapper '${nodejs}/bin/node' "$out/bin/ryujinx-ldn-website" --add-flags "$out/index.js"
runHook postInstall
'';
2024-03-08 22:23:52 +00:00
npmDepsHash = "sha256-fqvUE5/M2VyIL5CyDEuUGye27e9fJJImMYL1wwZNFPg=";
};
};
in flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlays."${system}" ];
};
in {
packages = {
default = self.packages.${system}.ryujinx-ldn-website;
ryujinx-ldn-website = pkgs.ryujinx-ldn-website;
};
overlays = wesbite_overlay;
formatter = pkgs.nixfmt;
});
}