Merge pull request 'fawltydeps: add new tool' (#1) from fawltydeps into main
Reviewed-on: #1
This commit is contained in:
commit
7ca48ab76e
2 changed files with 63 additions and 2 deletions
|
@ -7,7 +7,7 @@
|
||||||
let
|
let
|
||||||
inherit (builtins) listToAttrs mapAttrs;
|
inherit (builtins) listToAttrs mapAttrs;
|
||||||
|
|
||||||
allPackageNames = [ "d2" "d2plugin-tala" "d2full" ];
|
allPackageNames = [ "d2" "d2plugin-tala" "d2full" "fawltydeps" ];
|
||||||
mkAllPackages = pkgs':
|
mkAllPackages = pkgs':
|
||||||
let
|
let
|
||||||
d2-unwrapped = pkgs'.callPackage ./pkgs/d2/d2-unwrapped.nix { };
|
d2-unwrapped = pkgs'.callPackage ./pkgs/d2/d2-unwrapped.nix { };
|
||||||
|
@ -15,9 +15,10 @@
|
||||||
d2 = pkgs'.callPackage ./pkgs/d2 {
|
d2 = pkgs'.callPackage ./pkgs/d2 {
|
||||||
inherit d2-unwrapped d2plugin-tala;
|
inherit d2-unwrapped d2plugin-tala;
|
||||||
};
|
};
|
||||||
|
fawltydeps = pkgs'.callPackage ./pkgs/fawltydeps { };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
inherit d2 d2plugin-tala;
|
inherit d2 d2plugin-tala fawltydeps;
|
||||||
d2-full = d2.override { withTala = true; };
|
d2-full = d2.override { withTala = true; };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
60
pkgs/fawltydeps/default.nix
Normal file
60
pkgs/fawltydeps/default.nix
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
{ lib
|
||||||
|
, poetry2nix
|
||||||
|
, fetchFromGitHub
|
||||||
|
, python39
|
||||||
|
, python39Packages
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
poetryOverrides = poetry2nix.defaultPoetryOverrides.extend (full: prev: {
|
||||||
|
colorama = prev.colorama.overridePythonAttrs (old: {
|
||||||
|
buildInputs = old.buildInputs ++ [ prev.hatchling ];
|
||||||
|
});
|
||||||
|
iniconfig = prev.iniconfig.overridePythonAttrs (old: {
|
||||||
|
buildInputs = old.buildInputs ++ [ prev.hatchling prev.hatch-vcs ];
|
||||||
|
});
|
||||||
|
filelock = prev.filelock.overridePythonAttrs (old: {
|
||||||
|
buildInputs = old.buildInputs ++ [ prev.hatchling prev.hatch-vcs ];
|
||||||
|
});
|
||||||
|
packaging = prev.packaging.overridePythonAttrs (old: {
|
||||||
|
buildInputs = old.buildInputs ++ [ prev.flit-core ];
|
||||||
|
});
|
||||||
|
pathspec = prev.pathspec.overridePythonAttrs (old: {
|
||||||
|
buildInputs = old.buildInputs ++ [ prev.flit-core ];
|
||||||
|
});
|
||||||
|
nox = prev.nox.overridePythonAttrs (old: {
|
||||||
|
buildInputs = old.buildInputs ++ [ prev.setuptools ];
|
||||||
|
});
|
||||||
|
exceptiongroup = prev.exceptiongroup.overridePythonAttrs (old: {
|
||||||
|
buildInputs = old.buildInputs ++ [ prev.flit-scm ];
|
||||||
|
});
|
||||||
|
mypy = prev.mypy.overridePythonAttrs (old: {
|
||||||
|
buildInputs = old.buildInputs ++ [ full.types-psutil ];
|
||||||
|
});
|
||||||
|
types-psutil = prev.buildPythonPackage rec {
|
||||||
|
pname = "types-psutil";
|
||||||
|
version = "5.9.5";
|
||||||
|
|
||||||
|
src = prev.fetchPypi {
|
||||||
|
inherit version;
|
||||||
|
pname = "types-psutil";
|
||||||
|
sha256 = "sha256-vvkd4Ja3f/e8OpK6/kZu5V+EIobB1zRli3wmslkHglM=";
|
||||||
|
};
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "psutil-stubs" ];
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "tweag";
|
||||||
|
repo = "FawltyDeps";
|
||||||
|
rev = "0201e74a158c5774db9150e1e70f01e76bad34e7";
|
||||||
|
sha256 = "sha256-kSAy6IOS+G+e7hG4ZseglhOsnJ7Tg87MaMRCWUoSJdA=";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
poetry2nix.mkPoetryApplication {
|
||||||
|
version = "2023-03-14";
|
||||||
|
python = python39;
|
||||||
|
projectDir = "${src}";
|
||||||
|
overrides = poetryOverrides;
|
||||||
|
}
|
Loading…
Reference in a new issue