nixpkgs/pkgs/development/tools/jsduck/default.nix
stuebinm ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
2024-03-19 03:14:51 +01:00

35 lines
846 B
Nix

{ stdenv, lib, bundlerEnv, makeWrapper, bundlerUpdateScript }:
stdenv.mkDerivation rec {
pname = "jsduck";
version = (import ./gemset.nix).jsduck.version;
env = bundlerEnv {
name = pname;
gemfile = ./Gemfile;
lockfile = ./Gemfile.lock;
gemset = ./gemset.nix;
};
dontUnpack = true;
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ env ];
installPhase = ''
mkdir -p $out/bin
makeWrapper ${env}/bin/jsduck $out/bin/jsduck
'';
passthru.updateScript = bundlerUpdateScript "jsduck";
meta = with lib; {
description = "Simple JavaScript Duckumentation generator";
mainProgram = "jsduck";
homepage = "https://github.com/senchalabs/jsduck";
license = with licenses; gpl3;
maintainers = with maintainers; [ periklis nicknovitski ];
platforms = platforms.unix;
};
}