2024-08-16 11:02:24 -05:00
|
|
|
{
|
|
|
|
description = "small utilities";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
2024-08-30 12:06:08 -05:00
|
|
|
nim2nix.url = "github:daylinmorgan/nim2nix";
|
2024-09-03 10:56:05 -05:00
|
|
|
nim2nix.inputs.nixpkgs.follows = "nixpkgs";
|
2024-08-16 11:02:24 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs =
|
2024-08-30 12:06:08 -05:00
|
|
|
{ nixpkgs, nim2nix, ... }:
|
2024-08-16 11:02:24 -05:00
|
|
|
let
|
|
|
|
inherit (nixpkgs.lib) genAttrs;
|
2024-08-16 14:07:25 -05:00
|
|
|
systems = [
|
|
|
|
"x86_64-linux"
|
|
|
|
"x86_64-darwin"
|
|
|
|
"aarch64-linux"
|
|
|
|
"aarch64-darwin"
|
|
|
|
];
|
2024-08-30 12:06:08 -05:00
|
|
|
forAllSystems =
|
|
|
|
f:
|
|
|
|
genAttrs systems (
|
|
|
|
system:
|
|
|
|
f (
|
|
|
|
import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
overlays = [ nim2nix.overlays.default ];
|
|
|
|
}
|
|
|
|
)
|
|
|
|
);
|
2024-08-16 11:02:24 -05:00
|
|
|
in
|
|
|
|
{
|
2024-08-16 14:07:25 -05:00
|
|
|
packages = forAllSystems (pkgs: rec {
|
2024-08-16 14:21:25 -05:00
|
|
|
utils = pkgs.callPackage ./meta.nix { inherit tunnel; };
|
2024-10-30 16:20:09 -05:00
|
|
|
tunnel = pkgs.callPackage ./tunnel { };
|
2024-08-16 14:21:25 -05:00
|
|
|
default = utils;
|
2024-08-16 14:07:25 -05:00
|
|
|
});
|
2024-08-16 11:02:24 -05:00
|
|
|
devShells = forAllSystems (pkgs: {
|
|
|
|
default = pkgs.mkShell {
|
|
|
|
packages = with pkgs; [
|
|
|
|
nim
|
|
|
|
];
|
|
|
|
};
|
|
|
|
});
|
|
|
|
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
|
|
|
|
};
|
|
|
|
}
|