nix: initial nix flake
All checks were successful
gitea-physics/pyewjn/pipeline/head This commit looks good
All checks were successful
gitea-physics/pyewjn/pipeline/head This commit looks good
This commit is contained in:
parent
ff60ec4015
commit
89cfefaff7
51
flake.nix
Normal file
51
flake.nix
Normal 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
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
}));
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user