diff options
author | Franz Pletz <fpletz@fnordicwalking.de> | 2024-07-06 16:01:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-06 16:01:34 +0200 |
commit | 7179de7adbf8811667357cb3f8e8fb99e8647691 (patch) | |
tree | 176c4a6777c4c267d977b8d57f37a7625615146a | |
parent | 2aeeb09cdf0da72d0da6ece89cb6682c642097c4 (diff) | |
parent | 88ca48b76aa619c56e87eb25c05e9fd09ae55c9e (diff) |
Merge pull request #322503 from pyrox0/autoprefixer-init
-rw-r--r-- | pkgs/by-name/au/autoprefixer/package.nix | 62 | ||||
-rw-r--r-- | pkgs/by-name/au/autoprefixer/tests/simple-execution.nix (renamed from pkgs/development/node-packages/package-tests/autoprefixer.nix) | 0 | ||||
-rw-r--r-- | pkgs/development/node-packages/aliases.nix | 1 | ||||
-rw-r--r-- | pkgs/development/node-packages/node-packages.json | 1 | ||||
-rw-r--r-- | pkgs/development/node-packages/node-packages.nix | 42 | ||||
-rw-r--r-- | pkgs/development/node-packages/overrides.nix | 15 |
6 files changed, 65 insertions, 56 deletions
diff --git a/pkgs/by-name/au/autoprefixer/package.nix b/pkgs/by-name/au/autoprefixer/package.nix new file mode 100644 index 0000000000000..816b37a36b67b --- /dev/null +++ b/pkgs/by-name/au/autoprefixer/package.nix @@ -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 ]; + }; +}) diff --git a/pkgs/development/node-packages/package-tests/autoprefixer.nix b/pkgs/by-name/au/autoprefixer/tests/simple-execution.nix index c889795a2ef59..c889795a2ef59 100644 --- a/pkgs/development/node-packages/package-tests/autoprefixer.nix +++ b/pkgs/by-name/au/autoprefixer/tests/simple-execution.nix diff --git a/pkgs/development/node-packages/aliases.nix b/pkgs/development/node-packages/aliases.nix index 42615e7ded616..5c16b623d2d05 100644 --- a/pkgs/development/node-packages/aliases.nix +++ b/pkgs/development/node-packages/aliases.nix @@ -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 diff --git a/pkgs/development/node-packages/node-packages.json b/pkgs/development/node-packages/node-packages.json index 0c5ef44b7bfe7..6b884b8109bf8 100644 --- a/pkgs/development/node-packages/node-packages.json +++ b/pkgs/development/node-packages/node-packages.json @@ -20,7 +20,6 @@ , {"@webassemblyjs/wast-refmt": "1.11.1"} , "alex" , "audiosprite" -, "autoprefixer" , "aws-cdk" , "awesome-lint" , "bower" diff --git a/pkgs/development/node-packages/node-packages.nix b/pkgs/development/node-packages/node-packages.nix index 48aeba1d66732..d54cc8f11c939 100644 --- a/pkgs/development/node-packages/node-packages.nix +++ b/pkgs/development/node-packages/node-packages.nix @@ -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"; diff --git a/pkgs/development/node-packages/overrides.nix b/pkgs/development/node-packages/overrides.nix index 03a9111d0bce7..dfb64749fb924 100644 --- a/pkgs/development/node-packages/overrides.nix +++ b/pkgs/development/node-packages/overrides.nix @@ -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 = { |