Skip to content

Commit

Permalink
Add very basic Nix Flake
Browse files Browse the repository at this point in the history
This is only to provide a small nixpkgs overlay and also make it easier
to run the tests with just "nix flake check".

Signed-off-by: aszlig <[email protected]>
  • Loading branch information
aszlig committed Oct 17, 2020
1 parent 1bd5ecc commit 3b029cd
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
result
result-*
/flake.lock
21 changes: 21 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
description = "Build NPM packages in Nix and lightweight NPM registry";

outputs = { self, nixpkgs }: let
systems = [ "i686-linux" "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
in {
overlay = final: prev: {
napalm = {
inherit (import ./. { pkgs = final; })
buildPackage snapshotFromPackageLockJson;
};
};

checks = nixpkgs.lib.genAttrs systems (system: let
pkgs = nixpkgs.legacyPackages.${system};
in removeAttrs (import ./. { inherit pkgs; }) [
"buildPackage" "napalm-registry" "napalm-registry-devshell"
"snapshotFromPackageLockJson"
]);
};
}

0 comments on commit 3b029cd

Please sign in to comment.