push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,77 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
callPackage,
testers,
runCommand,
writeText,
nix-update-script,
lessc,
}:
buildNpmPackage rec {
pname = "lessc";
version = "4.2.2";
src = fetchFromGitHub {
owner = "less";
repo = "less.js";
rev = "v${version}";
hash = "sha256-vO/1laFb1yC+OESXTx9KuGdwSNC9Iv49F3V7kfXnyJU=";
};
sourceRoot = "${src.name}/packages/less";
npmDepsHash = "sha256-3GlngmaxcUGXSv+ZwN2aovwEqcek6FJ1ZaL5KpjwNn4=";
postPatch = ''
sed -i ./package.json \
-e '/@less\/test-data/d' \
-e '/@less\/test-import-module/d'
'';
env.PUPPETEER_SKIP_DOWNLOAD = 1;
passthru = {
updateScript = nix-update-script { };
plugins = callPackage ./plugins { };
wrapper = callPackage ./wrapper { };
withPlugins = fn: lessc.wrapper.override { plugins = fn lessc.plugins; };
tests = {
version = testers.testVersion { package = lessc; };
simple = testers.testEqualContents {
assertion = "lessc compiles a basic less file";
expected = writeText "expected" ''
body h1 {
color: red;
}
'';
actual =
runCommand "actual"
{
nativeBuildInputs = [ lessc ];
base = writeText "base" ''
@color: red;
body {
h1 {
color: @color;
}
}
'';
}
''
lessc $base > $out
'';
};
};
};
meta = {
homepage = "https://github.com/less/less.js";
description = "Dynamic stylesheet language";
mainProgram = "lessc";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ lelgenio ];
};
}

View File

@@ -0,0 +1,61 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
testers,
runCommand,
writeText,
lessc,
}:
buildNpmPackage {
pname = "less-plugin-clean-css";
version = "1.6.0";
src = fetchFromGitHub {
owner = "less";
repo = "less-plugin-clean-css";
rev = "b2c3886b7af67ab45a5568e7758bbc2d5b82b112";
hash = "sha256-dYYcaCLTwAI2T7cWCfiK866Azrw4fnzTE/mkUA6HUFo=";
};
npmDepsHash = "sha256-uAYXFxOoUo8tLrYqNeUFMRuaYp2GArGMLaaes1QhLp4=";
dontNpmBuild = true;
passthru = {
updateScript = ./update.sh;
tests = {
simple = testers.testEqualContents {
assertion = "lessc compiles a basic less file";
expected = writeText "expected" ''
body h1{color:red}
'';
actual =
runCommand "actual"
{
nativeBuildInputs = [ (lessc.withPlugins (p: [ p.clean-css ])) ];
base = writeText "base" ''
@color: red;
body {
h1 {
color: @color;
}
}
'';
}
''
lessc $base --clean-css="--s1 --advanced" > $out
printf "\n" >> $out
'';
};
};
};
meta = {
homepage = "https://github.com/less/less-plugin-clean-css";
description = "Post-process and compress CSS using clean-css";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ lelgenio ];
};
}

View File

@@ -0,0 +1,31 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts nodejs prefetch-npm-deps sd
set -xeu -o pipefail
PACKAGE_DIR="$(realpath "$(dirname "$0")")"
cd "$PACKAGE_DIR/.."
while ! test -f flake.nix; do cd .. ; done
NIXPKGS_DIR="$PWD"
latest_commit="$(
curl -L -s ${GITHUB_TOKEN:+-u ":${GITHUB_TOKEN}"} https://api.github.com/repos/less/less-plugin-clean-css/branches/master \
| jq -r .commit.sha
)"
# This repository does not report it's version in tags
version="$(
curl https://raw.githubusercontent.com/less/less-plugin-clean-css/$latest_commit/package.json \
| jq -r .version
)"
update-source-version lessc.plugins.clean-css "$version" --rev=$latest_commit
src="$(nix-build --no-link "$NIXPKGS_DIR" -A lessc.plugins.clean-css.src)"
prev_npm_hash="$(
nix-instantiate "$NIXPKGS_DIR" \
--eval --json -A lessc.plugins.clean-css.npmDepsHash \
| jq -r .
)"
new_npm_hash="$(prefetch-npm-deps "$src/package-lock.json")"
sd --fixed-strings "$prev_npm_hash" "$new_npm_hash" "$PACKAGE_DIR/default.nix"

View File

@@ -0,0 +1,4 @@
{ callPackage }:
{
clean-css = callPackage ./clean-css { };
}

View File

@@ -0,0 +1,27 @@
{
lib,
stdenv,
makeWrapper,
lessc,
plugins ? [ ],
}:
stdenv.mkDerivation {
pname = "lessc-with-plugins";
nativeBuildInputs = [ makeWrapper ];
buildPhase = ''
mkdir -p $out/bin
makeWrapper "${lib.getExe lessc}" "$out/bin/lessc" \
--prefix NODE_PATH : "${lib.makeSearchPath "/lib/node_modules" plugins}"
'';
doUnpack = false;
inherit (lessc)
version
src
passthru
meta
;
}