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;
|
|
|
|
|
2024-10-20 21:42:54 -04:00
|
|
|
packageJSON = builtins.fromJSON (builtins.readFile ./package.json);
|
2024-07-20 19:56:59 -04:00
|
|
|
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-11-11 23:45:04 -05:00
|
|
|
npmDepsHash = "sha256-Vl27uo1cwRNjZCcSZTMqZBEwZNwwiqik0sJo4PVxg3c=";
|
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} \
|
2024-10-20 21:42:54 -04:00
|
|
|
--prefix PATH : ${concatMapStringsSep ":" (p: getBin p) runtimeInputs}
|
2024-07-20 19:56:59 -04:00
|
|
|
'';
|
|
|
|
|
|
|
|
nodejs = nodejs_latest;
|
|
|
|
meta.mainProgram = pname;
|
|
|
|
}
|