diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index a793d46b9384..a3d57326788b 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -80,6 +80,12 @@ githubId = 791309; name = "Jan Hrnko"; }; + _1000teslas = { + name = "Kevin Tran"; + email = "47207223+1000teslas@users.noreply.github.com"; + github = "1000teslas"; + githubId = 47207223; + }; _3699n = { email = "nicholas@nvk.pm"; github = "3699n"; diff --git a/pkgs/development/libraries/kddockwidgets/default.nix b/pkgs/development/libraries/kddockwidgets/default.nix new file mode 100644 index 000000000000..b63bdc979c42 --- /dev/null +++ b/pkgs/development/libraries/kddockwidgets/default.nix @@ -0,0 +1,29 @@ +{ lib +, mkDerivation +, fetchFromGitHub +, cmake +, qtbase +, qtx11extras +}: + +mkDerivation rec { + pname = "KDDockWidgets"; + version = "1.4.0"; + + src = fetchFromGitHub { + owner = "KDAB"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-lgNRuRoJhBw0n/Hb58uxpa+4aXoOrK4bRldtIXYIKLI="; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ qtbase qtx11extras ]; + + meta = with lib; { + description = "KDAB's Dock Widget Framework for Qt"; + homepage = "https://www.kdab.com/development-resources/qt-tools/kddockwidgets"; + license = with licenses; [ gpl2Only gpl3Only ]; + maintainers = with maintainers; [ _1000teslas ]; + }; +} diff --git a/pkgs/development/libraries/rustc-demangle/add-Cargo.lock.patch b/pkgs/development/libraries/rustc-demangle/add-Cargo.lock.patch new file mode 100644 index 000000000000..66e8bead8a26 --- /dev/null +++ b/pkgs/development/libraries/rustc-demangle/add-Cargo.lock.patch @@ -0,0 +1,73 @@ +diff --git a/Cargo.lock b/Cargo.lock +new file mode 100644 +index 0000000..0268b3b +--- /dev/null ++++ b/Cargo.lock +@@ -0,0 +1,67 @@ ++# This file is automatically @generated by Cargo. ++# It is not intended for manual editing. ++version = 3 ++ ++[[package]] ++name = "arbitrary" ++version = "1.0.1" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "237430fd6ed3740afe94eefcc278ae21e050285be882804e0d6e8695f0c94691" ++ ++[[package]] ++name = "cc" ++version = "1.0.69" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "e70cc2f62c6ce1868963827bd677764c62d07c3d9a3e1fb1177ee1a9ab199eb2" ++ ++[[package]] ++name = "compiler_builtins" ++version = "0.1.49" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "20b1438ef42c655665a8ab2c1c6d605a305f031d38d9be689ddfef41a20f3aa2" ++ ++[[package]] ++name = "libfuzzer-sys" ++version = "0.4.2" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "36a9a84a6e8b55dfefb04235e55edb2b9a2a18488fcae777a6bdaa6f06f1deb3" ++dependencies = [ ++ "arbitrary", ++ "cc", ++ "once_cell", ++] ++ ++[[package]] ++name = "once_cell" ++version = "1.8.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" ++ ++[[package]] ++name = "rustc-demangle" ++version = "0.1.20" ++dependencies = [ ++ "compiler_builtins", ++ "rustc-std-workspace-core", ++] ++ ++[[package]] ++name = "rustc-demangle-capi" ++version = "0.1.0" ++dependencies = [ ++ "rustc-demangle", ++] ++ ++[[package]] ++name = "rustc-demangle-fuzz" ++version = "0.0.0" ++dependencies = [ ++ "libfuzzer-sys", ++ "rustc-demangle", ++] ++ ++[[package]] ++name = "rustc-std-workspace-core" ++version = "1.0.0" ++source = "registry+https://github.com/rust-lang/crates.io-index" ++checksum = "1956f5517128a2b6f23ab2dadf1a976f4f5b27962e7724c2bf3d45e539ec098c" diff --git a/pkgs/development/libraries/rustc-demangle/default.nix b/pkgs/development/libraries/rustc-demangle/default.nix new file mode 100644 index 000000000000..be02fedfde71 --- /dev/null +++ b/pkgs/development/libraries/rustc-demangle/default.nix @@ -0,0 +1,34 @@ +{ rustPlatform, fetchFromGitHub, rust, lib, stdenv }: + +rustPlatform.buildRustPackage rec { + pname = "rustc-demangle"; + version = "0.1.20"; + + src = fetchFromGitHub { + owner = "alexcrichton"; + repo = pname; + rev = version; + sha256 = "sha256-elxclyuLmr3N66s+pR4/6OU98k1oXI2wKVJtzWPY8FI="; + }; + + cargoPatches = [ + # generated using `cargo generate-lockfile` since repo is missing lockfile + ./add-Cargo.lock.patch + ]; + cargoSha256 = "sha256-1tW5TOap5MstxTXAFij3IB8TIpI+FryEX9TXlVXjRl4="; + cargoBuildFlags = "-p rustc-demangle-capi"; + postInstall = '' + mkdir -p $out/lib + cp target/${rust.toRustTargetSpec stdenv.hostPlatform}/release/librustc_demangle.so $out/lib + cp -R crates/capi/include $out + ''; + + meta = with lib; { + description = "Rust symbol demangling"; + homepage = "https://github.com/alexcrichton/rustc-demangle"; + license = with licenses; [ asl20 mit ]; + # upstream supports other platforms, but maintainer can only test on linux + platforms = platforms.linux; + maintainers = with maintainers; [ _1000teslas ]; + }; +} diff --git a/pkgs/development/tools/analysis/hotspot/default.nix b/pkgs/development/tools/analysis/hotspot/default.nix index 94b440f58c8d..5fede1aee5c5 100644 --- a/pkgs/development/tools/analysis/hotspot/default.nix +++ b/pkgs/development/tools/analysis/hotspot/default.nix @@ -1,18 +1,22 @@ -{ lib, - mkDerivation, - cmake, - elfutils, - extra-cmake-modules, - fetchFromGitHub, - kconfigwidgets, - ki18n, - kio, - kitemmodels, - kitemviews, - kwindowsystem, - libelf, - qtbase, - threadweaver, +{ lib +, mkDerivation +, cmake +, elfutils +, extra-cmake-modules +, fetchFromGitHub +, kconfigwidgets +, ki18n +, kio +, kitemmodels +, kitemviews +, kwindowsystem +, libelf +, qtbase +, threadweaver +, qtx11extras +, zstd +, kddockwidgets +, rustc-demangle }: mkDerivation rec { @@ -27,10 +31,12 @@ mkDerivation rec { fetchSubmodules = true; }; - nativeBuildInputs = [ cmake ]; + nativeBuildInputs = [ + cmake + extra-cmake-modules + ]; buildInputs = [ elfutils - extra-cmake-modules kconfigwidgets ki18n kio @@ -40,6 +46,10 @@ mkDerivation rec { libelf qtbase threadweaver + qtx11extras + zstd + kddockwidgets + rustc-demangle ]; # hotspot checks for the presence of third party libraries' @@ -47,9 +57,14 @@ mkDerivation rec { # submodules; but Nix clones them and removes .git (for reproducibility). # So we need to fake their existence here. postPatch = '' - mkdir -p 3rdparty/perfparser/.git + mkdir -p 3rdparty/{perfparser,PrefixTickLabels}/.git ''; + cmakeFlags = [ + "-DRUSTC_DEMANGLE_INCLUDE_DIR=${rustc-demangle}/include" + "-DRUSTC_DEMANGLE_LIBRARY=${rustc-demangle}/lib/librustc_demangle.so" + ]; + meta = { description = "A GUI for Linux perf"; longDescription = '' @@ -58,7 +73,7 @@ mkDerivation rec { then displays the result in a graphical way. ''; homepage = "https://github.com/KDAB/hotspot"; - license = with lib.licenses; [ gpl2 gpl3 ]; + license = with lib.licenses; [ gpl2Only gpl3Only ]; platforms = lib.platforms.linux; maintainers = with lib.maintainers; [ nh2 ]; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b3265c7a28cc..2da2c5e1020b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16328,6 +16328,8 @@ with pkgs; judy = callPackage ../development/libraries/judy { }; + kddockwidgets = libsForQt5.callPackage ../development/libraries/kddockwidgets { }; + keybinder = callPackage ../development/libraries/keybinder { automake = automake111x; lua = lua5_1; @@ -18551,6 +18553,8 @@ with pkgs; rubberband = callPackage ../development/libraries/rubberband { }; + rustc-demangle = callPackage ../development/libraries/rustc-demangle { }; + s2geometry = callPackage ../development/libraries/s2geometry { }; /* This package references ghc844, which we no longer have. Unfortunately, I