amber-lang: generate bash completion

aleksana 5ddda189 d9371554

+14 -4
+14 -4
pkgs/by-name/am/amber-lang/package.nix
··· 5 bc, 6 util-linux, 7 makeWrapper, 8 runCommand, 9 amber-lang, 10 nix-update-script, ··· 29 --replace-fail 'Command::new("/usr/bin/env")' 'Command::new("env")' 30 ''; 31 32 - nativeBuildInputs = [ makeWrapper ]; 33 34 nativeCheckInputs = [ 35 bc ··· 43 "--skip=tests::formatter::all_exist" 44 ]; 45 46 - postInstall = '' 47 - wrapProgram "$out/bin/amber" --prefix PATH : "${lib.makeBinPath [ bc ]}" 48 - ''; 49 50 passthru = { 51 updateScript = nix-update-script { };
··· 5 bc, 6 util-linux, 7 makeWrapper, 8 + installShellFiles, 9 + stdenv, 10 runCommand, 11 amber-lang, 12 nix-update-script, ··· 31 --replace-fail 'Command::new("/usr/bin/env")' 'Command::new("env")' 32 ''; 33 34 + nativeBuildInputs = [ 35 + makeWrapper 36 + installShellFiles 37 + ]; 38 39 nativeCheckInputs = [ 40 bc ··· 48 "--skip=tests::formatter::all_exist" 49 ]; 50 51 + postInstall = 52 + '' 53 + wrapProgram "$out/bin/amber" --prefix PATH : "${lib.makeBinPath [ bc ]}" 54 + '' 55 + + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' 56 + installShellCompletion --cmd amber \ 57 + --bash <($out/bin/amber completion) 58 + ''; 59 60 passthru = { 61 updateScript = nix-update-script { };