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