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

add install-replit-nix-system-dependencies subcommand #135

Merged
merged 5 commits into from
Oct 16, 2023
Merged

Commits on Oct 16, 2023

  1. add install-replit-nix-system-dependencies subcommand

    Why
    ===
    * When installing Python packages, we want to add system dependencies
    to replit.nix, so the packages work.
    * This can eventually be expanded to other languages too.
    
    What changed
    ===
    * Introduce InstallReplitNixSystemDependencies subcommand. The
    subcommand uses the language specfile and packages sent on the
    commandline (the new ones we're adding) to determine what it should
    try to look up in the system dependency map.
    * Make a default function that does nothing for all languages except
    Python
    * For Python, add a python_map.json that maps package names to system
    dependency install commands and embed in go
    * Add tests for functions that translate the map into nix-editor
    commands
    
    Test plan
    ===
    * Remove replit.nix so we have a blank slate to start
    * Make a pyproject.toml file like
    ```
    [tool.poetry.dependencies]
    python = ">=3.10.0,<3.11"
    psycopg2 = "^1.26.0"
    ```
    * run `REPL_HOME=. go run ./cmd/upm install-replit-nix-system-dependencies`
    * Confirm the replit.nix file has a postgres dep in the deps and and
    python ld library path.
    * run `REPL_HOME=. go run ./cmd/upm install-replit-nix-system-dependencies pycairo`
    * Confirm that cairo and pkg-config are added to deps
    ryantm committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    279d6b4 View commit details
    Browse the repository at this point in the history
  2. fix lint

    ryantm committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    a3c7981 View commit details
    Browse the repository at this point in the history
  3. check nix-editor output

    ryantm committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    0dade5e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    adb9498 View commit details
    Browse the repository at this point in the history
  5. Update internal/nix/nix.go

    Co-authored-by: Connor Brewster <[email protected]>
    ryantm and cbrewster committed Oct 16, 2023
    Configuration menu
    Copy the full SHA
    499a92d View commit details
    Browse the repository at this point in the history