Genesis buttoned up
Removed lots of overlays that are redundant now Added copier to home tools Added static DHCP leases to dnsmasq Improved router Added ability to read Jinja2 template files
This commit is contained in:
@@ -1,57 +0,0 @@
|
||||
{ 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 = [];
|
||||
}
|
||||
+8
-16
@@ -3,7 +3,6 @@ final: prev:
|
||||
let
|
||||
myPackages = pypackages: with pypackages; [
|
||||
black
|
||||
copier
|
||||
dateutil
|
||||
flake8
|
||||
ipython
|
||||
@@ -42,28 +41,21 @@ in rec {
|
||||
xonsh-apipenv = cp ./xonsh-apipenv.nix {};
|
||||
xonsh-direnv = cp ./xonsh-direnv.nix {};
|
||||
xontrib-vox = cp ./xonsh-vox.nix {};
|
||||
copier = cp ./copier.nix {
|
||||
inherit (python-final)
|
||||
iteration-utilities
|
||||
jinja2-ansible-filters
|
||||
pyyaml-include;
|
||||
};
|
||||
iteration-utilities = cp ./iteration-utilities.nix {};
|
||||
jinja2-ansible-filters = cp ./jinja2-ansible-filters.nix {};
|
||||
pyyaml-include = cp ./pyyaml-include.nix {};
|
||||
})
|
||||
];
|
||||
|
||||
brew = prev.callPackage ./homebrew.nix {};
|
||||
|
||||
enwiki-dump = prev.callPackage ./enwiki-dump.nix {};
|
||||
hms = prev.callPackage ./hms.nix {
|
||||
pkgs = final.pkgs;
|
||||
};
|
||||
inject = prev.callPackage ./inject.nix { inherit (final) pkgs; };
|
||||
setup-ssh = prev.callPackage ./setup-ssh.nix {
|
||||
pkgs = final.pkgs;
|
||||
};
|
||||
hms = prev.callPackage ./hms.nix {
|
||||
pkgs = final.pkgs;
|
||||
};
|
||||
jinja2-cli = prev.python3.pkgs.callPackage ./jinja2-cli.nix {};
|
||||
template = prev.callPackage ./template.nix { };
|
||||
|
||||
enwiki-dump = prev.callPackage ./enwiki-dump.nix {};
|
||||
inject = prev.callPackage ./inject.nix { inherit (final) pkgs; };
|
||||
|
||||
xonsh = prev.xonsh.overridePythonAttrs (old: rec{
|
||||
python3 = final.gregpy;
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
{ 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;
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
{ 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,39 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
|
||||
flake8,
|
||||
jinja2,
|
||||
pytestCheckHook,
|
||||
setuptools,
|
||||
}:
|
||||
|
||||
buildPythonPackage {
|
||||
pname = "jinja2-cli";
|
||||
version = "0.8.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mattrobenolt";
|
||||
repo = "jinja2-cli";
|
||||
rev = "0.8.2";
|
||||
hash = "sha256-67gYt0nZX+VTVaoSxVXGzbRiXD7EMsVBFWC8wHo+Vw0=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
jinja2
|
||||
setuptools
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
flake8
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A CLI interface for Jinja2 templates";
|
||||
homepage = "https://github.com/mattrobenolt/jinja2-cli";
|
||||
license = licenses.bsd2;
|
||||
maintainers = [ lib.maintainers.greg ];
|
||||
};
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
{ 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; [
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{ stdenv, jinja2-cli }:
|
||||
|
||||
name: vars: template:
|
||||
(stdenv.mkDerivation {
|
||||
inherit name;
|
||||
|
||||
passAsFile = [ "varsData" ];
|
||||
varsData = builtins.toJSON vars;
|
||||
|
||||
nativeBuildInputs = [ jinja2-cli ];
|
||||
phases = [ "buildPhase" "installPhase" ];
|
||||
|
||||
buildPhase = ''${jinja2-cli}/bin/jinja2 --format=json ${template} $varsDataPath > result'';
|
||||
installPhase = "cp result $out";
|
||||
})
|
||||
Reference in New Issue
Block a user