Ryujinx-Ldn-Website/flake.nix
Mary Guillemard 8c3d5783c0 Switch to nix flakes
Signed-off-by: Mary Guillemard <mary@mary.zone>
2024-01-01 15:42:36 +00:00

49 lines
1.3 KiB
Nix

{
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 = ./.;
npmBuildScript = "release";
npmBuildFlags = [ "--" "--outDir" "dist" ];
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
'';
npmDepsHash = "sha256-Wo4dGsUAZwXbkuWwTKNA5kv4ZUnekdKm/TagP4Q4Ds8=";
};
};
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;
});
}