diff options
Diffstat (limited to 'pkgs/development/tools/misc')
5 files changed, 95 insertions, 32 deletions
diff --git a/pkgs/development/tools/misc/blackfire/default.nix b/pkgs/development/tools/misc/blackfire/default.nix index 6f82e073108..16ea9bfabd4 100644 --- a/pkgs/development/tools/misc/blackfire/default.nix +++ b/pkgs/development/tools/misc/blackfire/default.nix @@ -2,56 +2,96 @@ , lib , fetchurl , dpkg -, autoPatchelfHook , writeShellScript , curl , jq , common-updater-scripts }: +let + version = "2.8.0"; + + sources = { + "x86_64-linux" = fetchurl { + url = "https://packages.blackfire.io/debian/pool/any/main/b/blackfire/blackfire_${version}_amd64.deb"; + sha256 = "0bgd4hnpaxrqw0s0y2qiak8lbskfi2cqp147vj1kbhvm8834hwhg"; + }; + "i686-linux" = fetchurl { + url = "https://packages.blackfire.io/debian/pool/any/main/b/blackfire/blackfire_${version}_i386.deb"; + sha256 = "06lf642m4imz8xvwipflmvjy1ih7k8bx8jpay0xawvilh14pqz8f"; + }; + "aarch64-linux" = fetchurl { + url = "https://packages.blackfire.io/debian/pool/any/main/b/blackfire/blackfire_${version}_arm64.deb"; + sha256 = "0rddafjgdnj3na96x83paq5z14grj46v4iv38qbkvmdllrj26a0a"; + }; + "aarch64-darwin" = fetchurl { + url = "https://packages.blackfire.io/blackfire/${version}/blackfire-darwin_arm64.pkg.tar.gz"; + sha256 = "YWiZnYdsW7dyQ0IeKeC1U00ZIdJRnzs9keeQTEU2ozA="; + }; + "x86_64-darwin" = fetchurl { + url = "https://packages.blackfire.io/blackfire/${version}/blackfire-darwin_amd64.pkg.tar.gz"; + sha256 = "391b0d239b11095bb8515cb60ee95f02d5862fcb509724081f314819967206b6"; + }; + }; +in stdenv.mkDerivation rec { pname = "blackfire"; - version = "2.5.2"; + inherit version; - src = fetchurl { - url = "https://packages.blackfire.io/debian/pool/any/main/b/blackfire/blackfire_${version}_amd64.deb"; - sha256 = "1RO5yabSNpIz5lWXngMOZ1S2vtnLEkXIj1ZoIinRrQ0="; - }; + src = sources.${stdenv.hostPlatform.system}; - nativeBuildInputs = [ - dpkg - autoPatchelfHook - ]; + nativeBuildInputs = lib.optionals stdenv.isLinux [ dpkg ]; dontUnpack = true; installPhase = '' runHook preInstall - dpkg-deb -x $src $out - mv $out/usr/* $out - rmdir $out/usr + if ${ lib.boolToString stdenv.isLinux } + then + dpkg-deb -x $src $out + mv $out/usr/* $out + rmdir $out/usr + + # Fix ExecStart path and replace deprecated directory creation method, + # use dynamic user. + substituteInPlace "$out/lib/systemd/system/blackfire-agent.service" \ + --replace '/usr/' "$out/" \ + --replace 'ExecStartPre=/bin/mkdir -p /var/run/blackfire' 'RuntimeDirectory=blackfire' \ + --replace 'ExecStartPre=/bin/chown blackfire: /var/run/blackfire' "" \ + --replace 'User=blackfire' 'DynamicUser=yes' \ + --replace 'PermissionsStartOnly=true' "" - # Fix ExecStart path and replace deprecated directory creation method, - # use dynamic user. - substituteInPlace "$out/lib/systemd/system/blackfire-agent.service" \ - --replace '/usr/' "$out/" \ - --replace 'ExecStartPre=/bin/mkdir -p /var/run/blackfire' 'RuntimeDirectory=blackfire' \ - --replace 'ExecStartPre=/bin/chown blackfire: /var/run/blackfire' "" \ - --replace 'User=blackfire' 'DynamicUser=yes' \ - --replace 'PermissionsStartOnly=true' "" + # Modernize socket path. + substituteInPlace "$out/etc/blackfire/agent" \ + --replace '/var/run' '/run' + else + mkdir $out - # Modernize socket path. - substituteInPlace "$out/etc/blackfire/agent" \ - --replace '/var/run' '/run' + tar -zxvf $src + + mv etc $out + mv usr/* $out + fi runHook postInstall ''; passthru = { updateScript = writeShellScript "update-${pname}" '' + set -o errexit export PATH="${lib.makeBinPath [ curl jq common-updater-scripts ]}" - update-source-version "$UPDATE_NIX_ATTR_PATH" "$(curl https://blackfire.io/api/v1/releases | jq .cli --raw-output)" + NEW_VERSION=$(curl -s https://blackfire.io/api/v1/releases | jq .cli --raw-output) + + if [[ "${version}" = "$NEW_VERSION" ]]; then + echo "The new version same as the old version." + exit 0 + fi + + for platform in ${lib.concatStringsSep " " meta.platforms}; do + update-source-version "blackfire" "0" "${lib.fakeSha256}" "--system=$platform" + update-source-version "blackfire" "$NEW_VERSION" "--system=$platform" --ignore-same-hash + done ''; }; @@ -59,7 +99,7 @@ stdenv.mkDerivation rec { description = "Blackfire Profiler agent and client"; homepage = "https://blackfire.io/"; license = licenses.unfree; - maintainers = with maintainers; [ jtojnar ]; - platforms = [ "x86_64-linux" ]; + maintainers = with maintainers; [ jtojnar shyim ]; + platforms = [ "x86_64-linux" "aarch64-linux" "i686-linux" "x86_64-darwin" "aarch64-darwin" ]; }; } diff --git a/pkgs/development/tools/misc/circleci-cli/default.nix b/pkgs/development/tools/misc/circleci-cli/default.nix index 4aa1b8c0b91..19984886207 100644 --- a/pkgs/development/tools/misc/circleci-cli/default.nix +++ b/pkgs/development/tools/misc/circleci-cli/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "circleci-cli"; - version = "0.1.17110"; + version = "0.1.17142"; src = fetchFromGitHub { owner = "CircleCI-Public"; repo = pname; rev = "v${version}"; - sha256 = "sha256-zCX6LWIPiHDOnSBE+BeePjeQ1evTWhLY0Pqk7NmMMlc="; + sha256 = "sha256-69GGJfnOHry+N3hKZapKz6eFSerqIHt4wRAhm/q/SOQ="; }; vendorSha256 = "sha256-7u2y1yBVpXf+D19tslD4s3B1KmABl4OWNzzLaBNL/2U="; diff --git a/pkgs/development/tools/misc/patchelf/0.13.nix b/pkgs/development/tools/misc/patchelf/0.13.nix new file mode 100644 index 00000000000..0111a4b065c --- /dev/null +++ b/pkgs/development/tools/misc/patchelf/0.13.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchurl, patchelf }: + +# Note: this package is used for bootstrapping fetchurl, and thus +# cannot use fetchpatch! All mutable patches (generated by GitHub or +# cgit) that are needed here should be included directly in Nixpkgs as +# files. + +stdenv.mkDerivation rec { + pname = "patchelf"; + version = "0.13.1"; + + src = fetchurl { + url = "https://github.com/NixOS/${pname}/releases/download/${version}/${pname}-${version}.tar.bz2"; + sha256 = "sha256-OeiuzNdJXVTfCU0rSnwIAQ/3d3A2+q8k8o4Hd30VmOI="; + }; + + setupHook = [ ./setup-hook.sh ]; + + # fails 8 out of 24 tests, problems when loading libc.so.6 + doCheck = stdenv.name == "stdenv-linux"; + + inherit (patchelf) meta; +} diff --git a/pkgs/development/tools/misc/patchelf/default.nix b/pkgs/development/tools/misc/patchelf/default.nix index 6919cd0f23f..03e3d003ad1 100644 --- a/pkgs/development/tools/misc/patchelf/default.nix +++ b/pkgs/development/tools/misc/patchelf/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "https://github.com/NixOS/patchelf"; - license = licenses.gpl3; + license = licenses.gpl3Plus; description = "A small utility to modify the dynamic linker and RPATH of ELF executables"; maintainers = [ maintainers.eelco ]; platforms = platforms.all; diff --git a/pkgs/development/tools/misc/saleae-logic-2/default.nix b/pkgs/development/tools/misc/saleae-logic-2/default.nix index 3b9ae267d70..f90f6b067b7 100644 --- a/pkgs/development/tools/misc/saleae-logic-2/default.nix +++ b/pkgs/development/tools/misc/saleae-logic-2/default.nix @@ -1,10 +1,10 @@ { lib, fetchurl, makeDesktopItem, appimageTools, gtk3 }: let name = "saleae-logic-2"; - version = "2.3.47"; + version = "2.3.50"; src = fetchurl { url = "https://downloads.saleae.com/logic2/Logic-${version}-master.AppImage"; - sha256 = "sha256-6/FtdupveKnbAK6LizmJ6BokE0kXgUaMz0sOWi+Fq8k="; + sha256 = "sha256-jkdFdgiSP2ssrUajl85FA4E21Qi6BUgrjKFdlBYyG7c="; }; desktopItem = makeDesktopItem { inherit name; |