diff --git a/pkgs/development/web/netlify-cli/default.nix b/pkgs/development/web/netlify-cli/default.nix index 8b991faf07d4..f16cce4c1511 100644 --- a/pkgs/development/web/netlify-cli/default.nix +++ b/pkgs/development/web/netlify-cli/default.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, fetchFromGitHub }: +{ callPackage, fetchFromGitHub, lib, pkgs }: let nodePackages = import ./composition.nix { inherit pkgs; }; in @@ -9,5 +9,6 @@ in src = fetchFromGitHub (builtins.fromJSON (builtins.readFile ./netlify-cli.json)); bypassCache = true; reconstructLock = true; + passthru.tests.test = callPackage ./test.nix { }; meta.maintainers = with lib.maintainers; [ roberth ]; } diff --git a/pkgs/development/web/netlify-cli/test.nix b/pkgs/development/web/netlify-cli/test.nix new file mode 100644 index 000000000000..22e97e332189 --- /dev/null +++ b/pkgs/development/web/netlify-cli/test.nix @@ -0,0 +1,37 @@ +{ + curl, + netlify-cli, + runCommand, +}: + +runCommand "netlify-cli-test" { + nativeBuildInputs = [ + netlify-cli + curl + ]; + meta.timeout = 600; +} '' + mkdir home + export HOME=$PWD/home + + # Create a simple site + echo '