From bd82b784dd4350eb1f643a17cb576a82df809a5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Fri, 27 Jan 2023 17:54:59 +0100 Subject: [PATCH] chore: nix things --- .envrc | 1 + .gitignore | 6 +++--- flake.lock | 43 +++++++++++++++++++++++++++++++++++++++++++ flake.nix | 16 ++++++++++++++++ 4 files changed, 63 insertions(+), 3 deletions(-) create mode 100644 .envrc create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore index 37ca342..1a69bed 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +.direnv/ +data/ + # https://github.com/github/gitignore/blob/main/Python.gitignore # Basic .gitignore for a python repo. @@ -130,6 +133,3 @@ dmypy.json # Pyre type checker .pyre/ - -# Data -data \ No newline at end of file diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..813ba6b --- /dev/null +++ b/flake.lock @@ -0,0 +1,43 @@ +{ + "nodes": { + "flake-utils": { + "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": 1674641431, + "narHash": "sha256-qfo19qVZBP4qn5M5gXc/h1MDgAtPA5VxJm9s8RUAkVk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9b97ad7b4330aacda9b2343396eb3df8a853b4fc", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..191b704 --- /dev/null +++ b/flake.nix @@ -0,0 +1,16 @@ +{ + description = "Proj BE PI3D"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let pkgs = nixpkgs.legacyPackages.${system}; + in { + devShell = + pkgs.mkShell { buildInputs = with pkgs; [ poetry python3 ]; }; + }); +}