From 5cab1f7a4c147b6079583582231b021e5a837d7a Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Thu, 27 Jan 2022 13:57:09 -0500 Subject: [PATCH] Get Python this way? --- .circleci/config.yml | 2 +- .circleci/python.nix | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .circleci/python.nix diff --git a/.circleci/config.yml b/.circleci/config.yml index 9d9b967f1..e4d6c9e93 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -458,7 +458,7 @@ jobs: name: "Generation version" command: | # The Nix package doesn't know how to do this part, unfortunately. - nix-shell -p python --run 'python setup.py update_version' + nix-shell .circleci/python.nix --run 'python setup.py update_version' - "run": name: "Build and Test" diff --git a/.circleci/python.nix b/.circleci/python.nix new file mode 100644 index 000000000..a830ee61b --- /dev/null +++ b/.circleci/python.nix @@ -0,0 +1,11 @@ +# Define a helper environment for incidental Python tasks required on CI. +let + sources = import ../nix/sources.nix; +in +{ pkgs ? import sources."nixpkgs-21.11" { } +}: +pkgs.mkShell { + buildInputs = [ + pkgs.python3 + ]; +}