From 111239c73bdc1cf76c0ffb69b192bf1793ff76bc Mon Sep 17 00:00:00 2001 From: Pyrox Date: Sun, 30 Jun 2024 17:56:25 -0400 Subject: [PATCH] add library --- lib/default.nix | 83 +++++++++++++++++++ .../python-interp-table.nix | 11 +-- packages/libsets/default.nix | 79 ------------------ 3 files changed, 85 insertions(+), 88 deletions(-) create mode 100644 lib/default.nix rename packages/python-interp-table/default.nix => lib/python-interp-table.nix (94%) delete mode 100644 packages/libsets/default.nix diff --git a/lib/default.nix b/lib/default.nix new file mode 100644 index 0000000..4666b0a --- /dev/null +++ b/lib/default.nix @@ -0,0 +1,83 @@ +{ inputs, ... }: +{ + python-interp-table = import ./python-interp-table.nix { inherit inputs; }; + libsets = [ + { + name = "asserts"; + description = "assertion functions"; + } + { + name = "attrsets"; + description = "attribute set functions"; + } + { + name = "strings"; + description = "string manipulation functions"; + } + { + name = "versions"; + description = "version string functions"; + } + { + name = "trivial"; + description = "miscellaneous functions"; + } + { + name = "fixedPoints"; + baseName = "fixed-points"; + description = "explicit recursion functions"; + } + { + name = "lists"; + description = "list manipulation functions"; + } + { + name = "debug"; + description = "debugging functions"; + } + { + name = "options"; + description = "NixOS / nixpkgs option handling"; + } + { + name = "path"; + description = "path functions"; + } + { + name = "filesystem"; + description = "filesystem functions"; + } + { + name = "fileset"; + description = "file set functions"; + } + { + name = "sources"; + description = "source filtering functions"; + } + { + name = "cli"; + description = "command-line serialization functions"; + } + { + name = "generators"; + description = "functions that create file formats from nix data structures"; + } + { + name = "gvariant"; + description = "GVariant formatted string serialization functions"; + } + { + name = "customisation"; + description = "Functions to customise (derivation-related) functions, derivatons, or attribute sets"; + } + { + name = "meta"; + description = "functions for derivation metadata"; + } + { + name = "derivations"; + description = "miscellaneous derivation-specific functions"; + } + ]; +} diff --git a/packages/python-interp-table/default.nix b/lib/python-interp-table.nix similarity index 94% rename from packages/python-interp-table/default.nix rename to lib/python-interp-table.nix index 42d6d07..c8efe32 100644 --- a/packages/python-interp-table/default.nix +++ b/lib/python-interp-table.nix @@ -1,13 +1,6 @@ -{ - pkgs ? ( - import ../.. { - config = { }; - overlays = [ ]; - } - ), - ... -}: +{ inputs }: let + pkgs = inputs.nixpkgs; lib = pkgs.lib; inherit (lib.attrsets) attrNames filterAttrs; inherit (lib.lists) diff --git a/packages/libsets/default.nix b/packages/libsets/default.nix deleted file mode 100644 index 8f6dd86..0000000 --- a/packages/libsets/default.nix +++ /dev/null @@ -1,79 +0,0 @@ -_: [ - { - name = "asserts"; - description = "assertion functions"; - } - { - name = "attrsets"; - description = "attribute set functions"; - } - { - name = "strings"; - description = "string manipulation functions"; - } - { - name = "versions"; - description = "version string functions"; - } - { - name = "trivial"; - description = "miscellaneous functions"; - } - { - name = "fixedPoints"; - baseName = "fixed-points"; - description = "explicit recursion functions"; - } - { - name = "lists"; - description = "list manipulation functions"; - } - { - name = "debug"; - description = "debugging functions"; - } - { - name = "options"; - description = "NixOS / nixpkgs option handling"; - } - { - name = "path"; - description = "path functions"; - } - { - name = "filesystem"; - description = "filesystem functions"; - } - { - name = "fileset"; - description = "file set functions"; - } - { - name = "sources"; - description = "source filtering functions"; - } - { - name = "cli"; - description = "command-line serialization functions"; - } - { - name = "generators"; - description = "functions that create file formats from nix data structures"; - } - { - name = "gvariant"; - description = "GVariant formatted string serialization functions"; - } - { - name = "customisation"; - description = "Functions to customise (derivation-related) functions, derivatons, or attribute sets"; - } - { - name = "meta"; - description = "functions for derivation metadata"; - } - { - name = "derivations"; - description = "miscellaneous derivation-specific functions"; - } -]