migrate to flake part

This commit is contained in:
EatThePooh 2025-09-15 13:25:39 +07:00
parent 64af6e9fbc
commit 26f60eb96b
10 changed files with 300 additions and 234 deletions

33
example/flake.nix Normal file
View file

@ -0,0 +1,33 @@
{
description = "Usage example";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
flake-root.url = "github:srid/flake-root";
# replace with "github:voleum-org/deno-with-packages"
deno-with-packages.url = "path:../";
};
outputs = inputs@{ flake-parts, flake-root, deno-with-packages, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
flake-root.flakeModule
deno-with-packages.flakeModule
];
systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
perSystem = { config, pkgs, ... }: {
deno = {
enable = true;
lockfiles = [ ./deno.lock ];
};
devShells.default = pkgs.mkShell {
inputsFrom = [ config.flake-root.devShell ];
buildInputs = [ config.packages.deno ];
};
};
};
}