Merge pull request #352 from nix-community/overrideable-poetry-deps

Expose projectDir/pyproject/poetrylock parameters in the Poetry derivation
This commit is contained in:
adisbladis 2021-08-11 20:24:23 -05:00 committed by GitHub
commit ca83399c47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 3 deletions

View file

@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell
#!nix-shell ./shell.nix -i bash
#!nix-shell ./check-fmt.nix -i bash
#
# Just because the nixpkgs-fmt error message is not super readable. Used by
# CI.

7
check-fmt.nix Normal file
View file

@ -0,0 +1,7 @@
let
sources = import ./nix/sources.nix;
pkgs = import sources.nixpkgs { };
in
pkgs.mkShell {
nativeBuildInputs = [ pkgs.nixpkgs-fmt ];
}

View file

@ -1,11 +1,18 @@
{ lib, poetry2nix, python, fetchFromGitHub }:
{ lib
, poetry2nix
, python
, fetchFromGitHub
, projectDir ? ./.
, pyproject ? projectDir + "/pyproject.toml"
, poetrylock ? projectDir + "/poetry.lock"
}:
poetry2nix.mkPoetryApplication {
inherit python;
projectDir = ./.;
inherit projectDir pyproject poetrylock;
# Don't include poetry in inputs
__isBootstrap = true;