Add copier and deps
This commit is contained in:
@@ -5,8 +5,4 @@
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
home.packages = [
|
||||
pkgs.xonsh-direnv
|
||||
];
|
||||
}
|
||||
|
||||
+4
-3
@@ -4,11 +4,11 @@ let
|
||||
guiImports = if gui then
|
||||
[ ./gui ] else [];
|
||||
|
||||
myPackages = pypackages: with pypackages; [
|
||||
pkgs.datadog-api-client
|
||||
pkgs.xonsh-direnv
|
||||
myPackages = pypackages: with pypackages; with pkgs.my-py-addons; [
|
||||
black
|
||||
copier
|
||||
datadog
|
||||
datadog-api-client
|
||||
dateutil
|
||||
flake8
|
||||
ipython
|
||||
@@ -18,6 +18,7 @@ let
|
||||
tox
|
||||
typing-extensions
|
||||
virtualenv
|
||||
xonsh-direnv
|
||||
];
|
||||
|
||||
myPython = pkgs.python3.withPackages myPackages;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
let
|
||||
myPackages = pypackages: with pypackages; [
|
||||
pkgs.xonsh-direnv
|
||||
pkgs.my-py-addons.xonsh-direnv
|
||||
virtualenv
|
||||
];
|
||||
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
{ lib, buildPythonPackage, fetchPypi, pkgs,
|
||||
colorama,
|
||||
dunamai,
|
||||
iteration-utilities,
|
||||
jinja2,
|
||||
jinja2-ansible-filters,
|
||||
packaging,
|
||||
pathspec,
|
||||
plumbum,
|
||||
pydantic,
|
||||
pygments,
|
||||
pyyaml,
|
||||
pyyaml-include,
|
||||
questionary,
|
||||
setuptools,
|
||||
wheel}:
|
||||
|
||||
let
|
||||
pydeps = [
|
||||
colorama
|
||||
dunamai
|
||||
iteration-utilities
|
||||
jinja2
|
||||
jinja2-ansible-filters
|
||||
packaging
|
||||
pathspec
|
||||
plumbum
|
||||
pydantic
|
||||
pygments
|
||||
pyyaml
|
||||
pyyaml-include
|
||||
questionary
|
||||
setuptools
|
||||
wheel
|
||||
];
|
||||
in buildPythonPackage rec {
|
||||
pname = "copier";
|
||||
version = "6.2.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-eSxm7Rpu3dhWkLoSA1/b8IemWxjIsHwlJ+NYEpbilkk=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "A library and CLI app for rendering templates";
|
||||
homepage = "https://github.com/copier-org/copier";
|
||||
license = licenses.mit;
|
||||
maintainers = [];
|
||||
};
|
||||
|
||||
doCheck = false;
|
||||
|
||||
propagatedBuildInputs = pydeps;
|
||||
|
||||
buildInputs = [];
|
||||
}
|
||||
+20
-9
@@ -1,8 +1,23 @@
|
||||
self: super:
|
||||
{
|
||||
datadog-api-client = super.callPackage ./datadog-api-client.nix {
|
||||
buildPythonPackage = self.python3.pkgs.buildPythonPackage;
|
||||
fetchPypi = self.python.pkgs.fetchPypi;
|
||||
|
||||
let
|
||||
cp = super.python3.pkgs.callPackage;
|
||||
|
||||
in rec {
|
||||
my-py-addons = rec {
|
||||
copier = cp ./copier.nix {
|
||||
inherit iteration-utilities
|
||||
jinja2-ansible-filters
|
||||
pydantic
|
||||
pyyaml-include
|
||||
;
|
||||
};
|
||||
datadog-api-client = cp ./datadog-api-client.nix {};
|
||||
iteration-utilities = cp ./iteration-utilities.nix {};
|
||||
jinja2-ansible-filters = cp ./jinja2-ansible-filters.nix {};
|
||||
pydantic = cp ./pydantic.nix {};
|
||||
pyyaml-include = cp ./pyyaml-include.nix {};
|
||||
xonsh-direnv = cp ./xonsh-direnv.nix {};
|
||||
};
|
||||
|
||||
hms = super.callPackage ./hms.nix {
|
||||
@@ -10,11 +25,7 @@ self: super:
|
||||
};
|
||||
|
||||
xonsh = super.xonsh.overridePythonAttrs (old: rec{
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [ self.xonsh-direnv ];
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [ my-py-addons.xonsh-direnv ];
|
||||
});
|
||||
|
||||
xonsh-direnv = super.callPackage ./xonsh-direnv.nix {
|
||||
buildPythonPackage = self.python3.pkgs.buildPythonPackage;
|
||||
fetchPypi = self.python.pkgs.fetchPypi;
|
||||
};
|
||||
}
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ else
|
||||
fi
|
||||
|
||||
# Build and switch
|
||||
echo "Building $(uname -m)-$target"
|
||||
echo "Building $target"
|
||||
dest=$(mktemp -d)
|
||||
pushd "$dest" > /dev/null
|
||||
nix build --impure "$src#homeConfigurations.$target.activationPackage"
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
{ lib, buildPythonPackage, fetchPypi, pkgs}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "iteration-utilities";
|
||||
version = "0.11.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit version;
|
||||
pname = "iteration_utilities";
|
||||
sha256 = "sha256-+R9BolSemn5A/1Rg/fkDO27lswXZvneUO2OlVFNMKnc=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Utilities based on Pythons iterators and generators.";
|
||||
homepage = "https://github.com/MSeifert04/iteration_utilities";
|
||||
license = licenses.afl20;
|
||||
maintainers = [];
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [];
|
||||
|
||||
doCheck = false;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{ lib, buildPythonPackage, fetchPypi, pkgs}:
|
||||
|
||||
let
|
||||
pydeps = pypkgs: with pypkgs; [
|
||||
ansible-core
|
||||
setuptools
|
||||
wheel
|
||||
];
|
||||
in buildPythonPackage rec {
|
||||
pname = "jinja2-ansible-filters";
|
||||
version = "1.3.2";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-B8EM9E1wc/TwEQLKEtmi3DG0HUfkxh7ZLvam0mabNWs=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "A port of the Jinja2 filters from Ansible";
|
||||
homepage = "https://gitlab.com/dreamer-labs/libraries/jinja2-ansible-filters";
|
||||
license = licenses.gpl3;
|
||||
maintainers = [];
|
||||
};
|
||||
|
||||
doCheck = false;
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
(python3.withPackages pydeps)
|
||||
];
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
(python3.withPackages pydeps)
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{ lib, buildPythonPackage, fetchPypi, pkgs,
|
||||
typing-extensions
|
||||
}:
|
||||
|
||||
let
|
||||
pydeps = [
|
||||
typing-extensions
|
||||
];
|
||||
in buildPythonPackage rec {
|
||||
pname = "pydantic";
|
||||
version = "1.10.2";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-kbjiGIUu9gB8K5jNhhYBxqCfGqMru7dPq1scM9Sh5BA=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Data validation and settings management using Python type hints.";
|
||||
homepage = "https://github.com/pydantic/pydantic";
|
||||
license = licenses.mit;
|
||||
maintainers = [];
|
||||
};
|
||||
|
||||
doCheck = false;
|
||||
|
||||
propagatedBuildInputs = pydeps;
|
||||
|
||||
buildInputs = [];
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
{ lib, buildPythonPackage, fetchPypi, pkgs,
|
||||
pyyaml,
|
||||
setuptools,
|
||||
setuptools-scm,
|
||||
setuptools-scm-git-archive,
|
||||
wheel
|
||||
}:
|
||||
|
||||
let
|
||||
pydeps = [
|
||||
pyyaml
|
||||
];
|
||||
in buildPythonPackage rec {
|
||||
pname = "pyyaml-include";
|
||||
version = "1.3";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-9/vrjnG1C+Dm4HRy98edv7GhW63pyToHg2n/SeV+Z3E=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "A PyYAML extension to allow includes.";
|
||||
homepage = "https://github.com/tanbro/pyyaml-include";
|
||||
license = licenses.gpl3;
|
||||
maintainers = [];
|
||||
};
|
||||
|
||||
doCheck = false;
|
||||
|
||||
propagatedBuildInputs = pydeps;
|
||||
|
||||
buildInputs = [
|
||||
setuptools
|
||||
setuptools-scm
|
||||
setuptools-scm-git-archive
|
||||
wheel
|
||||
];
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user