ip-checker/package.nix

62 lines
1 KiB
Nix
Raw Normal View History

2024-10-26 07:27:02 +00:00
{
lib,
buildGoModule,
nodejs,
pnpm,
stdenv,
}:
{
api = buildGoModule {
pname = "ip-checker-api";
version = "dev";
2024-08-26 22:01:24 +00:00
2024-10-26 07:27:02 +00:00
src = ./api;
2024-08-26 22:01:24 +00:00
2024-10-26 07:27:02 +00:00
vendorHash = "sha256-VvZcnTEgPXlAYEf2+2WZ2xlU4TWhTz+dBiA4j76GSvM=";
2024-08-26 22:01:24 +00:00
2024-10-26 07:27:02 +00:00
meta = {
homepage = "https://git.ny4.dev/nyancat/ip-checker";
license = lib.licenses.mit;
mainProgram = "ip-checker";
};
2024-08-26 22:01:24 +00:00
};
2024-10-26 07:27:02 +00:00
ui = stdenv.mkDerivation (finalAttrs: {
pname = "ip-checker-ui";
version = "dev";
src = ./ui;
nativeBuildInputs = [
nodejs
pnpm.configHook
];
pnpmDeps = pnpm.fetchDeps {
inherit (finalAttrs) pname version src;
hash = "sha256-ucTUmKTeyfTSgWOcLEtf0n9VhzUfHGm41YCYLDxskh0=";
};
buildPhase = ''
runHook preBuild
pnpm build
runHook postBuild
'';
installPhase = ''
runHook preInstall
cp -r ./dist $out
runHook postInstall
'';
meta = {
homepage = "https://git.ny4.dev/nyancat/ip-checker";
license = lib.licenses.mit;
};
});
2024-08-26 22:01:24 +00:00
}