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;
2024-11-02 08:34:19 +00:00
hash = "sha256-cfgwFkkfZxRqLSnBR/LmYS/0v2U54eaWMMWkGduu+Rc=";
2024-10-26 07:27:02 +00:00
};
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
}