depot/third_party/nixpkgs/pkgs/by-name/au/autoprefixer/package.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

62 lines
1.3 KiB
Nix

{
lib,
stdenv,
nodejs,
pnpm_9,
fetchFromGitHub,
callPackage,
nix-update-script
}: stdenv.mkDerivation (finalAttrs: {
pname = "autoprefixer";
version = "10.4.19";
src = fetchFromGitHub {
owner = "postcss";
repo = "autoprefixer";
rev = finalAttrs.version;
hash = "sha256-Br0z573QghkYHLgF9/OFp8FL0bIW2frW92ohJnHhgHE=";
};
nativeBuildInputs = [
nodejs
pnpm_9.configHook
];
pnpmDeps = pnpm_9.fetchDeps {
inherit (finalAttrs) pname version src;
hash = "sha256-sGcqM87xR9XTL/MUO7fGpI1cPK7EgJNpeYwBmqVNB6I=";
};
installPhase = ''
runHook preInstall
mkdir $out
mv bin/ $out
mv lib/ $out
mv node_modules/ $out
mv data/ $out
mv package.json $out
runHook postInstall
'';
postFixup = ''
patchShebangs $out/bin/autoprefixer
'';
passthru = {
tests = {
simple-execution = callPackage ./tests/simple-execution.nix { };
};
updateScript = nix-update-script { };
};
meta = {
description = "Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website";
homepage = "https://github.com/postcss/autoprefixer";
changelog = "https://github.com/postcss/autoprefixer/releases/tag/${finalAttrs.version}";
license = lib.licenses.mit;
mainProgram = "autoprefixer";
maintainers = with lib.maintainers; [ pyrox0 ];
};
})