From 82bf793ff879e3beb874da5194b68ab406bfa228 Mon Sep 17 00:00:00 2001 From: Patrick Date: Thu, 14 Nov 2024 21:20:11 +0100 Subject: [PATCH] feat: update --- flake.lock | 30 ++++++++++++------------- flake.nix | 7 +++--- nic.nix | 66 ------------------------------------------------------ 3 files changed, 19 insertions(+), 84 deletions(-) delete mode 100644 nic.nix diff --git a/flake.lock b/flake.lock index ea77584..db2131c 100644 --- a/flake.lock +++ b/flake.lock @@ -47,11 +47,11 @@ "pyproject-nix": "pyproject-nix" }, "locked": { - "lastModified": 1730723587, - "narHash": "sha256-3ewuvm7VB/q3sxn9vzzQ0902PlSdqKqqagr8XbC1hIo=", + "lastModified": 1731424167, + "narHash": "sha256-nKKeRwq7mxcW8cBTmPKzSg0DR/inVrtuJudVM81GISU=", "owner": "nix-community", "repo": "dream2nix", - "rev": "51943fca6b95cb9649236bacf5d7c8d9af4c3bec", + "rev": "44d41411686bc798876bd6d9f36a4c1143138d85", "type": "github" }, "original": { @@ -158,11 +158,11 @@ "treefmt": "treefmt" }, "locked": { - "lastModified": 1731305765, - "narHash": "sha256-byo8b2j2nEumZqEuHFbGzTSu+RV3ijJTshS6O2rLcxc=", + "lastModified": 1731605339, + "narHash": "sha256-O0vWXiC1pBYXgdsKbQGw0Jev8Sc6dxR9Up0NKgIeH9g=", "owner": "yusdacra", "repo": "nix-cargo-integration", - "rev": "b26200f7cc3a37b1b503ac67f54f52678019494f", + "rev": "1680ec3b8192fe4a0e8ca4973affcd1f4bb67de3", "type": "github" }, "original": { @@ -217,11 +217,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1731139594, - "narHash": "sha256-IigrKK3vYRpUu+HEjPL/phrfh7Ox881er1UEsZvw9Q4=", + "lastModified": 1731319897, + "narHash": "sha256-PbABj4tnbWFMfBp6OcUK5iGy1QY+/Z96ZcLpooIbuEI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "76612b17c0ce71689921ca12d9ffdc9c23ce40b2", + "rev": "dc460ec76cbff0e66e269457d7b728432263166c", "type": "github" }, "original": { @@ -292,11 +292,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1730814269, - "narHash": "sha256-fWPHyhYE6xvMI1eGY3pwBTq85wcy1YXqdzTZF+06nOg=", + "lastModified": 1731363552, + "narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "d70155fdc00df4628446352fc58adc640cd705c2", + "rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0", "type": "github" }, "original": { @@ -364,11 +364,11 @@ ] }, "locked": { - "lastModified": 1731292155, - "narHash": "sha256-fYVoUUtSadbOrH0z0epVQDsStBDS/S/fAK//0ECQAAI=", + "lastModified": 1731551344, + "narHash": "sha256-wr8OOqgw7M1pWfe4W7WA5lErzOVMg3zvrrxx/dy/nPo=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "7c4cd99ed7604b79e8cb721099ac99c66f656b3a", + "rev": "27570abfd3461875f11fc07c9b01c141a6332b4f", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 71d2003..5697c7b 100644 --- a/flake.nix +++ b/flake.nix @@ -19,7 +19,6 @@ inputs.nci.flakeModule inputs.pre-commit-hooks.flakeModule inputs.treefmt-nix.flakeModule - ./nic.nix ]; systems = [ @@ -86,9 +85,11 @@ }; # Rust - nci.projects.nixp-meta.path = ./.; - nci.crates.nixp-meta = rec { + nci.projects.nixp-meta = { + path = ./.; numtideDevshell = "default"; + }; + nci.crates.nixp-meta = rec { depsDrvConfig = { mkDerivation = { nativeBuildInputs = [ pkgs.pkg-config ]; diff --git a/nic.nix b/nic.nix deleted file mode 100644 index 6bc0b64..0000000 --- a/nic.nix +++ /dev/null @@ -1,66 +0,0 @@ -{ - perSystem = - { - lib, - config, - ... - }: - { - options.nci.crates = lib.mkOption { - type = lib.types.lazyAttrsOf ( - lib.types.submoduleWith { - modules = [ - { - options = { - numtideDevshell = lib.mkOption { - type = lib.types.nullOr lib.types.str; - default = null; - description = '' - If set, the given numtide devshell will be populated with - the required packages and environment variables for this crate. - ''; - }; - }; - } - ]; - } - ); - }; - - config.devshells = lib.mkMerge ( - lib.flatten ( - lib.flip lib.mapAttrsToList config.nci.crates ( - project: cfg: - lib.optional (cfg.numtideDevshell != null) { - ${cfg.numtideDevshell} = { - packagesFrom = [ config.nci.toolchains.shell ]; - packages = - (lib.flatten ( - map (f: [ - (lib.getDev f) - f - ]) config.nci.outputs.${project}.devShell.packages - )) - ++ [ config.nci.toolchains.shell ]; - env = - (lib.mapAttrsToList (k: v: { - name = k; - value = v; - }) config.nci.outputs.${project}.devShell.env) - ++ [ - { - name = "PKG_CONFIG_PATH"; - prefix = "$DEVSHELL_DIR/lib/pkgconfig"; - } - { - name = "LD_LIBRARY_PATH"; - prefix = "$DEVSHELL_DIR/lib"; - } - ]; - }; - } - ) - ) - ); - }; -}