diff --git a/.circleci/config.yml b/.circleci/config.yml index ea3d50de5..dd877ca7f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -449,6 +449,7 @@ jobs: environment: NIX_PATH: "nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-19.09-small.tar.gz" + SOURCE: "nix/" steps: - "checkout" @@ -465,7 +466,7 @@ jobs: # build a couple simple little dependencies that don't take # advantage of multiple cores and we get a little speedup by doing # them in parallel. - nix-build --cores 3 --max-jobs 2 nix/ + nix-build --cores 3 --max-jobs 2 "$SOURCE" nixos-21-05: <<: *NIXOS @@ -474,7 +475,8 @@ jobs: # Note this doesn't look more similar to the 19.09 NIX_PATH URL because # there was some internal shuffling by the NixOS project about how they # publish stable revisions. - NIX_PATH: "nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/heads/nixos-21.05-small.tar.gz" + NIX_PATH: "nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/d32b07e6df276d78e3640eb43882b80c9b2b3459.tar.gz" + SOURCE: "nix/py3.nix" typechecks: docker: diff --git a/nix/overlays.nix b/nix/overlays.nix index f5ef72cc0..fbd0ce3bb 100644 --- a/nix/overlays.nix +++ b/nix/overlays.nix @@ -23,4 +23,11 @@ self: super: { collections-extended = python-super.pythonPackages.callPackage ./collections-extended.nix { }; }; }; + + python39 = super.python39.override { + packageOverrides = python-self: python-super: { + # collections-extended is not part of nixpkgs at this time. + collections-extended = python-super.pythonPackages.callPackage ./collections-extended.nix { }; + }; + }; } diff --git a/nix/py3.nix b/nix/py3.nix new file mode 100644 index 000000000..34ede49dd --- /dev/null +++ b/nix/py3.nix @@ -0,0 +1,7 @@ +# This is the main entrypoint for the Tahoe-LAFS derivation. +{ pkgs ? import { } }: +# Add our Python packages to nixpkgs to simplify the expression for the +# Tahoe-LAFS derivation. +let pkgs' = pkgs.extend (import ./overlays.nix); +# Evaluate the expression for our Tahoe-LAFS derivation. +in pkgs'.python39.pkgs.callPackage ./tahoe-lafs.nix { }