50 lines
1.2 KiB
Nix
50 lines
1.2 KiB
Nix
{
|
|
description = "small utilities";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
nim2nix.url = "github:daylinmorgan/nim2nix";
|
|
nim2nix.inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
outputs =
|
|
{ nixpkgs, nim2nix, ... }:
|
|
let
|
|
inherit (nixpkgs.lib) genAttrs;
|
|
systems = [
|
|
"x86_64-linux"
|
|
"x86_64-darwin"
|
|
"aarch64-linux"
|
|
"aarch64-darwin"
|
|
];
|
|
forAllSystems =
|
|
f:
|
|
genAttrs systems (
|
|
system:
|
|
f (
|
|
import nixpkgs {
|
|
inherit system;
|
|
overlays = [ nim2nix.overlays.default ];
|
|
}
|
|
)
|
|
);
|
|
in
|
|
{
|
|
packages = forAllSystems (pkgs: rec {
|
|
utils = pkgs.callPackage ./meta.nix { inherit tunnel; };
|
|
tunnel-go = pkgs.callPackage ./tunnel-go { };
|
|
tunnel-nim = pkgs.callPackage ./tunnel-nim { };
|
|
tunnel = tunnel-nim;
|
|
default = utils;
|
|
});
|
|
devShells = forAllSystems (pkgs: {
|
|
default = pkgs.mkShell {
|
|
packages = with pkgs; [
|
|
go
|
|
nim
|
|
];
|
|
};
|
|
});
|
|
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
|
|
};
|
|
}
|