Initialize flake from templates#python

This commit is contained in:
Jaculabilis 2022-08-11 23:32:44 +00:00
parent 5146c1cb4d
commit 06dc7c9996
5 changed files with 54 additions and 0 deletions

1
server/.envrc Normal file
View File

@ -0,0 +1 @@
use flake

6
server/.gitignore vendored Normal file
View File

@ -0,0 +1,6 @@
__pycache__
secrets.py
runs
.ipynb_*
*.csv
.direnv

7
server/default.nix Normal file
View File

@ -0,0 +1,7 @@
(import (
fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz";
sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2"; }
) {
src = ./.;
}).defaultNix

33
server/flake.nix Normal file
View File

@ -0,0 +1,33 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {self, nixpkgs, flake-utils}:
let
makeFlakeOutputs = system:
let
pname = "intake";
pkgs = nixpkgs.legacyPackages."${system}";
in
{
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
python3Packages.poetry
];
};
defaultPackage = with pkgs.poetry2nix; mkPoetryApplication {
projectDir = builtins.path { path = ./.; name = pname; };
preferWheels = true;
};
defaultApp = flake-utils.lib.mkApp {
drv = self.defaultPackage."${system}";
};
};
in
with flake-utils.lib; eachSystem defaultSystems makeFlakeOutputs;
}

7
server/shell.nix Normal file
View File

@ -0,0 +1,7 @@
(import (
fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/99f1c2157fba4bfe6211a321fd0ee43199025dbf.tar.gz";
sha256 = "0x2jn3vrawwv9xp15674wjz9pixwjyj3j771izayl962zziivbx2"; }
) {
src = ./.;
}).shellNix