mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-21 04:28:40 +03:00
pnpm-lock-export: use fork with v6 support
This commit is contained in:
parent
24a04f48c1
commit
1e0ff6105a
@ -1,16 +1,16 @@
|
||||
{ lib, buildNpmPackage, fetchFromGitHub }:
|
||||
buildNpmPackage rec {
|
||||
pname = "pnpm-lock-export";
|
||||
version = "0.4.0";
|
||||
version = "unstable-2023-07-31";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cvent";
|
||||
owner = "adamcstephens";
|
||||
repo = "pnpm-lock-export";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-vS6AW3R4go1Fdr3PBOCnuN4JDrDkl1lWVF7q+q+xDGg=";
|
||||
rev = "cc03755d6718a9c0d268d0f375907328ac15dc92";
|
||||
hash = "sha256-9OlFgmdKjvz4pB36Wm/fUAQDsD8zs32OSA3m2IAgrH8=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-3uW/lzB+UDhFQtRb3X8szNlgAWTcSdwVdtyZvLu+cjI=";
|
||||
npmDepsHash = "sha256-nqkH7vFD78YvYr9Klguk2o7qHr5wr3ZjaywUKRRRjJo=";
|
||||
|
||||
postPatch = ''
|
||||
cp ${./package-lock.json} package-lock.json
|
||||
|
3424
pkgs/development/web/pnpm-lock-export/package-lock.json
generated
3424
pkgs/development/web/pnpm-lock-export/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -16,22 +16,19 @@ fi
|
||||
set -x
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
version="$1"
|
||||
rev="$1"
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if [ -z "$version" ]; then
|
||||
version="$(wget -O- "${TOKEN_ARGS[@]}" "https://api.github.com/repos/cvent/pnpm-lock-export/releases?per_page=1" | jq -r '.[0].tag_name')"
|
||||
if [ -z "$rev" ]; then
|
||||
rev="$(wget -O- "${TOKEN_ARGS[@]}" "https://api.github.com/repos/adamcstephens/pnpm-lock-export/commits?per_page=1" | jq -r '.[0].sha')"
|
||||
fi
|
||||
|
||||
# strip leading "v"
|
||||
version="${version#v}"
|
||||
|
||||
# pnpm-lock-export repository
|
||||
src_hash=$(nix-prefetch-github cvent pnpm-lock-export --rev "v${version}" | jq -r .hash)
|
||||
src_hash=$(nix-prefetch-github adamcstephens pnpm-lock-export --rev "${rev}" | jq -r .hash)
|
||||
|
||||
# Front-end dependencies
|
||||
upstream_src="https://raw.githubusercontent.com/cvent/pnpm-lock-export/v$version"
|
||||
upstream_src="https://raw.githubusercontent.com/adamcstephens/pnpm-lock-export/${rev}"
|
||||
|
||||
trap 'rm -rf package.json' EXIT
|
||||
wget "${TOKEN_ARGS[@]}" "$upstream_src/package.json"
|
||||
@ -41,6 +38,6 @@ deps_hash=$(prefetch-npm-deps package-lock.json)
|
||||
# Use friendlier hashes
|
||||
deps_hash=$(nix hash to-sri --type sha256 "$deps_hash")
|
||||
|
||||
sed -i -E -e "s#version = \".*\"#version = \"$version\"#" default.nix
|
||||
sed -i -E -e "s#rev = \".*\"#rev = \"$rev\"#" default.nix
|
||||
sed -i -E -e "s#hash = \".*\"#hash = \"$src_hash\"#" default.nix
|
||||
sed -i -E -e "s#npmDepsHash = \".*\"#npmDepsHash = \"$deps_hash\"#" default.nix
|
||||
|
Loading…
Reference in New Issue
Block a user