mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-23 14:31:55 +03:00
3fd2db74d3
* Make pip lock script use its own python version To make the lock script independent of the python version used in the user's project, it needs to use its own python environment. This was already the case for the mitm proxy, but not yet for the lock script itself. This commit ensures that the lock script uses its own python environment, independent of the user python version, and shares it with the mitm proxy. * Fix IOKit dependency in htop example * Add hash for git based packages * Support install git dependencies * Add test for pip with git dependency * Update lockfiles for python example projects This does not change any of the hashes or versions, just adds the type: "url" property. --------- Co-authored-by: DavHau <hsngrmpf+github@gmail.com>
35 lines
673 B
Nix
35 lines
673 B
Nix
{
|
|
perSystem = {
|
|
self',
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}: let
|
|
python3 = pkgs.python310;
|
|
in {
|
|
devShells.fetch-pip-metadata = let
|
|
package = self'.packages.fetch-pip-metadata-package;
|
|
pythonWithDeps = python3.withPackages (
|
|
ps:
|
|
package.propagatedBuildInputs
|
|
++ [
|
|
ps.black
|
|
ps.pytest
|
|
ps.pytest-cov
|
|
]
|
|
);
|
|
in
|
|
pkgs.mkShell {
|
|
packages = [
|
|
pythonWithDeps
|
|
];
|
|
};
|
|
|
|
packages.fetch-pip-metadata-package = import ./package.nix {
|
|
inherit lib;
|
|
inherit python3;
|
|
inherit (pkgs) gitMinimal nix-prefetch-scripts;
|
|
};
|
|
};
|
|
}
|