summaryrefslogtreecommitdiffstats
path: root/pkgs
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2020-12-12 13:05:34 +0100
committerGitHub <noreply@github.com>2020-12-12 13:05:34 +0100
commit3c11eea35935b292a9ab3eb3517f932ba02c9e6f (patch)
treec3df4ec5f65c4cdbe98aed48c7003a8911f1f7b0 /pkgs
parent7bb9e5053beb4b7a089f7a40947c4bd1b85ab6a9 (diff)
parent28039d8f56398de888c72bf424e9043fd691eb45 (diff)
Merge pull request #104695 from LnL7/py-spy
py-spy: init at 0.3.3
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/tools/py-spy/default.nix30
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 32 insertions, 0 deletions
diff --git a/pkgs/development/tools/py-spy/default.nix b/pkgs/development/tools/py-spy/default.nix
new file mode 100644
index 000000000000..5e1dcbfa6fce
--- /dev/null
+++ b/pkgs/development/tools/py-spy/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, pkgsBuildBuild, rustPlatform, fetchFromGitHub, pkgconfig, libunwind, python3 }:
+
+rustPlatform.buildRustPackage rec {
+ pname = "py-spy";
+ version = "0.3.3";
+
+ src = fetchFromGitHub {
+ owner = "benfred";
+ repo = "py-spy";
+ rev = "v${version}";
+ sha256 = "1w9nwsmazafr78ghif6njdcqjisr0f1jb6cm1w4ngvigx5qlrbkv";
+ };
+
+ NIX_CFLAGS_COMPILE = "-L${libunwind}/lib";
+
+ # error: linker `arm-linux-gnueabihf-gcc` not found
+ preConfigure = stdenv.lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
+ export RUSTFLAGS="-Clinker=$CC"
+ '';
+
+ checkInputs = [ python3 ];
+
+ cargoSha256 = "0hrzmpwd2k4l8gjbry8ddrkv9q9qh8ag096md4q0fyn5bgnxhkah";
+
+ meta = with stdenv.lib; {
+ description = "Sampling profiler for Python programs";
+ license = licenses.mit;
+ maintainers = [ maintainers.lnl7 ];
+ };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 0ddb64d0a486..2e9cfe3dfaa4 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -6756,6 +6756,8 @@ in
pythonPackages = python27Packages;
};
+ py-spy = callPackage ../development/tools/py-spy { };
+
pytrainer = callPackage ../applications/misc/pytrainer { };
pywal = with python3Packages; toPythonApplication pywal;