This commit is contained in:
atagen 2026-02-25 12:18:18 +11:00
commit 0e5218513e
4 changed files with 128 additions and 0 deletions

38
flake.nix Normal file
View file

@ -0,0 +1,38 @@
{
description = "Nix plugin providing a `scope` builtin for constructing nested attrsets from dotted paths";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
in
{
packages = forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
nix = pkgs.nix;
in
{
default = pkgs.stdenv.mkDerivation {
pname = "nix-scope-plugin";
version = "0.1.0";
src = self;
nativeBuildInputs = [ pkgs.cmake pkgs.pkg-config ];
buildInputs = [ nix nix.dev pkgs.boost pkgs.nlohmann_json ];
};
});
devShells = forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
nix = pkgs.nix;
in
{
default = pkgs.mkShell {
packages = [ pkgs.cmake pkgs.pkg-config nix nix.dev pkgs.boost pkgs.nlohmann_json ];
};
});
};
}