From 5c88b79340d619ca3bc67ebd80be57f1e7448df2 Mon Sep 17 00:00:00 2001 From: Owen Lynch Date: Thu, 29 Feb 2024 16:30:55 -0600 Subject: [PATCH] feat: added flake --- flake.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 flake.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..2875c1e --- /dev/null +++ b/flake.nix @@ -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 ]; + }; + }; +}