python-template: backport some changes from clan-cli
This commit is contained in:
@@ -1,10 +1,16 @@
|
|||||||
{
|
{ self, ... }: {
|
||||||
perSystem = { pkgs, ... }:
|
perSystem = { self', pkgs, ... }:
|
||||||
let
|
let
|
||||||
package = pkgs.callPackage ./default.nix { };
|
name = "python-template";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# packages.${name} = package;
|
packages.${name} = pkgs.callPackage ./default.nix { };
|
||||||
checks.python-template = package.tests.check;
|
|
||||||
|
devShells.${name} = pkgs.callPackage ./shell.nix {
|
||||||
|
inherit self;
|
||||||
|
package = (self'.packages.${name});
|
||||||
|
};
|
||||||
|
|
||||||
|
checks.python-template = self'.packages.${name}.tests.check;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
requires = ["setuptools"]
|
requires = ["setuptools"]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
[tool.setuptools.packages.find]
|
[tool.setuptools]
|
||||||
include = ["my_tool*"]
|
packages = ["my_tool"]
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "my_tool"
|
name = "my_tool"
|
||||||
|
|||||||
@@ -1,11 +1,6 @@
|
|||||||
{ pkgs ? import <nixpkgs> { } }:
|
{ package, pkgs, ... }:
|
||||||
let
|
let
|
||||||
lib = pkgs.lib;
|
pythonWithDeps = pkgs.python3.withPackages (
|
||||||
python3 = pkgs.python3;
|
|
||||||
package = import ./default.nix {
|
|
||||||
inherit lib python3;
|
|
||||||
};
|
|
||||||
pythonWithDeps = python3.withPackages (
|
|
||||||
ps:
|
ps:
|
||||||
package.propagatedBuildInputs
|
package.propagatedBuildInputs
|
||||||
++ package.devDependencies
|
++ package.devDependencies
|
||||||
|
|||||||
Reference in New Issue
Block a user