clean(fetchPipMetadata): remove drv-parts-module

This commit is contained in:
phaer 2023-03-31 15:06:43 +02:00
parent d4d7f2f1c8
commit 7486717898
2 changed files with 0 additions and 137 deletions

View File

@ -1,52 +0,0 @@
{
config,
lib,
drv-parts,
name,
version,
...
}: let
l = lib // builtins;
fetchPip = import ../../../pkgs/fetchPipMetadata {
inherit lib;
inherit
(config.deps)
buildPackages
stdenv
python3 # only used for proxy script
;
};
in {
imports = [
./interface.nix
../lock
drv-parts.modules.drv-parts.mkDerivation
];
inherit name version;
package-func.outputs = ["out"];
deps = {nixpkgs, ...}:
l.mapAttrs (_: l.mkDefault) {
inherit
(nixpkgs)
buildPackages
stdenv
python3 # only used for proxy script
;
python = nixpkgs.python3;
};
package-func.func = fetchPip;
package-func.args = l.mkForce (
config.fetch-pip-metadata
// {
inherit (config) name;
}
// lib.optionalAttrs (config.mkDerivation.nativeBuildInputs != null) {
inherit (config.mkDerivation) nativeBuildInputs;
}
);
}

View File

@ -1,85 +0,0 @@
{
config,
lib,
...
}: let
l = lib // builtins;
t = l.types;
in {
options.fetch-pip-metadata = {
hash = l.mkOption {
type = t.str;
description = ''
hash for the fixed output derivation
'';
};
pypiSnapshotDate = l.mkOption {
type = t.str;
description = ''
maximum release date for packages
Choose any date from the past.
'';
example = "2023-01-01";
};
nameSuffix = l.mkOption {
type = t.str;
default = "python-requirements";
description = ''
suffix of the fetcher derivation name
'';
};
noBinary = l.mkOption {
type = t.listOf t.str;
default = [];
description = ''
enforce source downloads for these package names
'';
};
onlyBinary = l.mkOption {
type = t.bool;
default = false;
description = ''
restrict to binary releases (.whl)
this allows buildPlatform independent fetching
'';
};
python = l.mkOption {
type = t.package;
default = config.deps.python;
description = ''
Specify the python version for which the packages should be downloaded.
Pip needs to be executed from that specific python version.
Pip accepts '--python-version', but this works only for wheel packages.
'';
};
pipFlags = l.mkOption {
type = t.listOf t.str;
description = ''
hash for the fixed output derivation
'';
default = [];
};
pipVersion = l.mkOption {
type = t.str;
default = "23.0";
description = ''
the pip version used for fetching
'';
example = "23.1";
};
requirementsList = l.mkOption {
type = t.listOf t.str;
default = [];
description = ''
list of strings of requirements.txt entries
'';
};
requirementsFiles = l.mkOption {
type = t.listOf t.path;
default = [];
description = ''
list of requirements.txt files
'';
};
};
}