<!--
Is this an issue in the style of "package "X fails to build"?
Most such… issues aren't issues in poetry2nix as such, but rather an incomplete dependency specification.
We don't have the capacity to act on most such issues, they often require domain knowledge and they generate noise in the issue tracker.
Please take a look into known edge cases (https://github.com/nix-community/poetry2nix/blob/master/docs/edgecases.md),
maybe it's already solved or you find an inspiration for your own solution.
If you did not found your issue in list of known, then it will be more productive, faster and creates less burden on maintainer
if you first try to discuss your case in Matrix chat (you can find information about it in README).
Community will happily help to find soulution and if needed create issue or pull request
-->
> I'm not sure if this is the right place to post the issue or if it should be on the main nixos repository.
### Describe the issue
Running `nix build` or `nix flake check` causes a segmentation fault.
### Additional context
Tried on the following machines.
- OS X Arm64
- GitHub ubuntu runner
```shell
echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf
echo "sandbox = false" >> /etc/nix/nix.conf
echo "filter-syscalls = false" >> /etc/nix/nix.conf
```
<!--
Note that while these aren't strict requirements it will heavily increase your chances to get an issue fixed if you include more context that makes it possible to recreate the issue.
-->
`default.nix`/`shell.nix`/`flake.nix`:
```nix
{
description = "Application packaged using poetry2nix";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.poetry2nix = {
url = "github:nix-community/poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, flake-utils, poetry2nix }:
flake-utils.lib.eachDefaultSystem (system:
let
# see https://github.com/nix-community/poetry2nix/tree/master#api for more functions and examples.
inherit (poetry2nix.legacyPackages.${system}) mkPoetryEnv defaultPoetryOverrides;
pkgs = nixpkgs.legacyPackages.${system};
pypkgs-build-requirements = {
django-autoslug = [ "setuptools" ];
django-hosts = [ "setuptools" ];
django-autocomplete-light = [ "setuptools" ];
django-bootstrap3 = [ "setuptools" ];
django-classy-tags = [ "setuptools" ];
crispy-bootstrap3 = [ "setuptools" ];
django-easy-pdf3 = [ "setuptools" ];
};
p2n-overrides = defaultPoetryOverrides.extend (self: super:
builtins.mapAttrs (package: build-requirements:
(builtins.getAttr package super).overridePythonAttrs (old: {
buildInputs = (old.buildInputs or [ ]) ++ (builtins.map (pkg: if builtins.isString pkg then builtins.getAttr pkg super else pkg) build-requirements);
})
) pypkgs-build-requirements
);
in
{
packages = {
myapp = mkPoetryEnv {
projectDir = self;
overrides = p2n-overrides;
groups = [];
checkGroups = [];
python = pkgs.python310;
extras = [];
};
default = self.packages.${system}.myapp;
};
devShells.default = pkgs.mkShell {
packages = [ poetry2nix.packages.${system}.poetry ];
};
});
}
```
`flake.lock`:
```json
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1692799911,
"narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1689068808,
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nix-github-actions": {
"inputs": {
"nixpkgs": [
"poetry2nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1688870561,
"narHash": "sha256-4UYkifnPEw1nAzqqPOTL2MvWtm3sNGw1UTYTalkTcGY=",
"owner": "nix-community",
"repo": "nix-github-actions",
"rev": "165b1650b753316aa7f1787f3005a8d2da0f5301",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-github-actions",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1693250523,
"narHash": "sha256-y3up5gXMTbnCsXrNEB5j+7TVantDLUYyQLu/ueiXuyg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3efb0f6f404ec8dae31bdb1a9b17705ce0d6986e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"poetry2nix": {
"inputs": {
"flake-utils": "flake-utils_2",
"nix-github-actions": "nix-github-actions",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1693051011,
"narHash": "sha256-HNbuVCS/Fnl1YZOjBk9/MlIem+wM8fvIzTH0CVQrLSQ=",
"owner": "nix-community",
"repo": "poetry2nix",
"rev": "5b3a5151cf212021ff8d424f215fb030e4ff2837",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "poetry2nix",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"poetry2nix": "poetry2nix"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}
```
`pyproject.toml`:
```toml
[tool.poetry]
name = "unf-dk"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
readme = "README.md"
packages = [{include = "unf"}]
[tool.poetry.dependencies]
python = "~3.10"
Django = "~4.2"
django-extensions = "~3.2"
django-reversion = "~5.0"
djangorestframework= "~3.14"
django-filter = "~23.2"
django-classy-tags = "~4.0"
django-cors-headers = "~3.14"
django-bootstrap3 = "~23.1"
django-crispy-forms = "~2.0"
django-formtools = "~2.4"
django-autocomplete-light = "~3.9"
django-widget-tweaks = "~1.4"
django-maintenance-mode = "~0.18"
django-haystack = "~3.2"
pygments = "~2.15"
whoosh = "~2.7"
django-phonenumber-field = "~7.1"
phonenumbers = "~8.13"
markdown = "~3.4"
python-markdown-math = "~0.8"
bleach = "~6.0"
django-easy-pdf3 = "~0.1"
reportlab = "~4.0"
fabric = "~3.0"
progressbar2 = "~4.2"
pytz = "2023.3"
Pillow = "~10.0"
python-dateutil = "~2.8"
pycountry = "~22.3.5"
six = "~1.16"
requests = "~2.29"
html2text = "~2020.1"
passlib = "~1.7"
google-api-python-client = "~2.86"
google-auth-oauthlib = "~1.0"
django-autoslug = "~1.9"
psycopg2 = "~2.9"
easy-thumbnails = "~2.8"
crispy-bootstrap3 = "^2022.1"
django-hosts = "^5.2"
gunicorn = "^21.2.0"
django-environ = "^0.10.0"
[tool.poetry.group.dev.dependencies]
django-debug-toolbar = "~4.0"
django-appconf = "~1.0"
ruff = "~0.0"
types-pytz = "~2023.3"
types-PyYAML = "~6.0"
types-simplejson = "3.19.0.0"
django-stubs = { extras = ["compatible-mypy"], version = "~4.2" }
django-stubs-ext = "~4.2"
types-six = "~1.16.21.7"
types-Markdown = "~3.4.2.5"
types-bleach = "~6.0.0.1"
types-python-dateutil = "~2.8.19.10"
types-requests = "~2.29"
types-urllib3 = "~1.26.25.8"
[tool.poetry.scripts]
init = "runserver:init"
side = "runserver:side"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
"**/migrations",
"config/settings",
]
# Same as Black.
line-length = 120
# Assume Python 3.10.
target-version = "py310"
[tool.ruff.per-file-ignores]
"__init__.py" = ["E402", "F401", "F403"]
[tool.mypy]
mypy_path = "./unf"
plugins = ["mypy_django_plugin.main"]
strict_optional = true
ignore_missing_imports = true
[tool.django-stubs]
django_settings_module = "config.settings"
[[tool.mypy.overrides]]
module = "config.settings.*"
ignore_errors = true
```
[`poetry.lock`](https://gist.github.com/Defman/52cb2078caa2e0065fb7c01ce64732bd)