From da4c5d10648fab938359c3a97541559a04c3c8ad Mon Sep 17 00:00:00 2001 From: Mirko Lenz Date: Fri, 25 Oct 2024 10:46:41 +0200 Subject: [PATCH] build: add custom install phase and meta attrs --- default.nix | 15 ++++++++++++++- server.nix | 3 +++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/default.nix b/default.nix index 0e6bd13..594ac94 100644 --- a/default.nix +++ b/default.nix @@ -17,11 +17,24 @@ buildNpmPackage { inherit (importNpmLock) npmConfigHook; src = ./.; + installPhase = '' + runHook preInstall + + mkdir -p "$out" + cp -r "dist/." "$out" + + runHook postInstall + ''; # Python is needed for node-gyp/libsass nativeBuildInputs = [ (nodejs.passthru.python.withPackages (ps: with ps; [ setuptools ])) ] ++ (lib.optional stdenv.hostPlatform.isDarwin xcbuild); - meta = { }; + meta = with lib; { + description = "Convert arguments in plain texts (e.g., newspaper articles) to structured argument graphs"; + license = licenses.mit; + maintainers = with maintainers; [ mirkolenz ]; + homepage = "https://github.com/recap-utr/arguemapper"; + }; } diff --git a/server.nix b/server.nix index ffe85d0..27ed84d 100644 --- a/server.nix +++ b/server.nix @@ -30,4 +30,7 @@ writeShellApplication { derivationArgs = { passthru.port = caddyPort; }; + meta = arguemapper.meta // { + inherit (caddy.meta) platforms; + }; }