nix: initial nix flake
All checks were successful
gitea-physics/pyewjn/pipeline/head This commit looks good

This commit is contained in:
Deepak Mallubhotla 2022-06-04 13:12:50 -05:00
parent ff60ec4015
commit 89cfefaff7

51
flake.nix Normal file
View File

@ -0,0 +1,51 @@
{
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 }:
{
# Nixpkgs overlay providing the application
overlay = nixpkgs.lib.composeManyExtensions [
poetry2nix.overlay
(final: prev: {
# The application
pyewjn = prev.poetry2nix.mkPoetryApplication {
overrides = [
prev.poetry2nix.defaultPoetryOverrides
];
projectDir = ./.;
};
pyewjnEnv = prev.poetry2nix.mkPoetryEnv {
overrides = [
prev.poetry2nix.defaultPoetryOverrides
];
projectDir = ./.;
};
})
];
} // (flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlay ];
};
in
{
apps = {
pyewjn = pkgs.pyewjn;
};
defaultApp = pkgs.pyewjn;
devShell = pkgs.mkShell {
buildInputs = [
pkgs.poetry
pkgs.pyewjnEnv
pkgs.pyewjn
];
};
}));
}