diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-10-20 22:09:03 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-10-20 22:09:03 +0000 |
commit | 50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e (patch) | |
tree | f2556b911180125ccbb7ed0e78a54e92da89adce /nixpkgs/pkgs/by-name/sh | |
parent | 4c16d4548a98563c9d9ad76f4e5b2202864ccd54 (diff) | |
parent | cfc75eec4603c06503ae750f88cf397e00796ea8 (diff) | |
download | nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.gz nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.bz2 nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.lz nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.xz nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.zst nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.zip |
Merge commit 'cfc75eec4603c06503ae750f88cf397e00796ea8'
Conflicts: nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
Diffstat (limited to 'nixpkgs/pkgs/by-name/sh')
-rw-r--r-- | nixpkgs/pkgs/by-name/sh/shepherd/package.nix | 77 | ||||
-rw-r--r-- | nixpkgs/pkgs/by-name/sh/shopware-cli/package.nix | 51 |
2 files changed, 128 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/by-name/sh/shepherd/package.nix b/nixpkgs/pkgs/by-name/sh/shepherd/package.nix new file mode 100644 index 000000000000..4cd45aaea0b3 --- /dev/null +++ b/nixpkgs/pkgs/by-name/sh/shepherd/package.nix @@ -0,0 +1,77 @@ +{ lib +, stdenv +, fetchFromGitHub +, fetchYarnDeps +, makeWrapper +, nodejs +, prefetch-yarn-deps +, yarn +}: + +stdenv.mkDerivation rec { + pname = "shepherd"; + version = "1.16.0"; + + src = fetchFromGitHub { + owner = "NerdWalletOSS"; + repo = "shepherd"; + rev = "v${version}"; + hash = "sha256-LY8Vde4YpGuKnQ5UnSOpsQDY7AOyZRziUrfZb5dRiX4="; + }; + + offlineCache = fetchYarnDeps { + yarnLock = "${src}/yarn.lock"; + hash = "sha256-tJXJ8ePr5ArAV+0JcuJsTo/B2PUcgsXfZrSDCpna/9k="; + }; + + nativeBuildInputs = [ + makeWrapper + nodejs + prefetch-yarn-deps + yarn + ]; + + configurePhase = '' + runHook preConfigure + + export HOME=$(mktemp -d) + yarn config --offline set yarn-offline-mirror "$offlineCache" + fixup-yarn-lock yarn.lock + yarn --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive install + patchShebangs node_modules + + runHook postConfigure + ''; + + buildPhase = '' + runHook preBuild + + yarn --offline build + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + yarn --offline --production install + + mkdir -p "$out/lib/node_modules/@nerdwallet/shepherd" + cp -r . "$out/lib/node_modules/@nerdwallet/shepherd" + + makeWrapper "${nodejs}/bin/node" "$out/bin/shepherd" \ + --add-flags "$out/lib/node_modules/@nerdwallet/shepherd/lib/cli.js" + + runHook postInstall + ''; + + meta = { + changelog = "https://github.com/NerdWalletOSS/shepherd/blob/${src.rev}/CHANGELOG.md"; + description = "A utility for applying code changes across many repositories"; + homepage = "https://github.com/NerdWalletOSS/shepherd"; + license = lib.licenses.asl20; + mainProgram = "shepherd"; + maintainers = with lib.maintainers; [ dbirks ]; + platforms = lib.platforms.all; + }; +} diff --git a/nixpkgs/pkgs/by-name/sh/shopware-cli/package.nix b/nixpkgs/pkgs/by-name/sh/shopware-cli/package.nix new file mode 100644 index 000000000000..ac7a6ec1f18f --- /dev/null +++ b/nixpkgs/pkgs/by-name/sh/shopware-cli/package.nix @@ -0,0 +1,51 @@ +{ lib +, buildGoModule +, fetchFromGitHub +, installShellFiles +, makeWrapper +, dart-sass +, git +}: + +buildGoModule rec { + pname = "shopware-cli"; + version = "0.3.6"; + src = fetchFromGitHub { + repo = "shopware-cli"; + owner = "FriendsOfShopware"; + rev = version; + hash = "sha256-3Js44cLS6GLI6wFuT2wxgwyMF3beXaULVeaejfxxtA0="; + }; + + nativeBuildInputs = [ installShellFiles makeWrapper ]; + nativeCheckInputs = [ git dart-sass ]; + + vendorHash = "sha256-QZ/zU67oUW75T8DOzjQwmEAr6gjIg/6ZO4Vm/47Lc40="; + + postInstall = '' + export HOME="$(mktemp -d)" + installShellCompletion --cmd shopware-cli \ + --bash <($out/bin/shopware-cli completion bash) \ + --zsh <($out/bin/shopware-cli completion zsh) \ + --fish <($out/bin/shopware-cli completion fish) + ''; + + preFixup = '' + wrapProgram $out/bin/shopware-cli \ + --prefix PATH : ${lib.makeBinPath [ dart-sass ]} + ''; + + ldflags = [ + "-s" + "-w" + "-X 'github.com/FriendsOfShopware/shopware-cli/cmd.version=${version}'" + ]; + + meta = with lib; { + description = "Command line tool for Shopware 6"; + homepage = "https://github.com/FriendsOfShopware/shopware-cli"; + changelog = "https://github.com/FriendsOfShopware/shopware-cli/releases/tag/${version}"; + license = licenses.mit; + maintainers = with maintainers; [ shyim ]; + }; +} |