forked from serokell/nix-npm-buildpackage
-
Notifications
You must be signed in to change notification settings - Fork 10
/
flake.nix
30 lines (29 loc) · 1000 Bytes
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{
description = "Build npm and yarn packages";
outputs = { self, nixpkgs }: {
legacyPackages.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.callPackage ./default.nix {};
overlays.default = final: prev: {
inherit (final.callPackage ./. { }) mkNodeModules buildNpmPackage buildYarnPackage;
};
checks.x86_64-linux = let
nixpkgs' = nixpkgs.legacyPackages.x86_64-linux;
in {
npm6 = import ./tests/buildNpmPackage {
pkgs = nixpkgs';
npm-buildpackage = self.legacyPackages.x86_64-linux.override {
nodejs = nixpkgs'.nodejs-14_x;
};
};
npm8 = import ./tests/buildNpmPackage {
pkgs = nixpkgs';
npm-buildpackage = self.legacyPackages.x86_64-linux.override {
nodejs = nixpkgs'.nodejs-18_x;
};
};
yarn = import ./tests/buildYarnPackage {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
npm-buildpackage = self.legacyPackages.x86_64-linux;
};
};
};
}