From 530a45dfa4754964b65a7576052fa0c982bccd2a Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Tue, 6 Jun 2023 12:23:06 -0500 Subject: [PATCH 1/4] Tweaks to Darwin --- home/home.nix | 4 ++-- home/xonsh_header.xsh | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/home/home.nix b/home/home.nix index 76d05a6..5b2097b 100644 --- a/home/home.nix +++ b/home/home.nix @@ -28,14 +28,14 @@ ]); }; - home.file.".pip/pip.conf" = (lib.strings.concatStringsSep "\n" [ + home.file.".pip/pip.conf".text = (lib.strings.concatStringsSep "\n" [ "[global]" "retries = 1" "index-url = https://pypi.python.org/simple" "extra-index-url =" " https://pypi.ivrtechnlology.com/simple/" " https://pypiev.ivrtechnology.com/simple/" - ]; + ]); home.stateVersion = "22.05"; home.packages = with pkgs; [ diff --git a/home/xonsh_header.xsh b/home/xonsh_header.xsh index 22441ec..1c332a3 100644 --- a/home/xonsh_header.xsh +++ b/home/xonsh_header.xsh @@ -23,3 +23,5 @@ $PATH.insert(0, Path("~/.local/bin").expanduser()) if platform == "darwin": $PATH.append(Path("/opt/homebrew/bin/")) + $PATH.append(Path("/run/current-system/sw/bin")) + $PATH.append(Path("/nix/var/nix/profiles/default/bin")) From 250e8eddd063811e4a1bb5186dc55f93cda3cafd Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Wed, 7 Jun 2023 20:10:03 -0500 Subject: [PATCH 2/4] Remove datadog-api-client package --- darwin/work/default.nix | 2 -- overlays/datadog-api-client.nix | 40 --------------------------------- overlays/default.nix | 3 --- overlays/packages.nix | 6 ----- 4 files changed, 51 deletions(-) delete mode 100644 overlays/datadog-api-client.nix diff --git a/darwin/work/default.nix b/darwin/work/default.nix index a6e6219..7992605 100644 --- a/darwin/work/default.nix +++ b/darwin/work/default.nix @@ -2,8 +2,6 @@ { #greg.pypackages = with pkgs; [ - # datadog-api-client - # datadog # dateutil # ipython # pyyaml diff --git a/overlays/datadog-api-client.nix b/overlays/datadog-api-client.nix deleted file mode 100644 index b4afe32..0000000 --- a/overlays/datadog-api-client.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ lib, buildPythonPackage, fetchPypi, pkgs}: - -let - pydeps = pypkgs: with pypkgs; [ - certifi - dateutils - python-dateutil - setuptools - setuptools_scm - typing-extensions - urllib3 - ]; - -in buildPythonPackage rec { - pname = "datadog-api-client"; - version = "2.3.0"; - - src = fetchPypi { - inherit pname version; - sha256 = "CIEQlw8S2lZk1n+ld/Ne7lBx4SKaJZUZfNbw9KvUcjk="; - }; - - meta = with lib; { - description = "Datadog API client support"; - homepage = "https://github.com/DataDog/datadog-api-client-python"; - license = licenses.asl20; - maintainers = []; - }; - - doCheck = false; - - buildInputs = with pkgs; [ - (python3.withPackages pydeps) - ]; - - nativeBuildInputs = with pkgs; [ - (python3.withPackages pydeps) - git - ]; -} diff --git a/overlays/default.nix b/overlays/default.nix index 977f1ee..e87678b 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -6,8 +6,6 @@ let myPackages = pypackages: with pypackages; with pkgs.my-py-addons; [ black copier - datadog - datadog-api-client dateutil flake8 ipython @@ -61,7 +59,6 @@ in rec { pyyaml-include ; }; - datadog-api-client = cp ./datadog-api-client.nix {}; iteration-utilities = cp ./iteration-utilities.nix {}; jinja2-ansible-filters = cp ./jinja2-ansible-filters.nix {}; molecule = cp ./molecule.nix {}; diff --git a/overlays/packages.nix b/overlays/packages.nix index 73b5ee6..6ec6270 100644 --- a/overlays/packages.nix +++ b/overlays/packages.nix @@ -8,12 +8,6 @@ flake-utils.lib.eachDefaultSystemMap (system: python = pkgs.packages.python3; cp = pkgs.packages.python3.pkgs.callPackage; in { - datadog-api-client = callPackage ./datadog-api-client.nix { - inherit pkgs lib; - buildPythonPackage = python.pkgs.buildPythonPackage; - fetchPypi = pkgs.python.pkgs.fetchPypi; - }; - hms = pkgs.callPackage ./hms.nix { inherit pkgs; }; From 7908f77e4d3a79ac9467eb71428e0befb16e04e5 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Thu, 8 Jun 2023 00:53:19 -0500 Subject: [PATCH 3/4] Remove old zim/kiwix and update inputs --- flake.lock | 12 ++++---- overlays/default.nix | 39 ++++++++++++------------- overlays/kiwix-tools.nix | 46 ----------------------------- overlays/libkiwix.nix | 62 ---------------------------------------- overlays/zimlib.nix | 57 ------------------------------------ 5 files changed, 24 insertions(+), 192 deletions(-) delete mode 100644 overlays/kiwix-tools.nix delete mode 100644 overlays/libkiwix.nix delete mode 100644 overlays/zimlib.nix diff --git a/flake.lock b/flake.lock index 31e9866..b00d4d4 100644 --- a/flake.lock +++ b/flake.lock @@ -93,11 +93,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1681202837, - "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", + "lastModified": 1685518550, + "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", "owner": "numtide", "repo": "flake-utils", - "rev": "cfacdce06f30d2b68473a46042957675eebb3401", + "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", "type": "github" }, "original": { @@ -243,11 +243,11 @@ ] }, "locked": { - "lastModified": 1682982995, - "narHash": "sha256-PK0pSY48JkcLDFphafjpLqeTDs0XUqGMHjsiNuEq5s0=", + "lastModified": 1686130269, + "narHash": "sha256-3CVQARW+cANIPO9qGDlJ351lOY5qo+FVW2cI/sURvmw=", "owner": "nix-community", "repo": "NixOS-WSL", - "rev": "c5d7db84c422be515dac8fc26420900c349374e8", + "rev": "d3b2fdbd9a0096764ebfd80c2f4bb8bcfbe920ce", "type": "github" }, "original": { diff --git a/overlays/default.nix b/overlays/default.nix index e87678b..d994a91 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,7 +1,7 @@ -self: super: +final: prev: let - cp = super.python3.pkgs.callPackage; + cp = prev.python3.pkgs.callPackage; myPackages = pypackages: with pypackages; with pkgs.my-py-addons; [ black @@ -21,14 +21,14 @@ let xonsh-direnv ]; - myPython = super.python3.withPackages myPackages; + myPython = prev.python3.withPackages myPackages; macOver = file: og: - if super.stdenv.isDarwin then - (super.callPackage file {}) else - super."${og}"; + if prev.stdenv.isDarwin then + (prev.callPackage file {}) else + prev."${og}"; - buildFirefoxXpiAddon = super.lib.makeOverridable ({ stdenv ? super.stdenv - , fetchurl ? super.fetchurl, pname, version, addonId, url, sha256, meta, ... + buildFirefoxXpiAddon = prev.lib.makeOverridable ({ stdenv ? prev.stdenv + , fetchurl ? prev.fetchurl, pname, version, addonId, url, sha256, meta, ... }: stdenv.mkDerivation { name = "${pname}-${version}"; @@ -48,7 +48,7 @@ let }); in rec { - #python3 = self.unstable.python3; + #python3 = final.unstable.python3; gregpy = myPython; my-py-addons = rec { @@ -76,22 +76,19 @@ in rec { xonsh-direnv = cp ./xonsh-direnv.nix {}; }; - #fcitx-engines = if ! super.stdenv.isDarwin then super.fcitx5 else super.fcitx-engines; - brew = super.callPackage ./homebrew.nix {}; + #fcitx-engines = if ! prev.stdenv.isDarwin then prev.fcitx5 else prev.fcitx-engines; + brew = prev.callPackage ./homebrew.nix {}; - enwiki-dump = super.callPackage ./enwiki-dump.nix {}; - hms = super.callPackage ./hms.nix { - pkgs = self.pkgs; + enwiki-dump = prev.callPackage ./enwiki-dump.nix {}; + hms = prev.callPackage ./hms.nix { + pkgs = final.pkgs; }; - setup-ssh = super.callPackage ./setup-ssh.nix { - pkgs = self.pkgs; + setup-ssh = prev.callPackage ./setup-ssh.nix { + pkgs = final.pkgs; }; - kiwix-tools = super.callPackage ./kiwix-tools.nix {}; - libkiwix = super.callPackage ./libkiwix.nix {}; - zimlib = super.callPackage ./zimlib.nix {}; - xonsh = super.xonsh.overridePythonAttrs (old: rec{ - python3 = self.gregpy; + xonsh = prev.xonsh.overridePythonAttrs (old: rec{ + python3 = final.gregpy; propagatedBuildInputs = old.propagatedBuildInputs ++ [ my-py-addons.xonsh-direnv ]; }); diff --git a/overlays/kiwix-tools.nix b/overlays/kiwix-tools.nix deleted file mode 100644 index 0a542ef..0000000 --- a/overlays/kiwix-tools.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ lib, pkgs, stdenv - , cmake - , meson - , ninja - , pkg-config - - , curl - , libkiwix - , libmicrohttpd - , pugixml - , zimlib - , ...}: - -stdenv.mkDerivation rec { - pname = "kiwix-tools"; - version = "3.4.0"; - - src = pkgs.fetchFromGitHub { - owner = "kiwix"; - repo = pname; - rev = version; - sha256 = "sha256-r3/aTH/YoDuYpKLPakP4toS3OtiRueTUjmR34rdmr+w="; - }; - - nativeBuildInputs = [ - meson - ninja - pkg-config - ]; - - buildInputs = [ - curl - libkiwix - libmicrohttpd - pugixml - zimlib - ]; - - meta = with lib; { - description = "An offline read for Web content tools (HTTP server, search, etc)"; - homepage = "https://kiwix.org"; - license = licenses.gpl3Plus; - platforms = platforms.all; - maintainers = [ "Greg Hellings " ]; - }; -} diff --git a/overlays/libkiwix.nix b/overlays/libkiwix.nix deleted file mode 100644 index 111d513..0000000 --- a/overlays/libkiwix.nix +++ /dev/null @@ -1,62 +0,0 @@ -{ lib, pkgs, stdenv - , curl - , icu - , pugixml - , mustache-hpp - , libmicrohttpd - , zimlib - , zlib - - , bash - , gcc - , gtest - , meson - , ninja - , pkg-config - , python3 - , ...}: - -stdenv.mkDerivation rec { - pname = "libkiwix"; - version = "12.0.0"; - - src = pkgs.fetchFromGitHub { - owner = "kiwix"; - repo = pname; - rev = version; - sha256 = "sha256-4FxLxJxVhqbeNqX4vorHkROUuRURvE6AXlteIZCEBtc="; - }; - - nativeBuildInputs = [ - bash - gcc - gtest - meson - ninja - pkg-config - python3 - ]; - - buildInputs = [ - curl - icu - libmicrohttpd - mustache-hpp - pugixml - zimlib - zlib - ]; - - mesonFlags = [ "--debug" "-Dc_args=-I${zimlib}/include/" ]; - - # Built-in python script uses /usr/bin/env - patchPhase = "patchShebangs --build scripts/*"; - - meta = with lib; { - description = "Kiwix file library for use by other applications"; - homepage = "https://kiwix.org"; - license = licenses.gpl3Plus; - platforms = platforms.all; - maintainers = [ "Greg Hellings " ]; - }; -} diff --git a/overlays/zimlib.nix b/overlays/zimlib.nix deleted file mode 100644 index ff00ac2..0000000 --- a/overlays/zimlib.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ lib, stdenv, fetchFromGitHub -, meson, ninja, pkg-config -, python3 -, icu -, libuuid -, xapian -, xz -, zstd -, gtest -}: - -stdenv.mkDerivation rec { - pname = "zimlib"; - version = "8.1.0"; - - src = fetchFromGitHub { - owner = "openzim"; - repo = "libzim"; - rev = version; - sha256 = "sha256-ab7UUF+I0/xaGChvdjylEQRHLOjmtg/wk+/JEGehGLE="; - }; - - nativeBuildInputs = [ - meson - pkg-config - ninja - python3 - ]; - - propagatedBuildInputs = [ - icu - libuuid - xapian - xz - zstd - ]; - - postPatch = '' - patchShebangs scripts - ''; - - mesonFlags = [ "-Dtest_data_dir=none" ]; - - checkInputs = [ - gtest - ]; - - doCheck = true; - - meta = with lib; { - description = "Library for reading and writing ZIM files"; - homepage = "https://www.openzim.org/wiki/Zimlib"; - license = licenses.gpl2; - maintainers = with maintainers; [ ajs124 ]; - platforms = platforms.linux; - }; -} From e2ca8491391b4b2e0267e90db471c54625c769d8 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Thu, 15 Jun 2023 13:56:13 -0500 Subject: [PATCH 4/4] Remove molecule from overlays --- overlays/default.nix | 10 ------ overlays/molecule-containers.nix | 46 -------------------------- overlays/molecule-docker.nix | 46 -------------------------- overlays/molecule-podman.nix | 44 ------------------------- overlays/molecule.nix | 56 -------------------------------- 5 files changed, 202 deletions(-) delete mode 100644 overlays/molecule-containers.nix delete mode 100644 overlays/molecule-docker.nix delete mode 100644 overlays/molecule-podman.nix delete mode 100644 overlays/molecule.nix diff --git a/overlays/default.nix b/overlays/default.nix index d994a91..d46b68d 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -61,16 +61,6 @@ in rec { }; iteration-utilities = cp ./iteration-utilities.nix {}; jinja2-ansible-filters = cp ./jinja2-ansible-filters.nix {}; - molecule = cp ./molecule.nix {}; - molecule-containers = cp ./molecule-containers.nix { - inherit molecule molecule-docker molecule-podman; - }; - molecule-docker = cp ./molecule-docker.nix { - inherit molecule; - }; - molecule-podman = cp ./molecule-podman.nix { - inherit molecule; - }; pydantic = cp ./pydantic.nix {}; pyyaml-include = cp ./pyyaml-include.nix {}; xonsh-direnv = cp ./xonsh-direnv.nix {}; diff --git a/overlays/molecule-containers.nix b/overlays/molecule-containers.nix deleted file mode 100644 index e217ed2..0000000 --- a/overlays/molecule-containers.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ lib, buildPythonPackage, fetchPypi, pkgs, -setuptools, setuptools-scm, setuptools-scm-git-archive, wheel, -molecule, -molecule-docker, -molecule-podman, -}: - -let - pydeps = [ - molecule - molecule-docker - molecule-podman - ]; -in buildPythonPackage rec { - pname = "molecule-containers"; - version = "2.0.0"; - - src = fetchPypi { - inherit pname version; - sha256 = "sha256-yD90kAFyhhT5cnhIdVhamaR8vIT7jjfwUkRmDqfUx5w="; - }; - - meta = with lib; { - description = "A pluin for Molecule to run in Podman/Docker containers"; - homepage = "https://github.com/ansible-community/molecule-containers"; - license = licenses.mit; - maintainers = []; - }; - - doCheck = false; - - # Gets pulled into running environments as well - propagatedBuildInputs = pydeps; - - format = "pyproject"; - # Only needed at the buid stage - buildInputs = [ - setuptools - #setuptools-scm - #setuptools-scm-git-archive - #wheel - ]; - - nativeBuildInputs = with pkgs; [ - ]; -} diff --git a/overlays/molecule-docker.nix b/overlays/molecule-docker.nix deleted file mode 100644 index 52d4d27..0000000 --- a/overlays/molecule-docker.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ lib, buildPythonPackage, fetchPypi, pkgs, -setuptools, setuptools-scm, setuptools-scm-git-archive, wheel, -docker, -molecule, -selinux-python, -}: - -let - pydeps = [ - docker - molecule - selinux-python - ]; -in buildPythonPackage rec { - pname = "molecule-docker"; - version = "2.1.0"; - - src = fetchPypi { - inherit pname version; - sha256 = "sha256-GVuXZzy8IzXPpoEIFt5cv4B1B781Cp0WypiyJLFkcUU="; - }; - - meta = with lib; { - description = "A plugin for Molecule providing Docker resources"; - homepage = "https://github.com/ansible-community/molecule-docker"; - license = licenses.mit; - maintainers = []; - }; - - doCheck = false; - - # Gets pulled into running environments as well - propagatedBuildInputs = pydeps; - - format = "pyproject"; # For when it has only pyproject.toml - # Only needed at the buid stage - buildInputs = [ - setuptools - setuptools-scm - setuptools-scm-git-archive - wheel - ]; - - nativeBuildInputs = with pkgs; [ - ]; -} diff --git a/overlays/molecule-podman.nix b/overlays/molecule-podman.nix deleted file mode 100644 index 2683b06..0000000 --- a/overlays/molecule-podman.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ lib, buildPythonPackage, fetchPypi, pkgs, -setuptools, setuptools-scm, setuptools-scm-git-archive, wheel, -molecule, -selinux-python, -}: - -let - pydeps = [ - molecule - selinux-python - ]; -in buildPythonPackage rec { - pname = "molecule-podman"; - version = "2.0.3"; - - src = fetchPypi { - inherit pname version; - sha256 = "sha256-zqLqysVPEpgkUw01Rp3de/8QmpTrzYQIgor4wNq/XHo="; - }; - - meta = with lib; { - description = "A plugin for Molecule allowing Podman resources"; - homepage = "https://github.com/ansible-community/molecule-podman"; - license = licenses.mit; - maintainers = []; - }; - - doCheck = false; - - # Gets pulled into running environments as well - propagatedBuildInputs = pydeps; - - format = "pyproject"; # For when it has only pyproject.toml - # Only needed at the buid stage - buildInputs = [ - setuptools - setuptools-scm - setuptools-scm-git-archive - wheel - ]; - - nativeBuildInputs = with pkgs; [ - ]; -} diff --git a/overlays/molecule.nix b/overlays/molecule.nix deleted file mode 100644 index 6c5a3ff..0000000 --- a/overlays/molecule.nix +++ /dev/null @@ -1,56 +0,0 @@ -{ lib, buildPythonPackage, fetchPypi, pkgs, -setuptools, setuptools-scm, setuptools-scm-git-archive, wheel, -ansible-compat, -click-help-colors, -cookiecutter, -enrich, -jsonschema, -packaging, -pluggy, -pyyaml, -}: - -let - pydeps = [ - ansible-compat - click-help-colors - cookiecutter - enrich - jsonschema - packaging - pluggy - pyyaml - ]; -in buildPythonPackage rec { - pname = "molecule"; - version = "4.0.2"; - - src = fetchPypi { - inherit pname version; - sha256 = "sha256-EzYvdBocgCeaKyX0mh9Vw7/DRQVMX+7c3N+SjhED4eU="; - }; - - meta = with lib; { - description = "A test framework for Ansible."; - homepage = "https://github.com/ansible-community/molecule"; - license = licenses.mit; - maintainers = []; - }; - - doCheck = false; - - # Gets pulled into running environments as well - propagatedBuildInputs = pydeps; - - format = "pyproject"; - # Only needed at the buid stage - buildInputs = [ - setuptools - setuptools-scm - setuptools-scm-git-archive - wheel - ]; - - nativeBuildInputs = with pkgs; [ - ]; -}