Merge pull request #253757 from dotlambda/powerdns-admin-fetchYarnDeps

powerdns-admin: use fetchYarnDeps
This commit is contained in:
Robert Schütz 2023-09-11 03:06:25 +00:00 committed by GitHub
commit 929b2db5d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1723 deletions

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, mkYarnPackage, nixosTests, writeText, python3 }:
{ lib, stdenv, fetchFromGitHub, fetchYarnDeps, mkYarnPackage, nixosTests, writeText, python3 }:
let
version = "0.4.1";
@ -22,7 +22,12 @@ let
assets = mkYarnPackage {
inherit src version;
packageJSON = ./package.json;
yarnNix = ./yarndeps.nix;
offlineCache = fetchYarnDeps {
yarnLock = "${src}/yarn.lock";
hash = "sha256-3ebT19LrbYuypdJaoB3tClVVP0Fi8tHx3Xi6ge/DpA4=";
};
# Copied from package.json, see also
# https://github.com/NixOS/nixpkgs/pull/214952
packageResolutions = {

View File

@ -1,20 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=../../../.. -i bash -p wget yarn2nix-moretea.yarn2nix jq
# This script is based upon:
# pkgs/applications/networking/instant-messengers/riot/update-riot-desktop.sh
set -euo pipefail
if [[ $# -ne 1 || $1 == -* ]]; then
echo "Regenerates the Yarn dependency lock files for the powerdns-admin package."
echo "Usage: $0 <git release version>"
exit 1
fi
WEB_SRC="https://raw.githubusercontent.com/ngoduykhanh/PowerDNS-Admin/v$1"
wget "$WEB_SRC/package.json" -O - | jq ".name = \"powerdns-admin-assets\" | .version = \"$1\"" > package.json
wget "$WEB_SRC/yarn.lock" -O yarn.lock
yarn2nix --lockfile=yarn.lock > yarndeps.nix
rm yarn.lock

File diff suppressed because it is too large Load Diff