-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
gz-tools: init at 2.0.3 #432725
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
gz-tools: init at 2.0.3 #432725
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| { | ||
| lib, | ||
| stdenv, | ||
| fetchFromGitHub, | ||
| cmake, | ||
| pkg-config, | ||
| gz-cmake, | ||
| nix-update-script, | ||
| coreutils, | ||
| }: | ||
|
|
||
| stdenv.mkDerivation (finalAttrs: { | ||
| pname = "gz-tools"; | ||
| version = "2.0.3"; | ||
|
|
||
| src = fetchFromGitHub { | ||
| owner = "gazebosim"; | ||
| repo = "gz-tools"; | ||
| tag = "gz-tools${lib.versions.major finalAttrs.version}_${finalAttrs.version}"; | ||
| hash = "sha256-xMFJylj7OnDc7zVWiI4a/mvNpu9scz83F3bGopCt8l8="; | ||
| }; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Worth adding
I found that without it, any error path in |
||
|
|
||
| strictDeps = true; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since the nixpkgs-vet was last run against this PR, the requirement for new packet to include |
||
|
|
||
| nativeBuildInputs = [ | ||
| cmake | ||
| pkg-config | ||
| coreutils # For env | ||
| ]; | ||
|
|
||
| buildInputs = [ gz-cmake ]; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
You can see my |
||
|
|
||
|
Guelakais marked this conversation as resolved.
|
||
| # Disable automatic shebang patching since we'll do it manually | ||
| dontPatchShebangs = true; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a reason you are patching shebangs manually? I found it wasn't required. |
||
|
|
||
| postFixup = '' | ||
| if [ -f "$out/bin/gz" ]; then | ||
| # Check if it's a text file (script) | ||
| if head -n1 "$out/bin/gz" | grep -q '^#!'; then | ||
| # Replace the shebang with the correct path to env | ||
| substituteInPlace "$out/bin/gz" \ | ||
| --replace '#!/usr/bin/env' '#!${coreutils}/bin/env' \ | ||
| --replace '#!/bin/env' '#!${coreutils}/bin/env' | ||
|
|
||
| # Ensure executable permissions | ||
| chmod +x "$out/bin/gz" | ||
| fi | ||
| fi | ||
| ''; | ||
|
|
||
| doInstallCheck = true; | ||
|
|
||
| installCheckPhase = '' | ||
| # Verify the binary exists and can be executed | ||
| if [ -x "$out/bin/gz" ]; then | ||
| "$out/bin/gz" --help >/dev/null || true | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you add It could be worth replacing |
||
| fi | ||
| ''; | ||
|
|
||
| passthru = { | ||
| updateScript = nix-update-script { | ||
| attrPath = "gz-tools"; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Upstream tags look like updateScript = nix-update-script {
extraArgs = [ "--version-regex=gz-tools${lib.versions.major version}_([\\d\\.]+)" ];
}; |
||
| }; | ||
| }; | ||
|
|
||
| meta = { | ||
| description = "Gazebo Sim tools collection"; | ||
| homepage = "https://gazebosim.org/"; | ||
| downloadPage = "https://github.com/gazebosim/gz-tools"; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could be worth adding |
||
| license = lib.licenses.asl20; | ||
| maintainers = with lib.maintainers; [ guelakais ]; | ||
| platforms = lib.platforms.all; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It could be worth narrowing this as |
||
| mainProgram = "gz"; | ||
| }; | ||
| }) | ||
Uh oh!
There was an error while loading. Please reload this page.