2022-09-03 14:33:33 +10:00
|
|
|
{
|
|
|
|
description = "Application packaged using poetry2nix";
|
|
|
|
|
|
|
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
|
|
|
|
inputs.poetry2nix.url = "github:nix-community/poetry2nix";
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs, flake-utils, poetry2nix }: {
|
|
|
|
overlay = nixpkgs.lib.composeManyExtensions [
|
|
|
|
poetry2nix.overlay
|
|
|
|
(final: prev: {
|
2022-12-07 13:06:25 +11:00
|
|
|
frontpage = prev.poetry2nix.mkPoetryApplication
|
|
|
|
{
|
|
|
|
python = prev.python39;
|
|
|
|
projectDir = ./.;
|
|
|
|
overrides =
|
|
|
|
prev.poetry2nix.overrides.withDefaults (final_: prev_:
|
|
|
|
nixpkgs.lib.listToAttrs
|
|
|
|
(builtins.map
|
|
|
|
(name: {
|
|
|
|
inherit name;
|
|
|
|
value = prev_."${name}".overridePythonAttrs (old: {
|
|
|
|
nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [ final_.setuptools ];
|
|
|
|
});
|
|
|
|
})
|
|
|
|
[ "beaker" "flask-pyoidc-oda" "oic" ]));
|
|
|
|
};
|
2022-09-03 14:33:33 +10:00
|
|
|
})
|
|
|
|
];
|
2022-11-02 10:48:50 +11:00
|
|
|
|
|
|
|
nixosModules = rec {
|
|
|
|
default = frontpage;
|
|
|
|
frontpage = import ./nixos;
|
|
|
|
};
|
2022-09-03 14:33:33 +10:00
|
|
|
} // (flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
let pkgs = import nixpkgs { inherit system; overlays = [ self.overlay ]; }; in
|
|
|
|
{
|
|
|
|
apps = {
|
|
|
|
frontpage = pkgs.frontpage;
|
|
|
|
};
|
|
|
|
|
|
|
|
defaultApp = pkgs.frontpage;
|
|
|
|
|
|
|
|
devShell = (pkgs.poetry2nix.mkPoetryEnv {
|
|
|
|
python = pkgs.python39;
|
|
|
|
projectDir = ./.;
|
|
|
|
extraPackages = ps: [ ps.python-lsp-server ];
|
|
|
|
}).env;
|
|
|
|
}));
|
|
|
|
}
|