network_inventory/flake.nix

41 lines
1.2 KiB
Nix
Raw Normal View History

2021-12-08 18:07:49 +01:00
{
description = "A Python API for various tools I use at work.";
inputs = {
2022-11-13 17:51:09 +01:00
nixpkgs.url = github:NixOS/nixpkgs/nixos-22.05;
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
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 17:44:23 +01:00
overrides = pkgs.poetry2nix.defaultPoetryOverrides.extend (self: super: {
findpython = super.findpython.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.pdm ];
}
);
idna = super.idna.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.python39Packages.flit-core ];
}
);
});
2022-11-17 12:02:34 +01:00
})
2022-11-15 22:04:13 +01:00
pkgs.python39Packages.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
}