Skip to content

Commit

Permalink
yalc: migrate from nodePackages
Browse files Browse the repository at this point in the history
  • Loading branch information
pyrox0 committed Oct 17, 2024
1 parent e3543c8 commit 7ae4f5e
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 71 deletions.
49 changes: 49 additions & 0 deletions pkgs/by-name/ya/yalc/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchYarnDeps,
nodejs,
yarnBuildHook,
yarnConfigHook,
npmHooks,
}:

stdenv.mkDerivation rec {
pname = "yalc";
version = "1.0.0-pre.54-unstable-2023-07-04";

src = fetchFromGitHub {
owner = "wclr";
repo = "yalc";
# Upstream has no tagged versions
rev = "3b834e488837e87df47414fd9917c10f07f0df08";
hash = "sha256-v8OhLVuRhnyN2PrslgVVS0r56wGhYYmjoz3ZUZ95xBc=";
};

yarnOfflineCache = fetchYarnDeps {
yarnLock = "${src}/yarn.lock";
hash = "sha256-+w3azJEnRx4v3nJ3rhpLWt6CjOFhMMmr1UL5hg2ZR48=";
};

nativeBuildInputs = [
yarnConfigHook
yarnBuildHook
npmHooks.npmInstallHook
nodejs
];

postInstall = ''
substituteInPlace $out/bin/yalc \
--replace-fail "/usr/bin/env node" "${lib.getExe nodejs}"
chmod +x $out/libexec/yalc/deps/yalc/src/yalc.js
'';

meta = with lib; {
description = "Framework for converting Left-To-Right (LTR) Cascading Style Sheets(CSS) to Right-To-Left (RTL)";
mainProgram = "rtlcss";
homepage = "https://rtlcss.com";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}
1 change: 1 addition & 0 deletions pkgs/development/node-packages/aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ mapAliases {
inherit (pkgs) web-ext; # added 2023-08-20
inherit (pkgs) wrangler; # added 2024-07-01
inherit (pkgs) write-good; # added 2023-08-20
inherit (pkgs) yalc; # added 2024-06-29
inherit (pkgs) yaml-language-server; # added 2023-09-05
inherit (pkgs) yarn; # added 2024-08-13
inherit (pkgs) yo; # added 2023-08-20
Expand Down
1 change: 0 additions & 1 deletion pkgs/development/node-packages/node-packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -243,5 +243,4 @@
, "webtorrent-cli"
, "wring"
, "@yaegassy/coc-nginx"
, "yalc"
]
70 changes: 0 additions & 70 deletions pkgs/development/node-packages/node-packages.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7ae4f5e

Please sign in to comment.