2022-06-19 01:24:56 +00:00
|
|
|
{
|
2022-09-09 14:36:35 +00:00
|
|
|
# main
|
2022-06-19 01:24:56 +00:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
2022-09-09 14:36:35 +00:00
|
|
|
};
|
2022-06-19 01:24:56 +00:00
|
|
|
|
2022-09-09 14:36:35 +00:00
|
|
|
# dev
|
|
|
|
inputs = {
|
2022-12-09 04:42:01 +00:00
|
|
|
devshell = {
|
|
|
|
url = "github:numtide/devshell";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
|
|
};
|
2022-09-09 14:36:35 +00:00
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
2022-06-19 01:24:56 +00:00
|
|
|
flake-compat = {
|
|
|
|
url = "github:edolstra/flake-compat";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
};
|
2022-09-09 14:36:35 +00:00
|
|
|
|
2022-06-19 01:24:56 +00:00
|
|
|
outputs = {
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
|
|
|
flake-utils,
|
|
|
|
...
|
|
|
|
} @ inputs:
|
2022-08-03 23:28:28 +00:00
|
|
|
{
|
2022-09-09 14:36:35 +00:00
|
|
|
overlays.default = import ./nix/overlay.nix;
|
2022-06-19 01:42:24 +00:00
|
|
|
}
|
|
|
|
// flake-utils.lib.eachSystem [
|
2022-06-19 01:24:56 +00:00
|
|
|
"x86_64-linux"
|
2022-12-09 04:38:45 +00:00
|
|
|
"aarch64-linux"
|
|
|
|
"x86_64-darwin"
|
|
|
|
"aarch64-darwin"
|
2022-06-19 01:24:56 +00:00
|
|
|
]
|
|
|
|
(
|
|
|
|
system: let
|
2022-09-09 14:36:35 +00:00
|
|
|
inherit (pkgs) deno2nix;
|
2022-06-19 01:24:56 +00:00
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
2022-09-09 14:36:35 +00:00
|
|
|
overlays = with inputs; [
|
2022-08-03 23:28:28 +00:00
|
|
|
self.overlays.default
|
2022-09-09 14:36:35 +00:00
|
|
|
devshell.overlay
|
2022-06-19 01:24:56 +00:00
|
|
|
];
|
|
|
|
};
|
2022-08-03 23:28:28 +00:00
|
|
|
in {
|
2022-12-14 04:00:56 +00:00
|
|
|
/*
|
|
|
|
TODO: It can't but I don't why
|
|
|
|
packages = flake-utils.lib.flattenTree {
|
|
|
|
simple = {
|
|
|
|
deps-link = pkgs.callPackage ./examples/simple/deps-link.nix {};
|
|
|
|
executable = pkgs.callPackage ./examples/simple/executable.nix {};
|
|
|
|
};
|
2022-06-19 01:24:56 +00:00
|
|
|
};
|
2022-12-14 04:00:56 +00:00
|
|
|
*/
|
|
|
|
packages = {
|
|
|
|
"simple/deps-link" = pkgs.callPackage ./examples/simple/deps-link.nix {};
|
|
|
|
"simple/bundled" = pkgs.callPackage ./examples/simple/bundled.nix {};
|
|
|
|
"simple/bundled-wrapper" = pkgs.callPackage ./examples/simple/bundled-wrapper.nix {};
|
|
|
|
"simple/executable" = pkgs.callPackage ./examples/simple/executable.nix {};
|
2022-06-19 01:24:56 +00:00
|
|
|
};
|
2022-12-14 04:00:56 +00:00
|
|
|
apps = {
|
|
|
|
"simple/executable" = flake-utils.lib.mkApp {
|
|
|
|
drv = self.packages.${system}."simple/executable";
|
|
|
|
name = "simple";
|
|
|
|
};
|
|
|
|
"simple/bundled-wrapper" = flake-utils.lib.mkApp {
|
|
|
|
drv = self.packages.${system}."simple/bundled-wrapper";
|
|
|
|
name = "simple";
|
|
|
|
};
|
2022-06-19 01:24:56 +00:00
|
|
|
};
|
|
|
|
|
2022-08-03 23:28:28 +00:00
|
|
|
checks = self.packages.${system};
|
2022-09-09 14:36:35 +00:00
|
|
|
devShells.default = pkgs.devshell.mkShell {
|
|
|
|
packages = with pkgs; [
|
|
|
|
alejandra
|
|
|
|
deno
|
|
|
|
treefmt
|
|
|
|
taplo-cli
|
|
|
|
];
|
2022-06-19 01:24:56 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|