Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

carto: use buildNpmPackage #249879

Merged
merged 2 commits into from
Aug 20, 2023
Merged

Conversation

dotlambda
Copy link
Member

Description of changes

See #229475

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

cc @Luflosi who originally packaged it in #187891

Copy link
Contributor

@delroth delroth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested:

  • Builds fine on x86_64-linux
  • --version works
  • Diff with previous version:
    • The output from this PR has a bin/carto, which is a good improvement. EDIT: that's my find invocation not following symlinks, ignore :)
    • However the man page isn't properly copied to share/man/carto.1 anymore. That's likely a buildNpmPackage bug/missing feature? I don't really see that as a major issue though.

@@ -25,8 +25,7 @@ npmInstallHook() {
else "invalid type " + $typ | halt_error end' "${npmWorkspace-.}/package.json")

while IFS= read -r man; do
mkdir -p "$out/share/man"
ln -s "$packageOut/$man" "$out/share/man"
installManPage "$packageOut/$man"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't quite accurate either. According to https://docs.npmjs.com/cli/v9/configuring-npm/package-json/#man we're supposed to modify the name of the man page. That would be easiest to do if we modify installManPage to accept the man page name as an optional argument.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL about "installManPage", thanks! No objection to leaving that bug for now, it's still better than the previous or current status and I don't want to block this particular PR on the man page question.

Copy link
Contributor

@delroth delroth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still LGTM. Leaving another day or so for the maintainer to possibly comment on this, but I think it's ready to merge.

Copy link
Contributor

@Luflosi Luflosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides a few nitpicks, LGTM.

pkgs/development/tools/carto/default.nix Outdated Show resolved Hide resolved
description = "Fast CSS-like map stylesheets";
homepage = "https://github.com/mapbox/carto";
license = lib.licenses.asl20;
mainProgram = "carto";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both the package and the binary it provides are called "carto", right? In this case you should remove mainProgram as it is unnecessary.

Suggested change
mainProgram = "carto";

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not anymore: #246386

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I didn't know.

Copy link
Contributor

@Luflosi Luflosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@ofborg ofborg bot requested a review from Luflosi August 19, 2023 17:59
@dotlambda
Copy link
Member Author

Result of nixpkgs-review pr 249879 run on x86_64-linux 1

1 package marked as broken and skipped:
  • magnetophonDSP.ConstantDetuneChorus
6 packages failed to build:
  • geph.gui
  • imgbrd-grabber
  • iosevka-comfy.comfy
  • iosevka-comfy.comfy-duo
  • iosevka-comfy.comfy-motion
  • sitespeed-io
150 packages built:
  • activitywatch
  • ansible-language-server
  • antennas
  • antora
  • ariang
  • assemblyscript
  • audiobookshelf
  • authelia
  • aw-server-rust
  • balanceofsatoshis
  • bibtex-tidy
  • bitwarden
  • bitwarden-cli
  • carto
  • castnow
  • cdxgen
  • cz-cli
  • deltachat-desktop
  • djot-js
  • docker-compose-language-service
  • documenso
  • dot-language-server
  • eask
  • elmPackages.elm-test
  • emscripten
  • epgstation
  • eslint_d
  • faust (faust2)
  • faust2alqt
  • faust2alsa
  • faust2csound
  • faust2firefox
  • faust2jack
  • faust2jackrust
  • faust2jaqt
  • faust2ladspa
  • faust2lv2
  • faust2sc
  • faustPhysicalModeling
  • faustlive
  • filebrowser
  • flood
  • forgejo
  • forgejo.data
  • fx-cast-bridge
  • github-copilot-cli
  • gnomeExtensions.pop-shell
  • google-clasp
  • gtop
  • guitarix
  • haskellPackages.aeson-typescript
  • haskellPackages.aeson-typescript.doc
  • homepage-dashboard
  • hred
  • hueadm
  • husky
  • iosevka
  • iosevka-comfy.comfy-fixed
  • iosevka-comfy.comfy-motion-duo
  • iosevka-comfy.comfy-motion-fixed
  • iosevka-comfy.comfy-wide
  • iosevka-comfy.comfy-wide-duo
  • iosevka-comfy.comfy-wide-fixed
  • iosevka-comfy.comfy-wide-motion
  • iosevka-comfy.comfy-wide-motion-duo
  • iosevka-comfy.comfy-wide-motion-fixed
  • jellyfin
  • jellyfin-media-player
  • jellyfin-web
  • kapitonov-plugins-pack
  • karma-runner
  • kaufkauflist
  • kavita
  • lineselect
  • lv_img_conv
  • magnetophonDSP.CharacterCompressor
  • magnetophonDSP.CompBus
  • magnetophonDSP.LazyLimiter
  • magnetophonDSP.MBdistortion
  • magnetophonDSP.RhythmDelay
  • magnetophonDSP.VoiceOfFaust
  • magnetophonDSP.faustCompressors
  • magnetophonDSP.pluginUtils
  • magnetophonDSP.shelfMultiBand
  • maizzle
  • markdownlint-cli
  • matrix-alertmanager
  • memos
  • mermaid-filter
  • mirakurun
  • mongosh
  • mooSpace
  • moonfire-nvr
  • mpvScripts.webtorrent-mpv-hook
  • mw
  • nest-cli
  • newman
  • node-manta
  • nodehun
  • npm-check
  • ntfy-sh
  • open-music-kontrollers.mephisto
  • open-stage-control
  • osmtogeojson
  • pairdrop
  • paperless-ngx
  • photofield
  • photoprism
  • pnpm-lock-export
  • polaris
  • polaris-web
  • psitransfer
  • pufferpanel
  • pyCA
  • pyCA.dist
  • readability-cli
  • resumed
  • reveal-md
  • semantic-release
  • sharing
  • slskd
  • sunshine
  • swagger-cli
  • tambura
  • terminal-stocks
  • thelounge
  • torq
  • triton
  • twspace-crawler
  • typescript
  • uivonim
  • uptime-kuma
  • vencord
  • vencord-web-extension
  • vieb
  • vimPlugins.YouCompleteMe
  • vsce
  • vscode-extensions.vadimcn.vscode-lldb
  • vscode-langservers-extracted
  • webcord
  • webcord-vencord
  • webtorrent_desktop
  • weylus
  • windmill
  • yarn-lock-converter
  • ycmd
  • zigbee2mqtt
  • zincsearch
  • zrythm
  • zx

@dotlambda dotlambda merged commit cf970f1 into NixOS:master Aug 20, 2023
8 checks passed
@dotlambda dotlambda deleted the carto-buildNpmPackage branch August 20, 2023 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Re-packaged
Development

Successfully merging this pull request may close these issues.

3 participants