From 62d473b7bfac789d866b01dc3cfe4f1d17de6ee5 Mon Sep 17 00:00:00 2001 From: tdro Date: Fri, 21 May 2021 23:43:28 -0400 Subject: .config/nixpkgs: Add stylelint package --- .config/nixpkgs/packages/stylelint/default.nix | 37 ++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .config/nixpkgs/packages/stylelint/default.nix (limited to '.config/nixpkgs/packages') diff --git a/.config/nixpkgs/packages/stylelint/default.nix b/.config/nixpkgs/packages/stylelint/default.nix new file mode 100644 index 0000000..5f9a3df --- /dev/null +++ b/.config/nixpkgs/packages/stylelint/default.nix @@ -0,0 +1,37 @@ +{ lib, stdenv, fetchgit, yarn, mkYarnPackage }: + +mkYarnPackage rec { + + pname = "stylelint"; + url = "https://github.com/stylelint/stylelint.git"; + version = "b01ed25dfa3e8231a976eef76bd5e81fb535b1e9"; + sha256 = "18v71nxxbfwqz5by9nq9921bdar3ww0z5z7h0y6rgnpi6iy5ck4x"; + rev = version; + src = fetchgit { inherit url rev sha256; }; + packageJSON = "${src}/package.json"; + yarnLock = "${yarn-lock}/yarn.lock"; + defaultYarnFlags = [ "--offline" "--frozen-lockfile" "--ignore-engines" "--ignore-scripts" ]; + + yarn-lock = stdenv.mkDerivation { + name = "${pname}-yarn.lock"; + src = fetchgit { inherit url rev sha256; }; + buildInputs = [ yarn ]; + installPhase = '' + runHook preInstall + export HOME=. + mkdir -p $out + yarn import --ignore-engines --ignore-scripts + cp yarn.lock $out + runHook postInstall + ''; + outputHashAlgo = "sha256"; + outputHashMode = "recursive"; + outputHash = "0cz16mnhagm300sfgmc031mzhbbwagbz3agji4hwrinw7bg3195f"; + }; + + meta = with lib; { + homepage = url; + license = licenses.mit; + description = "A mighty, modern linter that helps you avoid errors and enforce conventions in your styles."; + }; +} -- cgit v1.2.3