Navigation Menu

Skip to content
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

cargo-valgrind: init at 1.3.0 #108388

Merged
merged 1 commit into from Jan 27, 2021
Merged

Conversation

otavio
Copy link
Contributor

@otavio otavio commented Jan 4, 2021

Motivation for this change

Introduce a new useful tool for Rust users

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@otavio
Copy link
Contributor Author

otavio commented Jan 4, 2021

Result of nixpkgs-review pr 108388 1

1 package built:
  • cargo-valgrind

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 108388 run on x86_64-linux 1

1 package built:
  • cargo-valgrind

@otavio
Copy link
Contributor Author

otavio commented Jan 4, 2021

@SuperSandro2000 I forced-push squashing your proposed change. Please take a look at it.

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 108388 run on x86_64-darwin 1

1 package built:
  • cargo-valgrind

Copy link
Member

@Ma27 Ma27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should probably create a wrapper here to make sure that valgrind can be found even if it's not installed globally or in a local profile.

@otavio
Copy link
Contributor Author

otavio commented Jan 4, 2021

Oh, good. I'll research how to do it.

@otavio
Copy link
Contributor Author

otavio commented Jan 5, 2021

Oh, good. I'll research how to do it.

You should probably create a wrapper here to make sure that valgrind can be found even if it's not installed globally or in a local profile.

I'll look very dumb but I did not find out how to do this. Do you have an example or documentation I could take look at?

@Ma27
Copy link
Member

Ma27 commented Jan 5, 2021

you basically want to use makeWrapper for that. The bash-code in a post-install hook may look like this then:

/* ... */ {
  nativeBuildInputs = [ makeWrapper ];
  postInstall = ''
    wrapProgram $out/bin/cargo-valgrind --prefix PATH : ${stdenv.lib.makeBinPath [ valgrind ]}
  '';
}

@otavio
Copy link
Contributor Author

otavio commented Jan 5, 2021

It kinda work. The valgrind is not installed ... dunno why.

error: valgrind executable not found in `PATH` (No such file or directory (os error 2))

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Result of nixpkgs-review pr 108388 run on x86_64-linux 1

1 package built:
  • cargo-valgrind

@jonringer jonringer merged commit ad5cda7 into NixOS:master Jan 27, 2021
@otavio otavio deleted the new-pkgs/cargo-valgrind branch February 2, 2021 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants