Merge branch 'poetry' of github.com:Nebucatnetzer/network_inventory into poetry

This commit is contained in:
Andreas Zweili 2022-11-17 18:13:57 +01:00
commit f2741061b3
2 changed files with 7 additions and 64 deletions

View File

@ -15,21 +15,6 @@
"type": "github"
}
},
"flake-utils_2": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1668189330,
@ -46,32 +31,10 @@
"type": "github"
}
},
"poetry2nix": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1668394823,
"narHash": "sha256-UJqW+Zp1boVhTKfWel2WTi7Qn0R9hfpVeSRdJYPJwXQ=",
"owner": "nix-community",
"repo": "poetry2nix",
"rev": "3cc82ca6ccca2a06dbb05cb0b74efd5d50e60d48",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "poetry2nix",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"poetry2nix": "poetry2nix"
"nixpkgs": "nixpkgs"
}
}
},

View File

@ -5,43 +5,23 @@
flake-utils = {
url = github:numtide/flake-utils;
};
poetry2nix = {
url = "github:nix-community/poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, flake-utils, poetry2nix }:
{
# Nixpkgs overlay providing the application
overlay = nixpkgs.lib.composeManyExtensions [
poetry2nix.overlay
(final: prev: {
# The application
network_inventory = prev.poetry2nix.mkPoetryApplication {
projectDir = ./.;
};
})
];
} // (flake-utils.lib.eachDefaultSystem (system:
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlay ];
};
in
{
apps = {
network_inventory = pkgs.network_inventory;
};
defaultApp = pkgs.network_inventory;
devShell = pkgs.mkShell {
buildInputs = [
pkgs.gnumake
(pkgs.poetry2nix.mkPoetryEnv {
projectDir = ./.;
})
pkgs.python39Packages.poetry
pkgs.network_inventory
];
};
}));
});
}