Skip to content

Commit

Permalink
build: add custom install phase and meta attrs
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkolenz committed Oct 25, 2024
1 parent a7df6ed commit da4c5d1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
15 changes: 14 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
};
}
3 changes: 3 additions & 0 deletions server.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,7 @@ writeShellApplication {
derivationArgs = {
passthru.port = caddyPort;
};
meta = arguemapper.meta // {
inherit (caddy.meta) platforms;
};
}

0 comments on commit da4c5d1

Please sign in to comment.