Find a file
2023-06-11 21:49:56 +02:00
.github build(deps): bump cachix/install-nix-action from 19 to 20 (#28) 2023-03-21 01:35:20 +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 add buildInputs option to mkExecutable 2023-02-08 16:20:40 +01: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