Skip to content

Commit

Permalink
Add contrib-shell.nix to allow running contrib scripts in nix
Browse files Browse the repository at this point in the history
Just do `nix-shell contrib-shell.nix` then run any of the python
scripts in contrib/
  • Loading branch information
chrisguida committed Oct 4, 2024
1 parent d595541 commit 7a118f5
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions contrib-shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{ pkgs ? import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/nixpkgs-unstable.tar.gz";
}) {} }:

let
poetry2nix = import (builtins.fetchGit {
url = "https://github.com/nix-community/poetry2nix";
# You can replace 'main' with a specific release tag, e.g., "refs/tags/v1.4.0"
}) { inherit pkgs; };
in

pkgs.mkShell {
buildInputs = [
pkgs.poetry
(poetry2nix.mkPoetryEnv {
projectDir = ./contrib;
})
];
}

0 comments on commit 7a118f5

Please sign in to comment.