Finalize nix build, add a nixified container

nix-and-poetry
Stan Drozd 2021-03-01 05:03:33 +01:00
parent 5d2f99287e
commit 35b29fba9b
No known key found for this signature in database
GPG Key ID: E96EA51A5D7F84E7
9 changed files with 242 additions and 120 deletions

24
Dockerfile.nixified Normal file
View File

@ -0,0 +1,24 @@
# syntax = docker/dockerfile:1.2
FROM nixos/nix
ENV PYTHONUNBUFFERED 1
RUN nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs && \
nix-channel --update
WORKDIR /code
RUN wget https://github.com/vishnubob/wait-for-it/raw/8ed92e8cab83cfed76ff012ed4a36cef74b28096/wait-for-it.sh -O /usr/local/bin/wait-for-it && chmod +x /usr/local/bin/wait-for-it
RUN nix-env -iA nixpkgs.git nixpkgs.bash
ADD ./pyproject.toml .
ADD ./poetry.lock .
ADD ./*.nix .
ADD ./nix ./nix
RUN nix-shell
ADD . .
RUN nix-build
CMD bash -c "nix-build && result/bin/managePy migrate && result/bin/managePy createsuperuser && result/bin/managePy runserver 0.0.0.0:8000"

View File

@ -1,6 +1,6 @@
{ sources ? import ./nix/sources.nix, pkgs ? import sources.nixpkgs {} }:
with pkgs;
[
python38
git
postgresql
]

20
default.nix Normal file
View File

@ -0,0 +1,20 @@
{ sources ? import ./nix/sources.nix
, poetry2nix-olay ? import
# ../poetry2nix/overlay.nix
"${sources.poetry2nix}/overlay.nix"
, nixpkgs ? sources.nixpkgs
}:
let
common-deps = import ./common-deps.nix { inherit sources; };
pkgs = import nixpkgs { overlays = [ poetry2nix-olay ]; };
src = ./.;
poetry-app = pkgs.poetry2nix.mkPoetryApplication {
projectDir = src;
};
dep-env = poetry-app.dependencyEnv;
managePy = pkgs.writeScriptBin "managePy" ''
cd ${src}
${dep-env}/bin/python manage.py $@
'';
in
managePy

View File

@ -7,7 +7,9 @@ services:
- POSTGRES_HOST_AUTH_METHOD=trust
web:
build: .
build:
context: .
dockerfile: Dockerfile.nixified
restart: always
volumes:
- .:/code

18
nix/poetry2nix-olay.nix Normal file
View File

@ -0,0 +1,18 @@
self: super: {
# p2self & p2super refers to poetry2nix
poetry2nix = super.poetry2nix.overrideScope' (
p2nixself: p2nixsuper: {
# pyself & pysuper refers to python packages
defaultPoetryOverrides = p2nixsuper.defaultPoetryOverrides.extend (
pyself: pysuper: {
my-custom-pkg = super.my-custom-pkg.overridePythonAttrs (oldAttrs: {});
}
);
}
);
}

View File

@ -12,15 +12,27 @@
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs": {
"branch": "release-20.09",
"branch": "nixpkgs-unstable",
"description": "Nix Packages collection",
"homepage": "",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d303eee16ce8dee5c0b5b8e5f6323f561c189ec5",
"sha256": "05hna2a2zss5rfbsbxah4z159yvyyarw5w5hqwnbs020h02j2ywh",
"rev": "870dbb751f4d851a3dfb554835a0c2f528386982",
"sha256": "0ydgjvwspfspm0fg7jhc5yxpm47lh4scqhwswranm82hk668cxzl",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/d303eee16ce8dee5c0b5b8e5f6323f561c189ec5.tar.gz",
"url": "https://github.com/NixOS/nixpkgs/archive/870dbb751f4d851a3dfb554835a0c2f528386982.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"poetry2nix": {
"branch": "master",
"description": "Convert poetry projects to nix automagically [maintainer=@adisbladis] ",
"homepage": "",
"owner": "nix-community",
"repo": "poetry2nix",
"rev": "c6f356183361493bc556138eca452878b651b90c",
"sha256": "18zqhwbl0r064xhga9hcwxji7j7xivksdlkl2i8avvzzash715a2",
"type": "tarball",
"url": "https://github.com/nix-community/poetry2nix/archive/c6f356183361493bc556138eca452878b651b90c.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}

254
poetry.lock generated
View File

@ -1,65 +1,64 @@
[[package]]
category = "main"
description = "Python package for providing Mozilla's CA Bundle."
name = "certifi"
version = "2019.11.28"
description = "Python package for providing Mozilla's CA Bundle."
category = "main"
optional = false
python-versions = "*"
version = "2019.11.28"
[[package]]
category = "main"
description = "Foreign Function Interface for Python calling C code."
name = "cffi"
version = "1.14.5"
description = "Foreign Function Interface for Python calling C code."
category = "main"
optional = false
python-versions = "*"
version = "1.14.5"
[package.dependencies]
pycparser = "*"
[[package]]
category = "main"
description = "Universal encoding detector for Python 2 and 3"
name = "chardet"
version = "3.0.4"
description = "Universal encoding detector for Python 2 and 3"
category = "main"
optional = false
python-versions = "*"
version = "3.0.4"
[[package]]
category = "main"
description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers."
name = "cryptography"
version = "3.4.6"
description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers."
category = "main"
optional = false
python-versions = ">=3.6"
version = "3.4.6"
[package.dependencies]
cffi = ">=1.12"
[package.extras]
docs = ["sphinx (>=1.6.5,<1.8.0 || >1.8.0,<3.1.0 || >3.1.0,<3.1.1 || >3.1.1)", "sphinx-rtd-theme"]
docs = ["sphinx (>=1.6.5,!=1.8.0,!=3.1.0,!=3.1.1)", "sphinx-rtd-theme"]
docstest = ["doc8", "pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"]
pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"]
sdist = ["setuptools-rust (>=0.11.4)"]
ssh = ["bcrypt (>=3.1.5)"]
test = ["pytest (>=6.0)", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,<3.79.2 || >3.79.2)"]
test = ["pytest (>=6.0)", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,!=3.79.2)"]
[[package]]
category = "main"
description = "XML bomb protection for Python stdlib modules"
marker = "python_version >= \"3.0\""
name = "defusedxml"
version = "0.7.0rc2"
description = "XML bomb protection for Python stdlib modules"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
version = "0.7.0rc2"
[[package]]
category = "main"
description = "A high-level Python Web framework that encourages rapid development and clean, pragmatic design."
name = "django"
version = "1.11.28"
description = "A high-level Python Web framework that encourages rapid development and clean, pragmatic design."
category = "main"
optional = false
python-versions = "*"
version = "1.11.28"
[package.dependencies]
pytz = "*"
@ -69,92 +68,107 @@ argon2 = ["argon2-cffi (>=16.1.0)"]
bcrypt = ["bcrypt"]
[[package]]
category = "main"
description = "A helper class for handling configuration defaults of packaged apps gracefully."
name = "django-appconf"
version = "1.0.3"
description = "A helper class for handling configuration defaults of packaged apps gracefully."
category = "main"
optional = false
python-versions = "*"
version = "1.0.3"
[package.dependencies]
django = "*"
six = "*"
[[package]]
category = "main"
description = "An extension for Django admin that makes interface mobile friendly."
name = "django-flat-responsive"
version = "2.0"
description = "An extension for Django admin that makes interface mobile friendly."
category = "main"
optional = false
python-versions = "*"
version = "2.0"
[[package]]
category = "main"
description = "PostgreSQL HStore support for Django"
name = "django-hstore"
version = "1.5a0"
description = "PostgreSQL HStore support for Django"
category = "main"
optional = false
python-versions = "*"
version = "1.5.alpha"
develop = false
[package.source]
reference = "61427e474cb2f4be8fdfce225d78a5330bc77eb0"
type = "git"
url = "https://github.com/djangonauts/django-hstore.git"
reference = "61427e474cb2f4be8fdfce225d78a5330bc77eb0"
resolved_reference = "61427e474cb2f4be8fdfce225d78a5330bc77eb0"
[[package]]
category = "main"
description = "This is a simple app, which supplies a single template tag for markdown markup."
name = "django-markdown2"
version = "0.3.1"
description = "This is a simple app, which supplies a single template tag for markdown markup."
category = "main"
optional = false
python-versions = "*"
version = "0.3.1"
[package.dependencies]
markdown2 = "*"
[[package]]
category = "main"
description = "Select2 option fields for Django."
name = "django-select2"
version = "6.3.1-pbr-devdep"
description = "Select2 option fields for Django."
category = "main"
optional = false
python-versions = "*"
version = "6.3.1"
develop = false
[package.dependencies]
django-appconf = ">=0.6.0"
pbr = "*"
pytest-runner = "*"
[package.source]
type = "git"
url = "https://github.com/drozdziak1/django-select2.git"
reference = "038a763d9caab00be2d583675edf8a87618af5c7"
resolved_reference = "038a763d9caab00be2d583675edf8a87618af5c7"
[[package]]
category = "main"
description = "Fast and easy tree structures."
name = "django-tree"
version = "0.1.0"
description = "Fast and easy tree structures."
category = "main"
optional = false
python-versions = "*"
version = "0.1.0"
develop = false
[package.dependencies]
Django = ">=1.8,<1.12"
[package.source]
reference = "687c01c02d91cada9ca1912e34e482da9e73e27a"
type = "git"
url = "https://github.com/d42/django-tree.git"
reference = "687c01c02d91cada9ca1912e34e482da9e73e27a"
resolved_reference = "687c01c02d91cada9ca1912e34e482da9e73e27a"
[[package]]
category = "main"
description = "Web APIs for Django, made easy."
name = "djangorestframework"
version = "3.11.0"
description = "Web APIs for Django, made easy."
category = "main"
optional = false
python-versions = ">=3.5"
version = "3.11.0"
[package.dependencies]
django = ">=1.11"
[[package]]
category = "main"
description = "Django Rest Framework tools for django-hstore"
name = "djangorestframework-hstore"
version = "1.3"
description = "Django Rest Framework tools for django-hstore"
category = "main"
optional = false
python-versions = "*"
version = "1.3"
[package.dependencies]
Django = ">=1.6.11"
@ -163,28 +177,28 @@ djangorestframework = ">=3.1.1"
psycopg2 = ">=2.4.3"
[[package]]
category = "main"
description = "Internationalized Domain Names in Applications (IDNA)"
name = "idna"
version = "2.8"
description = "Internationalized Domain Names in Applications (IDNA)"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
version = "2.8"
[[package]]
category = "main"
description = "A fast and complete Python implementation of Markdown"
name = "markdown2"
version = "2.4.0"
description = "A fast and complete Python implementation of Markdown"
category = "main"
optional = false
python-versions = ">=3.5, <4"
version = "2.4.0"
[[package]]
category = "main"
description = "A generic, spec-compliant, thorough implementation of the OAuth request-signing logic"
name = "oauthlib"
version = "3.1.0"
description = "A generic, spec-compliant, thorough implementation of the OAuth request-signing logic"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
version = "3.1.0"
[package.extras]
rsa = ["cryptography"]
@ -192,51 +206,70 @@ signals = ["blinker"]
signedtoken = ["cryptography", "pyjwt (>=1.0.0)"]
[[package]]
name = "pbr"
version = "5.5.1"
description = "Python Build Reasonableness"
category = "main"
description = "Python Imaging Library (Fork)"
optional = false
python-versions = ">=2.6"
[[package]]
name = "pillow"
version = "6.2.1"
description = "Python Imaging Library (Fork)"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
version = "6.2.1"
[[package]]
category = "main"
description = "psycopg2 - Python-PostgreSQL Database Adapter"
name = "psycopg2"
version = "2.8.4"
description = "psycopg2 - Python-PostgreSQL Database Adapter"
category = "main"
optional = false
python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*"
version = "2.8.4"
[[package]]
category = "main"
description = "C parser in Python"
name = "pycparser"
version = "2.20"
description = "C parser in Python"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
version = "2.20"
[[package]]
category = "main"
description = "JSON Web Token implementation in Python"
name = "pyjwt"
version = "2.0.1"
description = "JSON Web Token implementation in Python"
category = "main"
optional = false
python-versions = ">=3.6"
version = "2.0.1"
[package.extras]
crypto = ["cryptography (>=3.3.1,<4.0.0)"]
dev = ["sphinx", "sphinx-rtd-theme", "zope.interface", "cryptography (>=3.3.1,<4.0.0)", "pytest (>=6.0.0,<7.0.0)", "coverage (5.0.4)", "mypy", "pre-commit"]
dev = ["sphinx", "sphinx-rtd-theme", "zope.interface", "cryptography (>=3.3.1,<4.0.0)", "pytest (>=6.0.0,<7.0.0)", "coverage[toml] (==5.0.4)", "mypy", "pre-commit"]
docs = ["sphinx", "sphinx-rtd-theme", "zope.interface"]
tests = ["pytest (>=6.0.0,<7.0.0)", "coverage (5.0.4)"]
tests = ["pytest (>=6.0.0,<7.0.0)", "coverage[toml] (==5.0.4)"]
[[package]]
name = "pytest-runner"
version = "5.3.0"
description = "Invoke py.test as distutils command with dependency resolution"
category = "main"
description = "OpenID support for modern servers and consumers."
marker = "python_version >= \"3.0\""
optional = false
python-versions = ">=3.6"
[package.extras]
docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"]
testing = ["pytest (>=3.5,!=3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "pytest-virtualenv", "pytest-black (>=0.3.7)", "pytest-mypy"]
[[package]]
name = "python3-openid"
version = "3.2.0"
description = "OpenID support for modern servers and consumers."
category = "main"
optional = false
python-versions = "*"
version = "3.2.0"
[package.dependencies]
defusedxml = "*"
@ -246,20 +279,20 @@ mysql = ["mysql-connector-python"]
postgresql = ["psycopg2"]
[[package]]
category = "main"
description = "World timezone definitions, modern and historical"
name = "pytz"
version = "2021.1"
description = "World timezone definitions, modern and historical"
category = "main"
optional = false
python-versions = "*"
version = "2021.1"
[[package]]
category = "main"
description = "Python HTTP for Humans."
name = "requests"
version = "2.22.0"
description = "Python HTTP for Humans."
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
version = "2.22.0"
[package.dependencies]
certifi = ">=2017.4.17"
@ -269,66 +302,60 @@ urllib3 = ">=1.21.1,<1.25.0 || >1.25.0,<1.25.1 || >1.25.1,<1.26"
[package.extras]
security = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)"]
socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7)", "win-inet-pton"]
socks = ["PySocks (>=1.5.6,!=1.5.7)", "win-inet-pton"]
[[package]]
category = "main"
description = "OAuthlib authentication support for Requests."
name = "requests-oauthlib"
version = "1.3.0"
description = "OAuthlib authentication support for Requests."
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
version = "1.3.0"
[package.dependencies]
oauthlib = ">=3.0.0"
requests = ">=2.0.0"
[package.extras]
rsa = ["oauthlib (>=3.0.0)"]
rsa = ["oauthlib[signedtoken] (>=3.0.0)"]
[[package]]
category = "main"
description = "Python 2 and 3 compatibility utilities"
name = "six"
version = "1.15.0"
description = "Python 2 and 3 compatibility utilities"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*"
version = "1.15.0"
[[package]]
category = "main"
description = "Python Social Authentication, Django integration."
name = "social-auth-app-django"
version = "3.1.0"
description = "Python Social Authentication, Django integration."
category = "main"
optional = false
python-versions = "*"
version = "3.1.0"
[package.dependencies]
six = "*"
social-auth-core = ">=1.2.0"
[[package]]
category = "main"
description = "Python social authentication made simple."
name = "social-auth-core"
version = "4.0.3"
description = "Python social authentication made simple."
category = "main"
optional = false
python-versions = "*"
version = "4.0.3"
[package.dependencies]
PyJWT = ">=2.0.0"
cryptography = ">=1.4"
defusedxml = {version = ">=0.5.0rc1", markers = "python_version >= \"3.0\""}
oauthlib = ">=1.0.3"
PyJWT = ">=2.0.0"
python3-openid = {version = ">=3.0.10", markers = "python_version >= \"3.0\""}
requests = ">=2.9.1"
requests-oauthlib = ">=0.6.1"
[package.dependencies.defusedxml]
python = ">=3.0"
version = ">=0.5.0rc1"
[package.dependencies.python3-openid]
python = ">=3.0"
version = ">=3.0.10"
[package.extras]
all = ["python-jose (>=3.0.0)", "pyjwt (>=1.7.1)", "python3-saml (>=1.2.1)", "cryptography (>=2.1.1)"]
allpy3 = ["python-jose (>=3.0.0)", "pyjwt (>=1.7.1)", "python3-saml (>=1.2.1)", "cryptography (>=2.1.1)", "defusedxml (>=0.5.0rc1)", "python3-openid (>=3.0.10)"]
@ -337,22 +364,22 @@ openidconnect = ["python-jose (>=3.0.0)", "pyjwt (>=1.7.1)"]
saml = ["python3-saml (>=1.2.1)"]
[[package]]
category = "main"
description = "HTTP library with thread-safe connection pooling, file post, and more."
name = "urllib3"
version = "1.25.8"
description = "HTTP library with thread-safe connection pooling, file post, and more."
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4"
version = "1.25.8"
[package.extras]
brotli = ["brotlipy (>=0.6.0)"]
secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"]
socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7,<2.0)"]
socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"]
[metadata]
content-hash = "62c7a654e3779d3ff79c8abf6d08a81b399a5f083eb64f6634525929b01316b2"
lock-version = "1.0"
lock-version = "1.1"
python-versions = "^3.8"
content-hash = "e96da617856b34f16f3f486aece93c33e4781e5900bc685976681848d55b1dd3"
[metadata.files]
certifi = [
@ -435,10 +462,7 @@ django-hstore = []
django-markdown2 = [
{file = "django-markdown2-0.3.1.tar.gz", hash = "sha256:f04748d56788f6291d8d35f0e53a58530e1c0b34981b046883b319b64c8117e2"},
]
django-select2 = [
{file = "django-select2-6.3.1.tar.gz", hash = "sha256:f93b5b626e5c0e8ced24e1e31027eb4850649216e4132cdc3f3880c0bed241c9"},
{file = "django_select2-6.3.1-py3-none-any.whl", hash = "sha256:7e5a3da54332cb94174a91e0a03177ce44c152049b0876424ba81fc805dbb89f"},
]
django-select2 = []
django-tree = []
djangorestframework = [
{file = "djangorestframework-3.11.0-py3-none-any.whl", hash = "sha256:05809fc66e1c997fd9a32ea5730d9f4ba28b109b9da71fccfa5ff241201fd0a4"},
@ -460,6 +484,10 @@ oauthlib = [
{file = "oauthlib-3.1.0-py2.py3-none-any.whl", hash = "sha256:df884cd6cbe20e32633f1db1072e9356f53638e4361bef4e8b03c9127c9328ea"},
{file = "oauthlib-3.1.0.tar.gz", hash = "sha256:bee41cc35fcca6e988463cacc3bcb8a96224f470ca547e697b604cc697b2f889"},
]
pbr = [
{file = "pbr-5.5.1-py2.py3-none-any.whl", hash = "sha256:b236cde0ac9a6aedd5e3c34517b423cd4fd97ef723849da6b0d2231142d89c00"},
{file = "pbr-5.5.1.tar.gz", hash = "sha256:5fad80b613c402d5b7df7bd84812548b2a61e9977387a80a5fc5c396492b13c9"},
]
pillow = [
{file = "Pillow-6.2.1-cp27-cp27m-macosx_10_6_intel.whl", hash = "sha256:4ac6148008c169603070c092e81f88738f1a0c511e07bd2bb0f9ef542d375da9"},
{file = "Pillow-6.2.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:4aad1b88933fd6dc2846552b89ad0c74ddbba2f0884e2c162aa368374bf5abab"},
@ -515,6 +543,10 @@ pyjwt = [
{file = "PyJWT-2.0.1-py3-none-any.whl", hash = "sha256:b70b15f89dc69b993d8a8d32c299032d5355c82f9b5b7e851d1a6d706dffe847"},
{file = "PyJWT-2.0.1.tar.gz", hash = "sha256:a5c70a06e1f33d81ef25eecd50d50bd30e34de1ca8b2b9fa3fe0daaabcf69bf7"},
]
pytest-runner = [
{file = "pytest-runner-5.3.0.tar.gz", hash = "sha256:ca3f58ff4957e8be6c54c55d575b235725cbbcf4dc0d5091c29c6444cfc8a5fe"},
{file = "pytest_runner-5.3.0-py3-none-any.whl", hash = "sha256:448959d9ada752de2b369cf05c1c0f9e6d2027e7d32441187c16c24c1d4d6e77"},
]
python3-openid = [
{file = "python3-openid-3.2.0.tar.gz", hash = "sha256:33fbf6928f401e0b790151ed2b5290b02545e8775f982485205a066f874aaeaf"},
{file = "python3_openid-3.2.0-py3-none-any.whl", hash = "sha256:6626f771e0417486701e0b4daff762e7212e820ca5b29fcc0d05f6f8736dfa6b"},

View File

@ -12,7 +12,7 @@ Django = "1.11.28"
django-appconf = "1.0.3"
django-flat-responsive = "2.0"
social-auth-app-django = "3.1.0"
Django-Select2 = "6.3.1"
django-select2 = {git = "https://github.com/drozdziak1/django-select2.git", rev = "038a763d9caab00be2d583675edf8a87618af5c7"}
djangorestframework = "3.11.0"
Pillow = "6.2.1"
psycopg2 = "2.8.4"

View File

@ -1,8 +1,22 @@
{ sources ? import ./nix/sources.nix, pkgs ? import sources.nixpkgs {} }:
{ sources ? import ./nix/sources.nix
, poetry2nix-olay ? import
"${sources.poetry2nix}/overlay.nix"
, nixpkgs ? sources.nixpkgs
}:
let
common-deps = import ./common-deps.nix { inherit sources; };
pkgs = import nixpkgs { overlays = [ poetry2nix-olay ]; };
spejstore-env = pkgs.poetry2nix.mkPoetryEnv {
projectDir = ./.;
};
in
pkgs.mkShell {
nativeBuildInputs = with pkgs; [poetry] ++ common-deps;
DOCKER_BUILDKIT = 1;
COMPOSE_DOCKER_CLI_BUILD = 1;
nativeBuildInputs = with pkgs; [
spejstore-env
poetry
] ++ common-deps;
}