mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-11-22 06:32:21 +03:00
feat(v1): add nodejs package prettier
This commit is contained in:
parent
6efc60882a
commit
18d8a016fa
@ -10,7 +10,8 @@
|
||||
loadOverrides = dir:
|
||||
l.genAttrs (config.dlib.dirNames dir) (name:
|
||||
import (dir + "/${name}") {
|
||||
inherit (config) lib pkgs;
|
||||
inherit pkgs;
|
||||
inherit (config) lib;
|
||||
satisfiesSemver = constraint: pkg:
|
||||
config.utils.satisfiesSemver pkg.version constraint;
|
||||
});
|
||||
|
@ -8,7 +8,7 @@
|
||||
python $installDeps
|
||||
|
||||
echo "Symlinking transitive executables to $nodeModules/.bin"
|
||||
for dep in ${lib.toString nodeDeps}; do
|
||||
for dep in ${toString nodeDeps}; do
|
||||
binDir=$dep/lib/node_modules/.bin
|
||||
if [ -e $binDir ]; then
|
||||
for bin in $(ls $binDir/); do\
|
||||
|
37
v1/nix/modules/drvs/prettier/default.nix
Normal file
37
v1/nix/modules/drvs/prettier/default.nix
Normal file
@ -0,0 +1,37 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
drv-parts,
|
||||
...
|
||||
}: let
|
||||
l = lib // builtins;
|
||||
in {
|
||||
imports = [
|
||||
drv-parts.modules.drv-parts.mkDerivation
|
||||
../../drv-parts/dream2nix-legacy
|
||||
];
|
||||
|
||||
legacy = {
|
||||
subsystem = "nodejs";
|
||||
translator = "yarn-lock";
|
||||
builder = "granular-nodejs";
|
||||
subsystemInfo = {
|
||||
nodejs = "16";
|
||||
noDev = false;
|
||||
};
|
||||
source = config.deps.fetchFromGitHub {
|
||||
owner = "prettier";
|
||||
repo = "prettier";
|
||||
rev = config.version;
|
||||
sha256 = "sha256-gHFzUjTHsEcxTJtFflqSOCthKW4Wa+ypuTeGxodmh0o=";
|
||||
};
|
||||
};
|
||||
|
||||
deps = {nixpkgs, ...}: {
|
||||
inherit (nixpkgs) fetchFromGitHub;
|
||||
inherit (nixpkgs) stdenv;
|
||||
};
|
||||
|
||||
name = l.mkForce "prettier";
|
||||
version = l.mkForce "2.8.7";
|
||||
}
|
Loading…
Reference in New Issue
Block a user