2021-12-08 18:07:49 +01:00
|
|
|
{
|
|
|
|
description = "A Python API for various tools I use at work.";
|
|
|
|
inputs = {
|
2022-11-19 18:10:59 +01:00
|
|
|
nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable;
|
2022-11-17 18:15:27 +01:00
|
|
|
flake-utils.url = github:numtide/flake-utils;
|
2021-12-08 18:07:49 +01:00
|
|
|
};
|
2022-11-17 12:02:34 +01:00
|
|
|
outputs = { self, nixpkgs, flake-utils }:
|
2022-11-16 21:33:49 +01:00
|
|
|
flake-utils.lib.eachDefaultSystem (system:
|
2021-12-08 18:07:49 +01:00
|
|
|
let
|
2022-11-16 22:31:34 +01:00
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
};
|
2022-03-01 09:56:58 +01:00
|
|
|
in
|
|
|
|
{
|
|
|
|
devShell = pkgs.mkShell {
|
|
|
|
buildInputs = [
|
|
|
|
pkgs.gnumake
|
2022-11-17 12:02:34 +01:00
|
|
|
(pkgs.poetry2nix.mkPoetryEnv {
|
|
|
|
projectDir = ./.;
|
2022-11-19 18:10:59 +01:00
|
|
|
overrides = pkgs.poetry2nix.defaultPoetryOverrides.extend
|
|
|
|
(self: super: {
|
|
|
|
findpython = super.findpython.overridePythonAttrs (
|
|
|
|
old: {
|
2022-11-19 18:20:16 +01:00
|
|
|
buildInputs = (old.buildInputs or [ ]) ++ [ super.pdm ];
|
2022-11-19 18:10:59 +01:00
|
|
|
}
|
|
|
|
);
|
|
|
|
django-floppyforms =
|
|
|
|
super.django-floppyforms.overridePythonAttrs
|
|
|
|
(
|
|
|
|
old: {
|
2022-11-19 18:20:16 +01:00
|
|
|
buildInputs = (old.buildInputs or [ ]) ++ [ super.setuptools ];
|
2022-11-19 18:10:59 +01:00
|
|
|
}
|
|
|
|
);
|
|
|
|
django-crispy-forms = super.django-crispy-forms.overridePythonAttrs
|
|
|
|
(
|
|
|
|
old: {
|
2022-11-19 18:20:16 +01:00
|
|
|
buildInputs = (old.buildInputs or [ ]) ++ [ super.setuptools ];
|
2022-11-19 18:10:59 +01:00
|
|
|
}
|
|
|
|
);
|
2022-11-19 18:42:11 +01:00
|
|
|
django-nested-admin = super.django-crispy-forms.overridePythonAttrs
|
|
|
|
(
|
|
|
|
old: {
|
|
|
|
buildInputs = (old.buildInputs or [ ]) ++ [ super.setuptools ];
|
|
|
|
}
|
|
|
|
);
|
2022-11-19 18:10:59 +01:00
|
|
|
exceptiongroup = super.exceptiongroup.overridePythonAttrs
|
|
|
|
(
|
|
|
|
old: {
|
2022-11-19 18:20:16 +01:00
|
|
|
buildInputs = (old.buildInputs or [ ]) ++ [ super.flit-scm ];
|
2022-11-19 18:10:59 +01:00
|
|
|
}
|
|
|
|
);
|
2022-11-19 18:35:56 +01:00
|
|
|
python-monkey-business = super.python-monkey-business.overridePythonAttrs
|
|
|
|
(
|
|
|
|
old: {
|
|
|
|
buildInputs = (old.buildInputs or [ ]) ++ [ super.flit-scm ];
|
|
|
|
}
|
|
|
|
);
|
|
|
|
pytoolconfig = super.pytoolconfig.overridePythonAttrs
|
|
|
|
(
|
|
|
|
old: {
|
|
|
|
buildInputs = (old.buildInputs or [ ]) ++ [ super.pdm ];
|
|
|
|
}
|
|
|
|
);
|
2022-11-19 18:10:59 +01:00
|
|
|
});
|
2022-11-17 12:02:34 +01:00
|
|
|
})
|
2022-11-19 18:10:59 +01:00
|
|
|
pkgs.python310Packages.poetry
|
2022-03-01 09:56:58 +01:00
|
|
|
];
|
2021-12-08 18:07:49 +01:00
|
|
|
};
|
2022-11-17 18:15:27 +01:00
|
|
|
shellHook = ''
|
|
|
|
export DJANGO_SETTINGS_MODULE=network_inventory.settings.local
|
|
|
|
'';
|
2022-11-16 21:33:49 +01:00
|
|
|
});
|
2021-12-08 18:07:49 +01:00
|
|
|
}
|