Skip to content

Commit

Permalink
feat: added flake
Browse files Browse the repository at this point in the history
  • Loading branch information
olynch committed Feb 29, 2024
1 parent e130430 commit 5c88b79
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.napalm.url = "github:nix-community/napalm";

# NOTE: This is optional, but is how to configure napalm's env
inputs.napalm.inputs.nixpkgs.follows = "nixpkgs";

outputs = { self, nixpkgs, napalm }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages."${system}";
in {
# Assuming the flake is in the same directory as package-lock.json
packages."${system}".bnycdn = napalm.legacyPackages."${system}".buildPackage ./. { };

devShells."${system}".default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ nodejs ];
};
};
}

0 comments on commit 5c88b79

Please sign in to comment.