-
-
Save dwt/997fe87c453f9a23fa3368c7d974ce7b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/docs/common-patterns.md b/docs/common-patterns.md | |
index b01a5548..b83a6605 100644 | |
--- a/docs/common-patterns.md | |
+++ b/docs/common-patterns.md | |
@@ -141,3 +141,34 @@ in { | |
]; | |
} | |
``` | |
+ | |
+If you want to also compile dependencies for x86, you can add dependencies to `packages`: | |
+ | |
+```nix | |
+packages = with rosettaPkgs; [ | |
+ # these are the packages required for pymssql | |
+ freetds | |
+ krb5 | |
+ openssl | |
+]; | |
+``` | |
+ | |
+And switch the compiler to x86: | |
+ | |
+```nix | |
+stdenv = rosettaPkgs.stdenv; | |
+``` | |
+ | |
+Then in the generated shell, you can compile software for x86, like `pymssql` or `ibm_db`: | |
+ | |
+```sh | |
+export DYLD_FALLBACK_LIBRARY_PATH="${rosettaPkgs.lib.makeLibraryPath [ rosettaPkgs.gcc14.cc] }:$DYLD_FALLBACK_LIBRARY_PATH" | |
+git clone [email protected]:pymssql/pymssql.git | |
+${rosettaPkgs.python312Full}/bin/python3 -m venv venv | |
+source venv/bin/activate | |
+( | |
+ cd pymssql | |
+ pip install -e . | |
+) | |
+pip install ibm_db | |
+``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment