Merge pull request #322503 from pyrox0/autoprefixer-init

This commit is contained in:
Franz Pletz 2024-07-06 16:01:34 +02:00 committed by GitHub
commit 7179de7adb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 65 additions and 56 deletions

View File

@ -0,0 +1,62 @@
{
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 ];
};
})

View File

@ -56,6 +56,7 @@ mapAliases {
"@zwave-js/server" = pkgs.zwave-js-server; # Added 2023-09-09
alloy = pkgs.titanium-alloy; # added 2023-08-17
antennas = pkgs.antennas; # added 2023-07-30
inherit (pkgs) autoprefixer; # added 2024-06-25
inherit (pkgs) asar; # added 2023-08-26
inherit (pkgs) auto-changelog; # added 2024-06-25
inherit (pkgs) aws-azure-login; # added 2023-09-30

View File

@ -20,7 +20,6 @@
, {"@webassemblyjs/wast-refmt": "1.11.1"}
, "alex"
, "audiosprite"
, "autoprefixer"
, "aws-cdk"
, "awesome-lint"
, "bower"

View File

@ -27033,15 +27033,6 @@ let
sha512 = "v7w209VPj4L6pPn/ftFRJu31Oa8QagwcVw7BZmLCUWU4AQoc954rX9ogSIahDf67Pg+GjPbkW/Kn9XWnlWJG0g==";
};
};
"fraction.js-4.3.7" = {
name = "fraction.js";
packageName = "fraction.js";
version = "4.3.7";
src = fetchurl {
url = "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz";
sha512 = "ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==";
};
};
"fragment-cache-0.2.1" = {
name = "fragment-cache";
packageName = "fragment-cache";
@ -63305,39 +63296,6 @@ in
bypassCache = true;
reconstructLock = true;
};
autoprefixer = nodeEnv.buildNodePackage {
name = "autoprefixer";
packageName = "autoprefixer";
version = "10.4.19";
src = fetchurl {
url = "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.19.tgz";
sha512 = "BaENR2+zBZ8xXhM4pUaKUxlVdxZ0EZhjvbopwnXmxRUfqDmwSpC2lAi/QXvx7NRdPCo1WKEcEF6mV64si1z4Ew==";
};
dependencies = [
sources."browserslist-4.23.1"
sources."caniuse-lite-1.0.30001634"
sources."electron-to-chromium-1.4.802"
sources."escalade-3.1.2"
sources."fraction.js-4.3.7"
sources."nanoid-3.3.7"
sources."node-releases-2.0.14"
sources."normalize-range-0.1.2"
sources."picocolors-1.0.1"
sources."postcss-8.4.38"
sources."postcss-value-parser-4.2.0"
sources."source-map-js-1.2.0"
sources."update-browserslist-db-1.0.16"
];
buildInputs = globalBuildInputs;
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#readme";
license = "MIT";
};
production = true;
bypassCache = true;
reconstructLock = true;
};
aws-cdk = nodeEnv.buildNodePackage {
name = "aws-cdk";
packageName = "aws-cdk";

View File

@ -29,17 +29,6 @@ final: prev: {
buildInputs = [ final.node-gyp-build ];
};
autoprefixer = prev.autoprefixer.override {
nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ];
postInstall = ''
wrapProgram "$out/bin/autoprefixer" \
--prefix NODE_PATH : ${final.postcss}/lib/node_modules
'';
passthru.tests = {
simple-execution = callPackage ./package-tests/autoprefixer.nix { inherit (final) autoprefixer; };
};
};
bower2nix = prev.bower2nix.override {
nativeBuildInputs = [ pkgs.buildPackages.makeWrapper ];
postInstall = ''
@ -225,7 +214,7 @@ final: prev: {
version = esbuild-version;
src = fetchurl {
url = "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-${esbuild-version}.tgz";
sha512 = "sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==";
sha512 = "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==";
};
};
esbuild-linux-arm64 = {
@ -265,7 +254,7 @@ final: prev: {
postInstall = ''
wrapProgram "$out/bin/postcss" \
--prefix NODE_PATH : ${final.postcss}/lib/node_modules \
--prefix NODE_PATH : ${final.autoprefixer}/lib/node_modules
--prefix NODE_PATH : ${pkgs.autoprefixer}/node_modules
ln -s '${final.postcss}/lib/node_modules/postcss' "$out/lib/node_modules/postcss"
'';
passthru.tests = {