Merge pull request #331912 from pyrox0/rem-mkyarnpackage/get-graphql-schema

get-graphql-schema: remove usage of mkYarnPackage
This commit is contained in:
Doron Behar 2024-08-04 04:56:49 +00:00 committed by GitHub
commit 2688e78cb4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 56 deletions

View File

@ -1,35 +0,0 @@
{
"name": "get-graphql-schema",
"bin": "dist/index.js",
"files": [
"README.md",
"dist/"
],
"version": "2.1.1",
"description": "Downloads the GraphQL Schema of an GraphQL endpoint URL",
"scripts": {
"build": "tsc",
"prepublish": "npm run build && chmod +x dist/index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/graphcool/get-graphql-schema.git"
},
"author": "Johannes Schickling <johannes@graph.cool>",
"license": "MIT",
"dependencies": {
"@types/chalk": "^0.4.31",
"@types/graphql": "^0.8.6",
"@types/minimist": "^1.2.0",
"@types/node": "^7.0.4",
"@types/node-fetch": "^1.6.7",
"chalk": "^1.1.3",
"graphql": "^0.9.1",
"minimist": "^1.2.0",
"node-fetch": "^1.6.3"
},
"devDependencies": {
"typescript": "^2.1.5"
}
}

View File

@ -1,43 +1,41 @@
{
lib,
mkYarnPackage,
stdenv,
fetchYarnDeps,
fetchFromGitHub,
nodejs_22
}: mkYarnPackage rec {
nodejs,
yarnConfigHook,
yarnBuildHook,
npmHooks,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "get-graphql-schema";
version = "2.1.1";
src = fetchFromGitHub {
owner = "prisma-labs";
repo = "get-graphql-schema";
rev = "v${version}";
rev = "v${finalAttrs.version}";
hash = "sha256-ujc0LGAqmo4SmItm4VcbBOtmUvL6aV1ppMm4fMmuSRs=";
};
packageJSON = ./package.json;
offlineCache = fetchYarnDeps {
yarnLock = "${src}/yarn.lock";
yarnOfflineCache = fetchYarnDeps {
yarnLock = "${finalAttrs.src}/yarn.lock";
hash = "sha256-TZGNX8UHbolLyBmQNGTnFjgx3/3f2HNVQf/h9rIVJKs=";
};
buildPhase = ''
runHook preBuild
yarn --offline build
runHook postBuild
'';
nativeBuildInputs = [
yarnConfigHook
yarnBuildHook
npmHooks.npmInstallHook
nodejs
];
postFixup = ''
substituteInPlace $out/libexec/get-graphql-schema/deps/get-graphql-schema/dist/index.js \
--replace-fail "#!/usr/bin/env node" "#!${lib.getExe nodejs_22}"
chmod +x $out/bin/get-graphql-schema
'';
meta = {
description = "Command line tool for generating a changelog from git tags and commit history";
homepage = "https://github.com/cookpete/auto-changelog";
changelog = "https://github.com/cookpete/auto-changelog/blob/master/CHANGELOG.md";
description = "Fetch and print the GraphQL schema from a GraphQL HTTP endpoint.";
homepage = "https://github.com/prisma-labs/get-graphql-schema";
license = lib.licenses.mit;
mainProgram = "get-graphql-schema";
maintainers = with lib.maintainers; [ pyrox0 ];
};
}
})