From 1130d8c4bc7b6776501808a72529cda5a28ed888 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Fri, 2 Aug 2024 23:57:05 -0400 Subject: [PATCH] dotenv-cli: remove usage of mkYarnPackage --- pkgs/by-name/do/dotenv-cli/package.json | 26 ------------------------- pkgs/by-name/do/dotenv-cli/package.nix | 19 +++++++++++++----- 2 files changed, 14 insertions(+), 31 deletions(-) delete mode 100644 pkgs/by-name/do/dotenv-cli/package.json diff --git a/pkgs/by-name/do/dotenv-cli/package.json b/pkgs/by-name/do/dotenv-cli/package.json deleted file mode 100644 index 3ad9bff441a1b..0000000000000 --- a/pkgs/by-name/do/dotenv-cli/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "dotenv-cli", - "description": "A global executable to run applications with the ENV variables loaded by dotenv", - "version": "7.4.3", - "author": "entropitor", - "bin": { - "dotenv": "./cli.js" - }, - "dependencies": { - "cross-spawn": "^7.0.3", - "dotenv": "^16.3.0", - "dotenv-expand": "^10.0.0", - "minimist": "^1.2.6" - }, - "devDependencies": { - "standard": "^16.0.4" - }, - "license": "MIT", - "main": "index.js", - "preferGlobal": true, - "repository": "entropitor/dotenv-cli", - "scripts": { - "lint": "standard" - }, - "resolutions": {} -} diff --git a/pkgs/by-name/do/dotenv-cli/package.nix b/pkgs/by-name/do/dotenv-cli/package.nix index 298fb07118c17..8ca6297020bc6 100644 --- a/pkgs/by-name/do/dotenv-cli/package.nix +++ b/pkgs/by-name/do/dotenv-cli/package.nix @@ -1,10 +1,14 @@ { lib, - mkYarnPackage, + stdenv, fetchYarnDeps, fetchFromGitHub, - nix-update-script -}: mkYarnPackage rec { + yarnConfigHook, + npmHooks, + nodejs, + nix-update-script, +}: +stdenv.mkDerivation rec { pname = "dotenv-cli"; version = "7.4.3"; @@ -15,12 +19,17 @@ hash = "sha256-kR9LSHvbvKLuJBGrsmYMeqF3s8SF+/99OeNlKp9azI8="; }; - packageJSON = ./package.json; - offlineCache = fetchYarnDeps { + yarnOfflineCache = fetchYarnDeps { yarnLock = "${src}/yarn.lock"; hash = "sha256-Sx5DHUAXquqMqJgvhvHcRPqkfWN49+6icUQIos6OHCg="; }; + nativeBuildInputs = [ + yarnConfigHook + npmHooks.npmInstallHook + nodejs + ]; + passthru.updateScript = nix-update-script { }; meta = {