mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-23 22:48:02 +03:00
49 lines
871 B
Nix
49 lines
871 B
Nix
{
|
|
config,
|
|
lib,
|
|
dream2nix,
|
|
...
|
|
}: {
|
|
imports = [
|
|
dream2nix.modules.drv-parts.pip
|
|
];
|
|
|
|
name = "my-package";
|
|
version = "1.0";
|
|
|
|
mkDerivation = {
|
|
src = ./.;
|
|
};
|
|
|
|
deps = {nixpkgs, ...}: {
|
|
inherit
|
|
(nixpkgs)
|
|
postgresql
|
|
stdenv
|
|
;
|
|
python = nixpkgs.python310;
|
|
};
|
|
|
|
buildPythonPackage = {
|
|
format = "pyproject";
|
|
};
|
|
|
|
pip = {
|
|
pypiSnapshotDate = "2023-05-03";
|
|
|
|
# pass the current directory as a requirement to pip which will then resolve
|
|
# all other requirements via the `dependencies` from pyproject.toml.
|
|
requirementsList = ["."];
|
|
|
|
# creating the lock file otherwise fails on psycopg2
|
|
nativeBuildInputs = [config.deps.postgresql];
|
|
|
|
# fix some builds via overrides
|
|
drvs = {
|
|
psycopg2.mkDerivation = {
|
|
nativeBuildInputs = [config.deps.postgresql];
|
|
};
|
|
};
|
|
};
|
|
}
|