mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-11-23 09:04:37 +03:00
ci: expose fetchPipMetadata package and build it
This commit is contained in:
parent
e93f0f2aea
commit
013b7f98d1
18
v1/nix/modules/flake-parts/packages.fetchPipMetadata.nix
Normal file
18
v1/nix/modules/flake-parts/packages.fetchPipMetadata.nix
Normal file
@ -0,0 +1,18 @@
|
||||
# evaluate packages from `/**/modules/drvs` and export them via `flake.packages`
|
||||
{
|
||||
self,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
perSystem = {
|
||||
system,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
packages.fetchPipMetadata = pkgs.callPackage ../../pkgs/fetchPipMetadata/package.nix {
|
||||
python = pkgs.python3;
|
||||
};
|
||||
};
|
||||
}
|
@ -49,7 +49,7 @@
|
||||
path = [nix git] ++ nativeBuildInputs;
|
||||
|
||||
package = import ./package.nix {
|
||||
inherit lib python;
|
||||
inherit git lib python;
|
||||
};
|
||||
|
||||
args = writeText "pip-args" (builtins.toJSON {
|
||||
|
@ -4,12 +4,14 @@
|
||||
# Pip needs to be executed from that specific python version.
|
||||
# Pip accepts '--python-version', but this works only for wheel packages.
|
||||
python,
|
||||
git,
|
||||
}: let
|
||||
package = python.pkgs.buildPythonPackage {
|
||||
name = "fetch_pip_metadata";
|
||||
format = "flit";
|
||||
src = ./src;
|
||||
nativeBuildInputs = [
|
||||
git
|
||||
python.pkgs.pytestCheckHook
|
||||
];
|
||||
propagatedBuildInputs = with python.pkgs; [
|
||||
|
@ -7,6 +7,7 @@
|
||||
python = pkgs.python3;
|
||||
package = import ../package.nix {
|
||||
inherit lib python;
|
||||
inherit (pkgs) git;
|
||||
};
|
||||
pythonWithDeps = python.withPackages (
|
||||
ps:
|
||||
|
Loading…
Reference in New Issue
Block a user