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

nodejs: Use more pure symlink builds #195

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from

Commits on Aug 12, 2022

  1. nodejs builder: process package.json in-place

    no need for package-json.bak, just put the original data aside in the JSON.
    wmertens committed Aug 12, 2022
    Configuration menu
    Copy the full SHA
    209992f View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2022

  1. dream-lock: change cyclic deps api

    make it easier to implement cycle management
    wmertens committed Aug 26, 2022
    Configuration menu
    Copy the full SHA
    27a80e5 View commit details
    Browse the repository at this point in the history
  2. nodejs builder: some script optimizations

    - prevent bad permissions if possible
    - fix bad permissions with single chmod command
    - join multiple jq calls
    - make electron wrapping more readable
    wmertens committed Aug 26, 2022
    Configuration menu
    Copy the full SHA
    c8b3759 View commit details
    Browse the repository at this point in the history
  3. nodejs builder: implement tree-of-symlinks

    - works out-of-the-box, no node|tsc settings necessary
    - optimal use of storage, composable
    - handles cyclic dependencies by co-locating cycles in the same store path
    
    Changes:
    - build node_modules as a separate derivation, use everywhere
    - if main package has a build script, run it with dev modules and
      afterwards run install script if present, then switch to prod modules
    - only run build scripts when necessary, speedup
    - optionally add all transitive binaries to the node_modules/.bin
    - store binaries in bin/
      NixOS standard location, and .bin should only be used for dependencies,
      not the main package
    - in a package, .bin is now a symlink to bin
    - in bin name, strip .js ending for string case
    - remove now-unnecessary code
    
    This builder requires all peer dependencies for packages to be mentioned and all transitive circular dependencies to be grouped
    wmertens committed Aug 26, 2022
    Configuration menu
    Copy the full SHA
    3a170a1 View commit details
    Browse the repository at this point in the history
  4. nodejs: add package-lock v2 translator

    - discovers peer dependencies correctly
    - adds metadata like os, dev and hasInstallScripts to sources
    wmertens committed Aug 26, 2022
    Configuration menu
    Copy the full SHA
    c71f38e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    95d5e5d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a5ff562 View commit details
    Browse the repository at this point in the history
  7. nodejs: fix sqlite3 build

    wmertens committed Aug 26, 2022
    Configuration menu
    Copy the full SHA
    a614201 View commit details
    Browse the repository at this point in the history
  8. nodejs builder: process package.json in-place

    no need for package-json.bak, just put the original data aside in the JSON.
    wmertens committed Aug 26, 2022
    Configuration menu
    Copy the full SHA
    26595ea View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    ab2b21d View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    6719818 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    a6c27fc View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    81fc299 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    4335130 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    d94d48f View commit details
    Browse the repository at this point in the history