2024-07-20 19:56:59 -04:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildNpmPackage,
|
2024-07-20 22:02:22 -04:00
|
|
|
callPackage,
|
2024-07-20 19:56:59 -04:00
|
|
|
makeWrapper,
|
|
|
|
nodejs_latest,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit (lib) concatMapStringsSep getBin;
|
|
|
|
inherit (builtins) readFile fromJSON;
|
|
|
|
|
|
|
|
packageJSON = fromJSON (readFile ./package.json);
|
|
|
|
in
|
|
|
|
buildNpmPackage rec {
|
2024-08-06 20:35:11 -04:00
|
|
|
pname = packageJSON.name;
|
2024-07-20 19:56:59 -04:00
|
|
|
inherit (packageJSON) version;
|
|
|
|
|
|
|
|
src = ./.;
|
2024-09-26 09:43:19 -04:00
|
|
|
npmDepsHash = "sha256-nYdr7jbe5wW9Rg0G4l5jbZg8G0o8DioeSGpx+8e0VZI=";
|
2024-07-20 19:56:59 -04:00
|
|
|
|
|
|
|
runtimeInputs = [
|
2024-08-03 20:30:23 -04:00
|
|
|
(callPackage ../../nixosModules/docker/updateImage.nix {})
|
2024-07-20 19:56:59 -04:00
|
|
|
];
|
|
|
|
nativeBuildInputs = [makeWrapper];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/${pname} \
|
|
|
|
--prefix PATH : ${concatMapStringsSep ":" (p: getBin p) runtimeInputs}
|
|
|
|
'';
|
|
|
|
|
|
|
|
nodejs = nodejs_latest;
|
|
|
|
meta.mainProgram = pname;
|
|
|
|
}
|