Find a file
2022-12-14 13:02:27 +09:00
.github ci: Not triggered on pull request (#20) 2022-12-09 16:51:41 +09:00
.vscode feat: Update for deno2nix v2 (#21) 2022-12-14 13:00:56 +09:00
examples feat: Update for deno2nix v2 (#21) 2022-12-14 13:00:56 +09:00
nix feat: Update for deno2nix v2 (#21) 2022-12-14 13:00:56 +09:00
.editorconfig setup env 2022-06-19 10:24:56 +09:00
.envrc setup env 2022-06-19 10:24:56 +09:00
.gitignore feat: Update for deno2nix v2 (#21) 2022-12-14 13:00:56 +09:00
default.nix setup env 2022-06-19 10:24:56 +09:00
flake.lock update nixpkgs and devshell 2022-12-08 23:52:45 -05:00
flake.nix feat: Update for deno2nix v2 (#21) 2022-12-14 13:00:56 +09:00
LICENSE Create LICENSE (#22) 2022-12-14 13:02:27 +09:00
README.md feat: Update for deno2nix v2 (#21) 2022-12-14 13:00:56 +09:00
shell.nix setup env 2022-06-19 10:24:56 +09:00
treefmt.toml setup env 2022-06-19 10:24:56 +09:00

deno2nix

Nix support for Deno

Usage

There is a sample project.

{
  inputs.deno2nix.url = "github:SnO2WMaN/deno2nix";
  inputs.devshell.url = "github:numtide/devshell";
 
  outputs = {
    self,
    nixpkgs,
    flake-utils,
    ...
  } @ inputs:
    flake-utils.lib.eachDefaultSystem (system: let
      inherit (pkgs) deno2nix;
      pkgs = import nixpkgs {
        inherit system;
        overlays = with inputs; [
          devshell.overlay
          deno2nix.overlays.default
        ];
      };
    in {
      packages.executable = deno2nix.mkExecutable {
        pname = "simple-executable";
        version = "0.1.0";
      
        src = ./.;
        bin = "simple";
      
        entrypoint = "./mod.ts";
        lockfile = "./deno.lock";
        config = "./deno.jsonc";
      
        allow = {
          all = true;
        };
      });
}

Thanks