mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-21 13:57:51 +00:00
Document the parameters and also accept an extras
parameter
This commit is contained in:
parent
6154be1a96
commit
60dd2ee413
26
default.nix
26
default.nix
@ -1,11 +1,24 @@
|
||||
let
|
||||
sources = import nix/sources.nix;
|
||||
in
|
||||
{ pkgsVersion ? "nixpkgs-21.11"
|
||||
, pkgs ? import sources.${pkgsVersion} { }
|
||||
, pypiData ? sources.pypi-deps-db
|
||||
, pythonVersion ? "python37"
|
||||
, mach-nix ? import sources.mach-nix {
|
||||
{
|
||||
pkgsVersion ? "nixpkgs-21.11" # a string which choses a nixpkgs from the
|
||||
# niv-managed sources data
|
||||
|
||||
, pkgs ? import sources.${pkgsVersion} { } # nixpkgs itself
|
||||
|
||||
, pypiData ? sources.pypi-deps-db # the pypi package database snapshot to use
|
||||
# for dependency resolution
|
||||
|
||||
, pythonVersion ? "python37" # a string chosing the python derivation from
|
||||
# nixpkgs to target
|
||||
|
||||
, extras ? [] # a list of strings identifying tahoe-lafs extras, the
|
||||
# dependencies of which the resulting package will also depend
|
||||
# on
|
||||
|
||||
, mach-nix ? import sources.mach-nix { # the mach-nix package to use to build
|
||||
# the tahoe-lafs package
|
||||
inherit pkgs pypiData;
|
||||
python = pythonVersion;
|
||||
}
|
||||
@ -22,6 +35,9 @@ mach-nix.buildPythonPackage {
|
||||
# re-build when files that make no difference to the package have changed.
|
||||
src = pkgs.lib.cleanSource ./.;
|
||||
|
||||
# Select whichever package extras were requested.
|
||||
inherit extras;
|
||||
|
||||
# Define some extra requirements that mach-nix does not automatically detect
|
||||
# from inspection of the source. We typically don't need to put version
|
||||
# constraints on any of these requirements. The pypi-deps-db we're
|
||||
|
Loading…
Reference in New Issue
Block a user