-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
daad9d0
commit b8b1ee3
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
pkgsWithOldPythons ? import (builtins.fetchTarball { | ||
# Branch: nixos-22.11 | ||
url = "https://github.com/NixOS/nixpkgs/archive/96e18717904dfedcd884541e5a92bf9ff632cf39.tar.gz"; | ||
sha256 = "0zw1851mia86xqxdf8jgy1c6fm5lqw4rncv7v2lwxar3vhpn6c78"; | ||
}) {}, | ||
pkgs ? import (builtins.fetchTarball { | ||
# Branch: nixos-unstable | ||
url = "https://github.com/NixOS/nixpkgs/archive/c75037bbf9093a2acb617804ee46320d6d1fea5a.tar.gz"; | ||
sha256 = "1hs4rfylv0f1sbyhs1hf4f7jsq4np498fbcs5xjlmrkwhx4lpgmc"; | ||
}) {} | ||
}: | ||
pkgs.mkShell { | ||
name = "abilian-env"; | ||
buildInputs = with pkgs; [ | ||
python310 | ||
python311 | ||
python312 | ||
poetry | ||
|
||
# Allow installation of binary wheels by (a) providing manylinux2014 | ||
# support, and (b) patching binaries installed into the Poetry virtualenv. | ||
autoPatchelfHook | ||
pythonManylinuxPackages.manylinux2014 | ||
]; | ||
shellHook = '' | ||
poetry env use "${pkgs.python310}/bin/python" | ||
poetry install --sync --with=dev | ||
# Patch binaries in the Poetry virtualenv to link against Nix deps | ||
autoPatchelf "$(poetry env info --path)" | ||
source "$(poetry env info --path)/bin/activate" | ||
''; | ||
} |