nodePackages.autoprefixer: init at 10.3.1

This commit is contained in:
Luflosi 2021-07-18 12:03:10 +02:00
parent 6626933865
commit 3a7405c1be
No known key found for this signature in database
GPG key ID: 4E41E29EDCC345D0
4 changed files with 965 additions and 879 deletions

View file

@ -14,6 +14,17 @@ let
'';
};
autoprefixer = super.autoprefixer.override {
nativeBuildInputs = [ pkgs.makeWrapper ];
postInstall = ''
wrapProgram "$out/bin/autoprefixer" \
--prefix NODE_PATH : ${self.postcss}/lib/node_modules
'';
passthru.tests = {
simple-execution = pkgs.callPackage ./package-tests/autoprefixer.nix { inherit (self) autoprefixer; };
};
};
aws-azure-login = super.aws-azure-login.override {
meta.platforms = pkgs.lib.platforms.linux;
nativeBuildInputs = [ pkgs.makeWrapper ];
@ -262,7 +273,8 @@ let
nativeBuildInputs = [ pkgs.makeWrapper ];
postInstall = ''
wrapProgram "$out/bin/postcss" \
--prefix NODE_PATH : ${self.postcss}/lib/node_modules
--prefix NODE_PATH : ${self.postcss}/lib/node_modules \
--prefix NODE_PATH : ${self.autoprefixer}/lib/node_modules
'';
meta.mainProgram = "postcss";
};

View file

@ -13,6 +13,7 @@
, "@webassemblyjs/wast-refmt"
, "alloy"
, "asar"
, "autoprefixer"
, "aws-azure-login"
, "balanceofsatoshis"
, "bash-language-server"

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,25 @@
{ runCommand, autoprefixer }:
let
inherit (autoprefixer) packageName version;
in
runCommand "${packageName}-tests" { meta.timeout = 60; }
''
# get version of installed program and compare with package version
claimed_version="$(${autoprefixer}/bin/autoprefixer --version | awk '{print $2}')"
if [[ "$claimed_version" != "${version}" ]]; then
echo "Error: program version does not match package version ($claimed_version != ${version})"
exit 1
fi
# run dummy commands
${autoprefixer}/bin/autoprefixer --help > /dev/null
${autoprefixer}/bin/autoprefixer --info > /dev/null
# Testing the actual functionality is done in the test for postcss
# because autoprefixer is a postcss plugin
# needed for Nix to register the command as successful
touch $out
''