diff options
Diffstat (limited to 'pkgs/tools/system')
163 files changed, 1719 insertions, 840 deletions
diff --git a/pkgs/tools/system/acct/default.nix b/pkgs/tools/system/acct/default.nix index dd4eb0d5d2b..fbe396f1fdf 100644 --- a/pkgs/tools/system/acct/default.nix +++ b/pkgs/tools/system/acct/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, stdenv }: +{ fetchurl, lib, stdenv }: stdenv.mkDerivation rec { name = "acct-6.6.4"; @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { doCheck = true; - meta = with stdenv.lib; { + meta = with lib; { description = "GNU Accounting Utilities, login and process accounting utilities"; longDescription = '' diff --git a/pkgs/tools/system/acpica-tools/default.nix b/pkgs/tools/system/acpica-tools/default.nix index 62b1be61965..36ad8ff06e3 100644 --- a/pkgs/tools/system/acpica-tools/default.nix +++ b/pkgs/tools/system/acpica-tools/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, bison, flex }: +{ lib, stdenv, fetchurl, bison, flex }: stdenv.mkDerivation rec { pname = "acpica-tools"; @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { installFlags = [ "PREFIX=${placeholder "out"}" ]; - meta = with stdenv.lib; { + meta = with lib; { description = "ACPICA Tools"; homepage = "https://www.acpica.org/"; license = with licenses; [ gpl2 bsd3 ]; diff --git a/pkgs/tools/system/actkbd/default.nix b/pkgs/tools/system/actkbd/default.nix index 706b3700a41..ac2fb338d3d 100644 --- a/pkgs/tools/system/actkbd/default.nix +++ b/pkgs/tools/system/actkbd/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, stdenv }: +{ fetchurl, lib, stdenv }: stdenv.mkDerivation rec { name = "actkbd-0.2.8"; @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { cp -r README samples $out/share/doc/actkbd ''; - meta = with stdenv.lib; { + meta = with lib; { description = "A keyboard shortcut daemon"; longDescription = '' actkbd is a simple daemon that binds actions to keyboard events diff --git a/pkgs/tools/system/amtterm/default.nix b/pkgs/tools/system/amtterm/default.nix index 9050111fc17..4ceb1aea72b 100644 --- a/pkgs/tools/system/amtterm/default.nix +++ b/pkgs/tools/system/amtterm/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, stdenv, makeWrapper, perl, perlPackages }: +{ fetchurl, lib, stdenv, makeWrapper, perl, perlPackages }: stdenv.mkDerivation rec { @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { postInstall = "wrapProgram $out/bin/amttool --prefix PERL5LIB : $PERL5LIB"; - meta = with stdenv.lib; + meta = with lib; { description = "Intel AMT® SoL client + tools"; homepage = "https://www.kraxel.org/cgit/amtterm/"; license = licenses.gpl2; diff --git a/pkgs/tools/system/at/default.nix b/pkgs/tools/system/at/default.nix index 278b14cd199..11a45fbe391 100644 --- a/pkgs/tools/system/at/default.nix +++ b/pkgs/tools/system/at/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchpatch, bison, flex, pam, perl +{ lib, stdenv, fetchurl, fetchpatch, bison, flex, pam, perl , sendmailPath ? "/run/wrappers/bin/sendmail" , atWrapperPath ? "/run/wrappers/bin/at" }: @@ -51,9 +51,9 @@ stdenv.mkDerivation rec { ''; meta = { - description = ''The classical Unix `at' job scheduling command''; - license = stdenv.lib.licenses.gpl2Plus; + description = "The classical Unix `at' job scheduling command"; + license = lib.licenses.gpl2Plus; homepage = "https://packages.qa.debian.org/at"; - platforms = stdenv.lib.platforms.linux; + platforms = lib.platforms.linux; }; } diff --git a/pkgs/tools/system/augeas/default.nix b/pkgs/tools/system/augeas/default.nix index 338b8f8ac45..3b3d2864d71 100644 --- a/pkgs/tools/system/augeas/default.nix +++ b/pkgs/tools/system/augeas/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, readline, libxml2 }: +{ lib, stdenv, fetchurl, pkg-config, readline, libxml2 }: stdenv.mkDerivation rec { pname = "augeas"; @@ -8,10 +8,10 @@ stdenv.mkDerivation rec { url = "http://download.augeas.net/${pname}-${version}.tar.gz"; sha256 = "11ybhb13wkkilsn7b416a1dn61m1xrq0lbdpkhp5w61jrk4l469j"; }; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkg-config ]; buildInputs = [ readline libxml2 ]; - meta = with stdenv.lib; { + meta = with lib; { description = "Configuration editing tool"; license = licenses.lgpl2; homepage = "http://augeas.net/"; diff --git a/pkgs/tools/system/auto-cpufreq/default.nix b/pkgs/tools/system/auto-cpufreq/default.nix new file mode 100644 index 00000000000..28d771f07b2 --- /dev/null +++ b/pkgs/tools/system/auto-cpufreq/default.nix @@ -0,0 +1,39 @@ +{ lib, python3Packages, fetchFromGitHub }: + +python3Packages.buildPythonPackage rec { + pname = "auto-cpufreq"; + version = "1.6.4"; + + src = fetchFromGitHub { + owner = "AdnanHodzic"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-9WYuAWcJGosYEsnnkqvZLXXvqF+1nBEozh6F84Kit6w="; + }; + + propagatedBuildInputs = with python3Packages; [ click distro psutil ]; + + doCheck = false; + pythonImportsCheck = [ "auto_cpufreq" ]; + + # patch to prevent script copying and to disable install + patches = [ ./prevent-install-and-copy.patch ]; + + postInstall = '' + # copy script manually + cp ${src}/scripts/cpufreqctl.sh $out/bin/cpufreqctl.auto-cpufreq + + # systemd service + mkdir -p $out/lib/systemd/system + cp ${src}/scripts/auto-cpufreq.service $out/lib/systemd/system + substituteInPlace $out/lib/systemd/system/auto-cpufreq.service --replace "/usr/local" $out + ''; + + meta = with lib; { + homepage = "https://github.com/AdnanHodzic/auto-cpufreq"; + description = "Automatic CPU speed & power optimizer for Linux"; + license = licenses.lgpl3Plus; + platforms = platforms.linux; + maintainers = [ maintainers.Technical27 ]; + }; +} diff --git a/pkgs/tools/system/auto-cpufreq/prevent-install-and-copy.patch b/pkgs/tools/system/auto-cpufreq/prevent-install-and-copy.patch new file mode 100644 index 00000000000..41bd3dc5916 --- /dev/null +++ b/pkgs/tools/system/auto-cpufreq/prevent-install-and-copy.patch @@ -0,0 +1,168 @@ +diff --git a/auto_cpufreq/core.py b/auto_cpufreq/core.py +index 83d0d64..04b5035 100644 +--- a/auto_cpufreq/core.py ++++ b/auto_cpufreq/core.py +@@ -204,35 +204,13 @@ def get_current_gov(): + + + def cpufreqctl(): +- """ +- deploy cpufreqctl script +- """ +- +- # detect if running on a SNAP +- if os.getenv("PKG_MARKER") == "SNAP": +- pass +- else: +- # deploy cpufreqctl.auto-cpufreq script +- if os.path.isfile("/usr/bin/cpufreqctl"): +- shutil.copy( +- SCRIPTS_DIR / "cpufreqctl.sh", "/usr/bin/cpufreqctl.auto-cpufreq" +- ) +- else: +- shutil.copy( +- SCRIPTS_DIR / "cpufreqctl.sh", "/usr/bin/cpufreqctl.auto-cpufreq" +- ) ++ # scripts are already in the correct place ++ pass + + + def cpufreqctl_restore(): +- """ +- remove cpufreqctl.auto-cpufreq script +- """ +- # detect if running on a SNAP +- if os.getenv("PKG_MARKER") == "SNAP": +- pass +- else: +- if os.path.isfile("/usr/bin/cpufreqctl.auto-cpufreq"): +- os.remove("/usr/bin/cpufreqctl.auto-cpufreq") ++ # no need to restore ++ pass + + + def footer(l=79): +@@ -276,76 +254,13 @@ def remove_complete_msg(): + + + def deploy_daemon(): +- print("\n" + "-" * 21 + " Deploying auto-cpufreq as a daemon " + "-" * 22 + "\n") +- +- # deploy cpufreqctl script func call +- cpufreqctl() +- +- print("* Turn off bluetooth on boot") +- btconf = Path("/etc/bluetooth/main.conf") +- try: +- orig_set = "AutoEnable=true" +- change_set = "AutoEnable=false" +- with btconf.open(mode="r+") as f: +- content = f.read() +- f.seek(0) +- f.truncate() +- f.write(content.replace(orig_set, change_set)) +- except Exception as e: +- print(f"\nERROR:\nWas unable to turn off bluetooth on boot\n{repr(e)}") +- +- auto_cpufreq_stats_path.touch(exist_ok=True) +- +- print("\n* Deploy auto-cpufreq install script") +- shutil.copy( +- SCRIPTS_DIR / "auto-cpufreq-install.sh", "/usr/bin/auto-cpufreq-install" +- ) +- +- print("\n* Deploy auto-cpufreq remove script") +- shutil.copy(SCRIPTS_DIR / "auto-cpufreq-remove.sh", "/usr/bin/auto-cpufreq-remove") +- +- call("/usr/bin/auto-cpufreq-install", shell=True) ++ # prevent needless copying and system changes ++ pass + + + # remove auto-cpufreq daemon + def remove(): +- +- # check if auto-cpufreq is installed +- if not os.path.exists("/usr/bin/auto-cpufreq-remove"): +- print("\nauto-cpufreq daemon is not installed.\n") +- sys.exit(1) +- +- print("\n" + "-" * 21 + " Removing auto-cpufreq daemon " + "-" * 22 + "\n") +- +- print("* Turn on bluetooth on boot") +- btconf = "/etc/bluetooth/main.conf" +- try: +- orig_set = "AutoEnable=true" +- change_set = "AutoEnable=false" +- with open(btconf, "r+") as f: +- content = f.read() +- f.seek(0) +- f.truncate() +- f.write(content.replace(change_set, orig_set)) +- except Exception as e: +- print(f"\nERROR:\nWas unable to turn on bluetooth on boot\n{repr(e)}") +- +- # run auto-cpufreq daemon install script +- call("/usr/bin/auto-cpufreq-remove", shell=True) +- +- # remove auto-cpufreq-remove +- os.remove("/usr/bin/auto-cpufreq-remove") +- +- # delete stats file +- if auto_cpufreq_stats_path.exists(): +- if auto_cpufreq_stats_file is not None: +- auto_cpufreq_stats_file.close() +- +- auto_cpufreq_stats_path.unlink() +- +- # restore original cpufrectl script +- cpufreqctl_restore() +- ++ pass + + def gov_check(): + for gov in get_avail_gov(): +diff --git a/scripts/cpufreqctl.sh b/scripts/cpufreqctl.sh +index 63a2b5b..e157efe 100755 +--- a/scripts/cpufreqctl.sh ++++ b/scripts/cpufreqctl.sh +@@ -467,35 +467,21 @@ fi + + if [ $OPTION = "--install" ] + then +- echo 'installing helpers...' +- cp $0 /usr/bin/ +- echo 'installing policy...' +- cp $(dirname "$(readlink -f "$0")")/konkor.cpufreq.policy /usr/share/polkit-1/actions/ +- echo 'installing fonts...' +- mkdir -p /usr/share/fonts/truetype/cpufreq +- cp $(dirname "$(readlink -f "$0")")/fonts/cpufreq.ttf /usr/share/fonts/truetype/cpufreq/ +- echo "done" ++ echo "install is disabled in the nix package" + exit + fi + if [ $OPTION = "--update-fonts" ] + then +- fc-cache -f ++ echo "update-fonts is disabled in the nix package" + exit + fi + if [ $OPTION = "--uninstall" ] + then +- echo 'uninstalling cpufreqctl helper...' +- rm /usr/bin/cpufreqctl +- echo 'uninstalling policy...' +- rm /usr/share/polkit-1/actions/konkor.cpufreq.policy +- echo 'uninstalling fonts...' +- rm -rf /usr/share/fonts/truetype/cpufreq +- echo "done" ++ echo "uninstall is disabled in the nix package" + exit + fi + if [ $OPTION = "--reset" ] + then +- echo 'reset to default values...' +- dconf reset -f "/org/gnome/shell/extensions/cpufreq/" ++ echo "reset is disabled in the nix package" + exit + fi diff --git a/pkgs/tools/system/awstats/default.nix b/pkgs/tools/system/awstats/default.nix index 9da6ac59f3d..e0fb92b519f 100644 --- a/pkgs/tools/system/awstats/default.nix +++ b/pkgs/tools/system/awstats/default.nix @@ -1,12 +1,12 @@ -{ stdenv, fetchurl, perlPackages, jdk }: +{ lib, fetchurl, perlPackages, jdk }: perlPackages.buildPerlPackage rec { pname = "awstats"; - version = "7.7"; + version = "7.8"; src = fetchurl { url = "mirror://sourceforge/awstats/${pname}-${version}.tar.gz"; - sha256 = "0z3p77jnpjilajs9yv87r8xla2x1gjqlvrhpbgbh5ih73386v3j2"; + sha256 = "1f6l0hd01jmz7hpg0py8qixxiq50n8gl37iypayskxmy05z8craa"; }; postPatch = '' @@ -52,9 +52,9 @@ perlPackages.buildPerlPackage rec { mv docs "$doc/share/doc/awstats" ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Real-time logfile analyzer to get advanced statistics"; - homepage = "http://awstats.org"; + homepage = "https://awstats.org"; license = licenses.gpl3Plus; platforms = platforms.unix; }; diff --git a/pkgs/tools/system/bar/default.nix b/pkgs/tools/system/bar/default.nix index 32945a24bb1..79bb3f79a99 100644 --- a/pkgs/tools/system/bar/default.nix +++ b/pkgs/tools/system/bar/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl }: +{ lib, stdenv, fetchurl }: stdenv.mkDerivation { name = "bar-1.11.1"; @@ -11,8 +11,8 @@ stdenv.mkDerivation { meta = { description = "Console progress bar"; homepage = "http://clpbar.sourceforge.net/"; - license = stdenv.lib.licenses.gpl2; - maintainers = [ stdenv.lib.maintainers.rdnetto ]; - platforms = stdenv.lib.platforms.all; + license = lib.licenses.gpl2; + maintainers = [ lib.maintainers.rdnetto ]; + platforms = lib.platforms.all; }; } diff --git a/pkgs/tools/system/bfs/default.nix b/pkgs/tools/system/bfs/default.nix index 78e92e01c6e..4b1bcec96a7 100644 --- a/pkgs/tools/system/bfs/default.nix +++ b/pkgs/tools/system/bfs/default.nix @@ -1,27 +1,27 @@ -{ stdenv, fetchFromGitHub, libcap, acl }: +{ lib, stdenv, fetchFromGitHub, libcap, acl }: stdenv.mkDerivation rec { pname = "bfs"; - version = "1.7"; + version = "2.2.1"; src = fetchFromGitHub { repo = "bfs"; owner = "tavianator"; rev = version; - sha256 = "1jkz99i10y6dwc4dyh2vp3p549jscgwjdp6x17mcw561bnam2287"; + sha256 = "sha256-3E1EXtI8QvHRDoVSV21K1/Rknp3E+GV1n5iorrv5jNY="; }; - buildInputs = stdenv.lib.optionals stdenv.isLinux [ libcap acl ]; + buildInputs = lib.optionals stdenv.isLinux [ libcap acl ]; # Disable LTO on darwin. See https://github.com/NixOS/nixpkgs/issues/19098 - preConfigure = stdenv.lib.optionalString stdenv.isDarwin '' + preConfigure = lib.optionalString stdenv.isDarwin '' substituteInPlace Makefile --replace "-flto -DNDEBUG" "-DNDEBUG" ''; makeFlags = [ "PREFIX=$(out)" ]; buildFlags = [ "release" ]; # "release" enables compiler optimizations - meta = with stdenv.lib; { + meta = with lib; { description = "A breadth-first version of the UNIX find command"; longDescription = '' bfs is a variant of the UNIX find command that operates breadth-first rather than diff --git a/pkgs/tools/system/bottom/default.nix b/pkgs/tools/system/bottom/default.nix new file mode 100644 index 00000000000..1401f2a78a9 --- /dev/null +++ b/pkgs/tools/system/bottom/default.nix @@ -0,0 +1,52 @@ +{ lib +, stdenv +, fetchFromGitHub +, rustPlatform +, DiskArbitration +, Foundation +, IOKit +, installShellFiles +, libiconv +}: + +rustPlatform.buildRustPackage rec { + pname = "bottom"; + version = "0.6.3"; + + src = fetchFromGitHub { + owner = "ClementTsang"; + repo = pname; + rev = version; + sha256 = "sha256-hXEaQL4jTd/MfEUVKUTs7oTRAffau1YA/IUUtD+V9KI="; + }; + + prePatch = '' + rm .cargo/config.toml + ''; + + nativeBuildInputs = [ installShellFiles ]; + + buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ + DiskArbitration + Foundation + IOKit + libiconv + ]; + + cargoSha256 = "sha256-aeR6fcIWkY4AWZy8tVotUAVRVSiO/0S0DU/A9/ATrF4="; + + doCheck = false; + + postInstall = '' + installShellCompletion $releaseDir/build/bottom-*/out/btm.{bash,fish} --zsh $releaseDir/build/bottom-*/out/_btm + ''; + + meta = with lib; { + description = "A cross-platform graphical process/system monitor with a customizable interface"; + homepage = "https://github.com/ClementTsang/bottom"; + license = licenses.mit; + maintainers = with maintainers; [ berbiche ]; + platforms = platforms.unix; + mainProgram = "btm"; + }; +} diff --git a/pkgs/tools/system/bpytop/default.nix b/pkgs/tools/system/bpytop/default.nix index a408f44ec10..f552ede91b5 100644 --- a/pkgs/tools/system/bpytop/default.nix +++ b/pkgs/tools/system/bpytop/default.nix @@ -1,17 +1,23 @@ -{ stdenv, python3Packages, fetchFromGitHub, makeWrapper, substituteAll }: +{ lib +, stdenv +, python3Packages +, fetchFromGitHub +, makeWrapper +}: stdenv.mkDerivation rec { pname = "bpytop"; - version = "1.0.21"; + version = "1.0.67"; src = fetchFromGitHub { owner = "aristocratos"; repo = pname; rev = "v${version}"; - sha256 = "10cygn4srmzk1b279hrlp4rjbldkzq7354fhm0jbmd3rp15b454p"; + sha256 = "sha256-nvpIqX16WP9kslFo1ne5+QAZcvG+WFm5kDVOLN4C+b0="; }; - buildInputs = [ makeWrapper ]; + nativeBuildInputs = [ makeWrapper ]; + propagatedBuildInputs = with python3Packages; [ python psutil ]; dontBuild = true; @@ -19,6 +25,7 @@ stdenv.mkDerivation rec { postPatch = '' sed -i -e "s#/usr/\[local/\]#$out/#g" \ -e "s#/usr/{td}#$out/#g" \ + -e "s#THEME_DIR: str = \"\"#THEME_DIR: str = \"$out/share/bpytop/themes\"#" \ ./bpytop.py ''; @@ -32,7 +39,7 @@ stdenv.mkDerivation rec { --prefix PYTHONPATH : "$PYTHONPATH" ''; - meta = with stdenv.lib; { + meta = with lib; { description = "A resource monitor; python port of bashtop"; homepage = src.meta.homepage; license = licenses.apsl20; diff --git a/pkgs/tools/system/chase/default.nix b/pkgs/tools/system/chase/default.nix index c4396aad9ca..ff4885b088d 100644 --- a/pkgs/tools/system/chase/default.nix +++ b/pkgs/tools/system/chase/default.nix @@ -1,10 +1,10 @@ -{ stdenv, fetchurl ,pkgconfig, libatomic_ops , boehmgc }: +{ lib, stdenv, fetchurl ,pkg-config, libatomic_ops , boehmgc }: stdenv.mkDerivation rec { pname = "chase"; version = "0.5.2"; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkg-config ]; buildInputs = [ libatomic_ops boehmgc ] ; src = fetchurl { url = "mirror://debian/pool/main/c/chase/chase_${version}.orig.tar.gz"; @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { makeFlags = [ "-e" ]; makeFlagsArray="LIBS=-lgc"; - meta = with stdenv.lib ; { + meta = with lib ; { description = "Follow a symlink and print out its target file"; longDescription = '' A commandline program that chases symbolic filesystems links to the original file diff --git a/pkgs/tools/system/clinfo/default.nix b/pkgs/tools/system/clinfo/default.nix index c50bfe4a0d0..9c5b54f554b 100644 --- a/pkgs/tools/system/clinfo/default.nix +++ b/pkgs/tools/system/clinfo/default.nix @@ -1,27 +1,30 @@ -{ stdenv, fetchFromGitHub, ocl-icd, opencl-headers }: +{ lib, stdenv, fetchFromGitHub, ocl-icd, opencl-headers }: stdenv.mkDerivation rec { pname = "clinfo"; - version = "2.2.18.04.06"; + version = "3.0.21.02.21"; - src = fetchFromGitHub { - owner = "Oblomov"; - repo = "clinfo"; - rev = version; - sha256 = "0y2q0lz5yzxy970b7w7340vp4fl25vndahsyvvrywcrn51ipgplx"; - }; + src = fetchFromGitHub { + owner = "Oblomov"; + repo = "clinfo"; + rev = version; + sha256 = "sha256-0ijfbfv1F6mnt1uFH/A4yOADJoAFrPMa3yAOFJW53ek="; + }; buildInputs = [ ocl-icd opencl-headers ]; - NIX_CFLAGS_COMPILE = [ "-Wno-error=stringop-truncation" ]; + NIX_CFLAGS_COMPILE = [ + "-Wno-error=stringop-overflow" + "-Wno-error=stringop-truncation" + ]; makeFlags = [ "PREFIX=${placeholder "out"}" ]; - meta = with stdenv.lib; { + meta = with lib; { description = "Print all known information about all available OpenCL platforms and devices in the system"; homepage = "https://github.com/Oblomov/clinfo"; license = licenses.cc0; - platforms = platforms.linux; maintainers = with maintainers; [ athas ]; + platforms = platforms.linux; }; } diff --git a/pkgs/tools/system/cm-rgb/default.nix b/pkgs/tools/system/cm-rgb/default.nix index acfe440b5d5..3a6c7c6e57c 100644 --- a/pkgs/tools/system/cm-rgb/default.nix +++ b/pkgs/tools/system/cm-rgb/default.nix @@ -1,4 +1,4 @@ -{ stdenv +{ lib , buildPythonApplication , fetchFromGitHub , atk @@ -12,13 +12,13 @@ buildPythonApplication rec { pname = "cm-rgb"; - version = "0.3.4"; + version = "0.3.6"; src = fetchFromGitHub { owner = "gfduszynski"; repo = pname; rev = "v${version}"; - sha256 = "04brldaa2zpvzkcg43i5hpbj03d1nqrgiplm5nh4shn12cif19ag"; + sha256 = "sha256-m0ZAjSLRzcjzygLEbvCiDd7krc1gRqTg1ZV4H/o2c68="; }; nativeBuildInputs = [ @@ -37,21 +37,17 @@ buildPythonApplication rec { ]; postInstall = '' - # Remove this line when/if this PR gets merged: - # https://github.com/gfduszynski/cm-rgb/pull/43 - install -m0755 scripts/cm-rgb-gui $out/bin/cm-rgb-gui - mkdir -p $out/etc/udev/rules.d echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="2516", ATTR{idProduct}=="0051", TAG+="uaccess"' \ > $out/etc/udev/rules.d/60-cm-rgb.rules ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Control AMD Wraith Prism RGB LEDs"; longDescription = '' cm-rgb controls AMD Wraith Prism RGB LEDS. - To permit non-root accounts to change use this utility on + To permit non-root accounts to use this utility on NixOS, add this package to <literal>services.udev.packages</literal> in <filename>configuration.nix</filename>. ''; diff --git a/pkgs/tools/system/collectd/data.nix b/pkgs/tools/system/collectd/data.nix index 378eb62d6cc..3867bd6bb3d 100644 --- a/pkgs/tools/system/collectd/data.nix +++ b/pkgs/tools/system/collectd/data.nix @@ -5,7 +5,7 @@ stdenv.mkDerivation { pname = "collectd-data"; - phases = [ "installPhase" ]; + dontUnpack = true; installPhase = '' mkdir -p $out/share/collectd diff --git a/pkgs/tools/system/collectd/default.nix b/pkgs/tools/system/collectd/default.nix index f625a441ba3..600c5cbfecd 100644 --- a/pkgs/tools/system/collectd/default.nix +++ b/pkgs/tools/system/collectd/default.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchurl, fetchpatch, darwin, callPackage +{ lib, stdenv, fetchurl, fetchpatch, darwin, callPackage , autoreconfHook -, pkgconfig +, pkg-config , libtool , ... }@args: @@ -8,18 +8,18 @@ let plugins = callPackage ./plugins.nix args; in stdenv.mkDerivation rec { - version = "5.11.0"; + version = "5.12.0"; pname = "collectd"; src = fetchurl { url = "https://collectd.org/files/${pname}-${version}.tar.bz2"; - sha256 = "1cjxksxdqcqdccz1nbnc2fp6yy84qq361ynaq5q8bailds00mc9p"; + sha256 = "1mh97afgq6qgmpvpr84zngh58m0sl1b4wimqgvvk376188q09bjv"; }; - nativeBuildInputs = [ pkgconfig autoreconfHook ]; + nativeBuildInputs = [ pkg-config autoreconfHook ]; buildInputs = [ libtool - ] ++ stdenv.lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.ApplicationServices ] ++ plugins.buildInputs; @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - meta = with stdenv.lib; { + meta = with lib; { description = "Daemon which collects system performance statistics periodically"; homepage = "https://collectd.org"; license = licenses.gpl2; diff --git a/pkgs/tools/system/collectd/plugins.nix b/pkgs/tools/system/collectd/plugins.nix index defeed4c892..dd578cd6393 100644 --- a/pkgs/tools/system/collectd/plugins.nix +++ b/pkgs/tools/system/collectd/plugins.nix @@ -1,4 +1,4 @@ -{ stdenv +{ lib, stdenv , curl , darwin , hiredis @@ -49,7 +49,7 @@ let aggregation = {}; amqp = { buildInputs = [ yajl ] ++ - stdenv.lib.optionals stdenv.isLinux [ rabbitmq-c ]; + lib.optionals stdenv.isLinux [ rabbitmq-c ]; }; apache = { buildInputs = [ curl ]; @@ -62,7 +62,7 @@ let }; barometer = {}; battery = { - buildInputs = stdenv.lib.optionals stdenv.isDarwin [ + buildInputs = lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.IOKit ]; }; @@ -94,9 +94,9 @@ let }; df = {}; disk = { - buildInputs = stdenv.lib.optionals stdenv.isLinux [ + buildInputs = lib.optionals stdenv.isLinux [ udev - ] ++ stdenv.lib.optionals stdenv.isDarwin [ + ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.IOKit ]; }; @@ -126,7 +126,7 @@ let iptables = { buildInputs = [ libpcap - ] ++ stdenv.lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.isLinux [ iptables libmnl ]; }; @@ -161,14 +161,14 @@ let memory = {}; mic = {}; modbus = { - buildInputs = stdenv.lib.optionals stdenv.isLinux [ libmodbus ]; + buildInputs = lib.optionals stdenv.isLinux [ libmodbus ]; }; mqtt = { buildInputs = [ mosquitto ]; }; multimeter = {}; mysql = { - buildInputs = stdenv.lib.optionals (libmysqlclient != null) [ + buildInputs = lib.optionals (libmysqlclient != null) [ libmysqlclient ]; }; @@ -176,7 +176,7 @@ let netlink = { buildInputs = [ libpcap - ] ++ stdenv.lib.optionals stdenv.isLinux [ + ] ++ lib.optionals stdenv.isLinux [ libmnl ]; }; @@ -236,20 +236,20 @@ let buildInputs = [ rrdtool libxml2 ]; }; sensors = { - buildInputs = stdenv.lib.optionals stdenv.isLinux [ lm_sensors ]; + buildInputs = lib.optionals stdenv.isLinux [ lm_sensors ]; }; serial = {}; sigrok = { - buildInputs = stdenv.lib.optionals stdenv.isLinux [ libsigrok udev ]; + buildInputs = lib.optionals stdenv.isLinux [ libsigrok udev ]; }; smart = { - buildInputs = stdenv.lib.optionals stdenv.isLinux [ libatasmart udev ]; + buildInputs = lib.optionals stdenv.isLinux [ libatasmart udev ]; }; snmp = { - buildInputs = stdenv.lib.optionals stdenv.isLinux [ net-snmp ]; + buildInputs = lib.optionals stdenv.isLinux [ net-snmp ]; }; snmp_agent = { - buildInputs = stdenv.lib.optionals stdenv.isLinux [ net-snmp ]; + buildInputs = lib.optionals stdenv.isLinux [ net-snmp ]; }; statsd = {}; swap = {}; @@ -280,7 +280,7 @@ let }; virt = { buildInputs = [ libvirt libxml2 yajl ] ++ - stdenv.lib.optionals stdenv.isLinux [ lvm2 udev + lib.optionals stdenv.isLinux [ lvm2 udev # those might be no longer required when https://github.com/NixOS/nixpkgs/pull/51767 # is merged libapparmor numactl libcap_ng diff --git a/pkgs/tools/system/colorls/Gemfile.lock b/pkgs/tools/system/colorls/Gemfile.lock index d138a167ce7..e9cd8cbf766 100644 --- a/pkgs/tools/system/colorls/Gemfile.lock +++ b/pkgs/tools/system/colorls/Gemfile.lock @@ -2,14 +2,16 @@ GEM remote: https://rubygems.org/ specs: clocale (0.0.4) - colorls (1.4.2) + colorls (1.4.3) clocale (~> 0) filesize (~> 0) manpages (~> 0) rainbow (>= 2.2, < 4.0) + unicode-display_width (~> 1.7) filesize (0.2.0) manpages (0.6.1) rainbow (3.0.0) + unicode-display_width (1.7.0) PLATFORMS ruby diff --git a/pkgs/tools/system/colorls/gemset.nix b/pkgs/tools/system/colorls/gemset.nix index 2e4a26ff918..b978a4762ac 100644 --- a/pkgs/tools/system/colorls/gemset.nix +++ b/pkgs/tools/system/colorls/gemset.nix @@ -10,15 +10,15 @@ version = "0.0.4"; }; colorls = { - dependencies = ["clocale" "filesize" "manpages" "rainbow"]; + dependencies = ["clocale" "filesize" "manpages" "rainbow" "unicode-display_width"]; groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0sw377wklld5zn1la0smxc2bg4rph2xf9d0h3zmxhmds06lb92db"; + sha256 = "1w9d99qzgxw8wwa4z1vkdnr70fppx2g9shma6dz3ihjhajj2xvmq"; type = "gem"; }; - version = "1.4.2"; + version = "1.4.3"; }; filesize = { groups = ["default"]; @@ -50,4 +50,14 @@ }; version = "3.0.0"; }; -} \ No newline at end of file + unicode-display_width = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "06i3id27s60141x6fdnjn5rar1cywdwy64ilc59cz937303q3mna"; + type = "gem"; + }; + version = "1.7.0"; + }; +} diff --git a/pkgs/tools/system/consul-template/default.nix b/pkgs/tools/system/consul-template/default.nix index 69d5cd6bb73..5326f8722d8 100644 --- a/pkgs/tools/system/consul-template/default.nix +++ b/pkgs/tools/system/consul-template/default.nix @@ -1,24 +1,27 @@ -{ stdenv, buildGoPackage, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub }: -buildGoPackage rec { +buildGoModule rec { pname = "consul-template"; - version = "0.19.4"; - rev = "v${version}"; - - goPackagePath = "github.com/hashicorp/consul-template"; + version = "0.26.0"; src = fetchFromGitHub { - inherit rev; owner = "hashicorp"; repo = "consul-template"; - sha256 = "06agjzpax45gw7s9b69cz9w523nx7ksikqcg0z0vipwrp7pwrydd"; + rev = "v${version}"; + sha256 = "sha256-upVCztpfT+SuuB343GEnT4KSnWul10/cItKJvUqJYo4="; }; - meta = with stdenv.lib; { + vendorSha256 = "sha256-IAWuqg8zZ9/ny3ZijxGgHAJDICV09NTGxPvLLP4oLzw="; + + # consul-template tests depend on vault and consul services running to + # execute tests so we skip them here + doCheck = false; + + meta = with lib; { homepage = "https://github.com/hashicorp/consul-template/"; description = "Generic template rendering and notifications with Consul"; platforms = platforms.linux ++ platforms.darwin; license = licenses.mpl20; - maintainers = with maintainers; [ pradeepchhetri ]; + maintainers = with maintainers; [ cpcloud pradeepchhetri ]; }; } diff --git a/pkgs/tools/system/cron/default.nix b/pkgs/tools/system/cron/default.nix index 9cde31205e1..d1b8d2d6afd 100644 --- a/pkgs/tools/system/cron/default.nix +++ b/pkgs/tools/system/cron/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, vim, sendmailPath ? "/usr/sbin/sendmail"}: +{lib, stdenv, fetchurl, vim, sendmailPath ? "/usr/sbin/sendmail"}: stdenv.mkDerivation { name = "cron-4.1"; @@ -39,7 +39,7 @@ stdenv.mkDerivation { preInstall = "mkdir -p $out/bin $out/sbin $out/share/man/man1 $out/share/man/man5 $out/share/man/man8"; - meta = with stdenv.lib; { + meta = with lib; { description = "Daemon for running commands at specific times (Vixie Cron)"; license = licenses.bsd0; platforms = with platforms; linux ++ darwin; diff --git a/pkgs/tools/system/ctop/default.nix b/pkgs/tools/system/ctop/default.nix index 6cb8e482160..45cbca172fa 100644 --- a/pkgs/tools/system/ctop/default.nix +++ b/pkgs/tools/system/ctop/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "ctop"; - version = "0.7.3"; + version = "0.7.6"; src = fetchFromGitHub { owner = "bcicen"; repo = pname; - rev = "v${version}"; - sha256 = "0y72l65xgfqrgghzbm1zcy776l5m31z0gn6vfr689zyi3k3f4kh8"; + rev = version; + sha256 = "sha256-ceRyYrqmgdTnV8m9LkLlR6iTrC5F81X/V3fWI2CiKBw="; }; - vendorSha256 = "1x4li44vg0l1x205v9a971cgphplxhsrn59q97gmj9cfy4m7jdfw"; + vendorSha256 = "sha256-UCeMy4iT0c2sTcCDPg0TIYCLYfrIUvHluUuGIpzluSg="; doCheck = false; @@ -21,6 +21,6 @@ buildGoModule rec { description = "Top-like interface for container metrics"; homepage = "https://ctop.sh/"; license = licenses.mit; - maintainers = with maintainers; [ apeyroux marsam ]; + maintainers = with maintainers; [ apeyroux marsam SuperSandro2000 ]; }; } diff --git a/pkgs/tools/system/daemon/default.nix b/pkgs/tools/system/daemon/default.nix index fb06247f984..b7be04bcfcb 100644 --- a/pkgs/tools/system/daemon/default.nix +++ b/pkgs/tools/system/daemon/default.nix @@ -1,16 +1,23 @@ -{stdenv, fetchurl, perl}: +{ lib, stdenv, fetchurl, perl }: + +stdenv.mkDerivation rec { + pname = "daemon"; + version = "0.8"; -stdenv.mkDerivation { - name = "daemon-0.6.4"; src = fetchurl { - url = "http://libslack.org/daemon/download/daemon-0.6.4.tar.gz"; - sha256 = "18aw0f8k3j30xqwv4z03962kdpqd10nf1w9liihylmadlx5fmff4"; + url = "http://libslack.org/daemon/download/daemon-${version}.tar.gz"; + sha256 = "sha256-dPEubUs8hWMkib0IQx09mXvBcmS/V7cgI4Ty6AnP9ZY="; }; - makeFlags = [ "PREFIX=$(out)" ]; + + makeFlags = [ + "PREFIX=$(out)" + "CC=${stdenv.cc.targetPrefix}cc" + ]; + buildInputs = [ perl ]; - meta = { - description = "Daemon turns other process into daemons"; + meta = with lib; { + description = "Turns other processes into daemons"; longDescription = '' Daemon turns other process into daemons. There are many tasks that need to be performed to correctly set up a daemon process. This can be tedious. @@ -18,8 +25,8 @@ stdenv.mkDerivation { writing daemons in languages other than C, C++ or Perl (e.g. /bin/sh, Java). ''; - license = stdenv.lib.licenses.gpl2Plus; - maintainers = [ stdenv.lib.maintainers.sander ]; - platforms = stdenv.lib.platforms.unix; + license = licenses.gpl2Plus; + maintainers = [ maintainers.sander ]; + platforms = platforms.unix; }; } diff --git a/pkgs/tools/system/daemonize/default.nix b/pkgs/tools/system/daemonize/default.nix index a8685189b61..b79da1986d7 100644 --- a/pkgs/tools/system/daemonize/default.nix +++ b/pkgs/tools/system/daemonize/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl }: +{ lib, stdenv, fetchurl }: stdenv.mkDerivation rec { pname = "daemonize"; @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "0q2c3i3si3k7wfhl6fyckkmkc81yp67pz52p3ggis79p4nczri10"; }; - meta = with stdenv.lib; { + meta = with lib; { description = "Runs a command as a Unix daemon"; homepage = "http://software.clapper.org/daemonize/"; license = licenses.bsd3; diff --git a/pkgs/tools/system/das_watchdog/default.nix b/pkgs/tools/system/das_watchdog/default.nix index 8c1a5657991..d9332acc898 100644 --- a/pkgs/tools/system/das_watchdog/default.nix +++ b/pkgs/tools/system/das_watchdog/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit, libgtop, xmessage, which, pkgconfig }: +{ lib, stdenv, fetchgit, libgtop, xmessage, which, pkg-config }: stdenv.mkDerivation { pname = "das_watchdog"; @@ -10,7 +10,7 @@ stdenv.mkDerivation { sha256 = "02y1vfb3wh4908xjj1kpyf8kgxk29x8dw7yl3pnl220qz2gi99vr"; }; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkg-config ]; buildInputs = [ libgtop xmessage which ]; installPhase = '' @@ -19,7 +19,7 @@ stdenv.mkDerivation { cp test_rt $out/bin/ ''; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://github.com/kmatheussen/das_watchdog"; description = "A general watchdog for the linux operating system"; longDescription = '' diff --git a/pkgs/tools/system/datefudge/default.nix b/pkgs/tools/system/datefudge/default.nix index 819071f3f06..be2ad70498a 100644 --- a/pkgs/tools/system/datefudge/default.nix +++ b/pkgs/tools/system/datefudge/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit, fetchpatch }: +{ lib, stdenv, fetchgit, fetchpatch }: stdenv.mkDerivation rec { pname = "datefudge"; @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { postInstall = "chmod +x $out/lib/datefudge/datefudge.so"; - meta = with stdenv.lib; { + meta = with lib; { description = "Fake the system date"; longDescription = '' datefudge is a small utility that pretends that the system time is diff --git a/pkgs/tools/system/dcfldd/default.nix b/pkgs/tools/system/dcfldd/default.nix index 9ea7b485b96..e5d5026e629 100644 --- a/pkgs/tools/system/dcfldd/default.nix +++ b/pkgs/tools/system/dcfldd/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl }: +{ lib, stdenv, fetchurl }: stdenv.mkDerivation rec { name = "dcfldd-1.3.4-1"; @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { buildInputs = [ ]; - meta = with stdenv.lib; { + meta = with lib; { description = "An enhanced version of GNU dd"; homepage = "http://dcfldd.sourceforge.net/"; diff --git a/pkgs/tools/system/dd_rescue/default.nix b/pkgs/tools/system/dd_rescue/default.nix index 9962337de07..ce996bf7c6f 100644 --- a/pkgs/tools/system/dd_rescue/default.nix +++ b/pkgs/tools/system/dd_rescue/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, autoconf }: +{ lib, stdenv, fetchurl, autoconf }: stdenv.mkDerivation rec { version = "1.99.8"; @@ -30,13 +30,12 @@ stdenv.mkDerivation rec { cp "$out/share/dd_rescue"/dd_rhelp*/dd_rhelp "$out/bin" ''; - meta = with stdenv.lib; { + meta = with lib; { description = "A tool to copy data from a damaged block device"; maintainers = with maintainers; [ raskin domenkozar ]; platforms = platforms.linux; homepage = "http://www.garloff.de/kurt/linux/ddrescue/"; license = licenses.gpl2Plus; - inherit version; updateWalker = true; }; } diff --git a/pkgs/tools/system/ddrescue/default.nix b/pkgs/tools/system/ddrescue/default.nix index 8efcf22312f..7e96a4c01f7 100644 --- a/pkgs/tools/system/ddrescue/default.nix +++ b/pkgs/tools/system/ddrescue/default.nix @@ -1,4 +1,4 @@ -{ stdenv +{ lib, stdenv , fetchurl, lzip }: @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { doCheck = true; # not cross; configureFlags = [ "CXX=${stdenv.cc.targetPrefix}c++" ]; - meta = with stdenv.lib; { + meta = with lib; { description = "GNU ddrescue, a data recovery tool"; longDescription = diff --git a/pkgs/tools/system/ddrescueview/default.nix b/pkgs/tools/system/ddrescueview/default.nix index 838873b7557..6c8e9c56cdc 100644 --- a/pkgs/tools/system/ddrescueview/default.nix +++ b/pkgs/tools/system/ddrescueview/default.nix @@ -1,20 +1,24 @@ { stdenv, lib, fetchurl, fpc, lazarus, atk, cairo, gdk-pixbuf, glib, gtk2, libX11, pango }: -stdenv.mkDerivation rec { - name = "ddrescueview-0.4alpha3"; +let + versionBase = "0.4"; + versionSuffix = "alpha4"; +in stdenv.mkDerivation rec { + pname = "ddrescueview"; + version = "${versionBase}${versionSuffix}"; + name = "ddrescueview-0.4alpha4"; src = fetchurl { - name = "${name}.tar.xz"; - url = "mirror://sourceforge/ddrescueview/ddrescueview-source-0.4%7Ealpha3.tar.xz"; - sha256 = "0603jisxkswfyh93s3i20f8ns4yf83dmgmy0lg5001rvaw9mkw9j"; + name = "ddrescueview-${versionBase}${versionSuffix}.tar.xz"; + url = "mirror://sourceforge/ddrescueview/ddrescueview-source-${versionBase}~${versionSuffix}.tar.xz"; + sha256 = "0v159nlc0lrqznbbwi7zda619is5h2rjk55gz6cl807j0kd19ycc"; }; + sourceRoot = "ddrescueview-source-${versionBase}~${versionSuffix}/source"; nativeBuildInputs = [ fpc lazarus ]; buildInputs = [ atk cairo gdk-pixbuf glib gtk2 libX11 pango ]; - sourceRoot = "source"; - NIX_LDFLAGS = "--as-needed -rpath ${lib.makeLibraryPath buildInputs}"; buildPhase = '' @@ -24,9 +28,8 @@ stdenv.mkDerivation rec { installPhase = '' install -Dt $out/bin ddrescueview cd ../resources/linux - install -Dt $out/share/applications ddrescueview.desktop - install -Dt $out/share/icons/hicolor/32x32/apps ddrescueview.xpm - install -Dt $out/share/man/man1 ddrescueview.1 + mkdir -p "$out/share" + cp -ar applications icons man $out/share ''; meta = with lib; { diff --git a/pkgs/tools/system/ddrutility/default.nix b/pkgs/tools/system/ddrutility/default.nix index bb24076ce7c..02c89b22989 100644 --- a/pkgs/tools/system/ddrutility/default.nix +++ b/pkgs/tools/system/ddrutility/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl }: +{ lib, stdenv, fetchurl }: stdenv.mkDerivation rec { pname = "ddrutility"; @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { makeFlags = [ "DESTDIR=$(out)" ]; - meta = with stdenv.lib; { + meta = with lib; { description = "A set of utilities for hard drive data rescue"; homepage = "https://sourceforge.net/projects/ddrutility/"; license = licenses.gpl2Plus; diff --git a/pkgs/tools/system/dfc/default.nix b/pkgs/tools/system/dfc/default.nix index 415b647befa..6478e699539 100644 --- a/pkgs/tools/system/dfc/default.nix +++ b/pkgs/tools/system/dfc/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, cmake, gettext}: +{lib, stdenv, fetchurl, cmake, gettext}: stdenv.mkDerivation rec { pname = "dfc"; @@ -14,8 +14,8 @@ stdenv.mkDerivation rec { meta = { homepage = "https://projects.gw-computing.net/projects/dfc"; description = "Displays file system space usage using graphs and colors"; - license = stdenv.lib.licenses.bsd3; - maintainers = with stdenv.lib.maintainers; [qknight]; - platforms = stdenv.lib.platforms.all; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [qknight]; + platforms = lib.platforms.all; }; } diff --git a/pkgs/tools/system/di/default.nix b/pkgs/tools/system/di/default.nix index 0a6ae26547b..6dcd3e87f68 100644 --- a/pkgs/tools/system/di/default.nix +++ b/pkgs/tools/system/di/default.nix @@ -1,17 +1,17 @@ -{ stdenv, fetchurl }: +{ lib, stdenv, fetchurl }: stdenv.mkDerivation rec { pname = "di"; - version = "4.48"; + version = "4.48.0.1"; src = fetchurl { url = "https://gentoo.com/${pname}/${pname}-${version}.tar.gz"; - sha256 = "0crvvfsxh8ryc0j19a2x52i9zacvggm8zi6j3kzygkcwnpz4km8r"; + sha256 = "sha256-YFCFRDGeq2h/UXKme/NnnCuFdtw2Vim6Y3SbytaItGc="; }; makeFlags = [ "INSTALL_DIR=$(out)" ]; - meta = with stdenv.lib; { + meta = with lib; { description = "Disk information utility; displays everything 'df' does and more"; homepage = "https://gentoo.com/di/"; license = licenses.zlib; diff --git a/pkgs/tools/system/disk-filltest/default.nix b/pkgs/tools/system/disk-filltest/default.nix index 7bcf592012a..ecfa14aa91b 100644 --- a/pkgs/tools/system/disk-filltest/default.nix +++ b/pkgs/tools/system/disk-filltest/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub }: +{ lib, stdenv, fetchFromGitHub }: stdenv.mkDerivation rec { pname = "disk-filltest"; @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { mkdir -p $out/share/man; mv $out/man1 $out/share/man ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Simple program to detect bad disks by filling them with random data"; longDescription = '' disk-filltest is a tool to check storage disks for coming diff --git a/pkgs/tools/system/dog/default.nix b/pkgs/tools/system/dog/default.nix index 5063e3555bb..94a6b34ff53 100644 --- a/pkgs/tools/system/dog/default.nix +++ b/pkgs/tools/system/dog/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl}: +{lib, stdenv, fetchurl}: stdenv.mkDerivation { name = "dog-1.7"; @@ -20,7 +20,7 @@ stdenv.mkDerivation { cp dog $out/bin ''; - meta = with stdenv.lib; { + meta = with lib; { homepage = "http://lwn.net/Articles/421072/"; description = "cat replacement"; license = licenses.gpl2Plus; diff --git a/pkgs/tools/system/efibootmgr/default.nix b/pkgs/tools/system/efibootmgr/default.nix index dd898de0fc2..0c678dd9c51 100644 --- a/pkgs/tools/system/efibootmgr/default.nix +++ b/pkgs/tools/system/efibootmgr/default.nix @@ -1,10 +1,10 @@ -{ stdenv, fetchFromGitHub, fetchpatch, pkgconfig, efivar, popt }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config, efivar, popt }: stdenv.mkDerivation rec { pname = "efibootmgr"; version = "17"; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkg-config ]; buildInputs = [ efivar popt ]; @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { installFlags = [ "prefix=$(out)" ]; - meta = with stdenv.lib; { + meta = with lib; { description = "A Linux user-space application to modify the Intel Extensible Firmware Interface (EFI) Boot Manager"; homepage = "https://github.com/rhboot/efibootmgr"; license = licenses.gpl2; diff --git a/pkgs/tools/system/efivar/default.nix b/pkgs/tools/system/efivar/default.nix index ea0ed8afcfd..c92b28e7f5e 100644 --- a/pkgs/tools/system/efivar/default.nix +++ b/pkgs/tools/system/efivar/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPackages, fetchFromGitHub, fetchurl, pkgconfig, popt }: +{ lib, stdenv, buildPackages, fetchFromGitHub, fetchurl, pkg-config, popt }: stdenv.mkDerivation rec { pname = "efivar"; @@ -39,10 +39,11 @@ stdenv.mkDerivation rec { sha256 = "1ajj11wwsvamfspq4naanvw08h63gr0g71q0dfbrrywrhc0jlmdw"; }) ]; - # We have no LTO here since commit 22284b07. - postPatch = if stdenv.isi686 then "sed '/^OPTIMIZE /s/-flto//' -i Make.defaults" else null; + # We have no LTO here since commit 22284b07. With GCC 10 that triggers a warning. + postPatch = "sed '/^OPTIMIZE /s/-flto//' -i Make.defaults"; + NIX_CFLAGS_COMPILE = "-Wno-error=stringop-truncation"; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkg-config ]; buildInputs = [ popt ]; depsBuildBuild = [ buildPackages.stdenv.cc ]; @@ -55,7 +56,7 @@ stdenv.mkDerivation rec { "PCDIR=$(dev)/lib/pkgconfig" ]; - meta = with stdenv.lib; { + meta = with lib; { inherit (src.meta) homepage; description = "Tools and library to manipulate EFI variables"; platforms = platforms.linux; diff --git a/pkgs/tools/system/envconsul/default.nix b/pkgs/tools/system/envconsul/default.nix index 09175f14609..9e8180b318a 100644 --- a/pkgs/tools/system/envconsul/default.nix +++ b/pkgs/tools/system/envconsul/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildGoPackage, fetchFromGitHub }: +{ lib, buildGoPackage, fetchFromGitHub }: buildGoPackage rec { pname = "envconsul"; @@ -14,7 +14,7 @@ buildGoPackage rec { sha256 = "03cgxkyyynr067dg5b0lhvaxn60318fj9fh55p1n43vj5nrzgnbc"; }; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://github.com/hashicorp/envconsul/"; description = "Read and set environmental variables for processes from Consul"; platforms = platforms.linux ++ platforms.darwin; diff --git a/pkgs/tools/system/evemu/default.nix b/pkgs/tools/system/evemu/default.nix index 02f92a19890..c01a909668e 100644 --- a/pkgs/tools/system/evemu/default.nix +++ b/pkgs/tools/system/evemu/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit, autoreconfHook, pkgconfig, pythonPackages +{ lib, stdenv, fetchgit, autoreconfHook, pkg-config, python3Packages , libevdev }: @@ -14,11 +14,13 @@ stdenv.mkDerivation rec { sha256 = "1m38fxwy2s82vb2qm9aqxinws12akmqqq7q66is931lc3awqkbah"; }; - nativeBuildInputs = [ pkgconfig autoreconfHook ]; + nativeBuildInputs = [ pkg-config autoreconfHook python3Packages.python ]; - buildInputs = [ pythonPackages.python pythonPackages.evdev libevdev ]; + buildInputs = [ python3Packages.evdev libevdev ]; - meta = with stdenv.lib; { + strictDeps = true; + + meta = with lib; { description = "Records and replays device descriptions and events to emulate input devices through the kernel's input system"; homepage = "https://www.freedesktop.org/wiki/Evemu/"; repositories.git = "git://git.freedesktop.org/git/evemu"; diff --git a/pkgs/tools/system/facter/default.nix b/pkgs/tools/system/facter/default.nix index 01fd10d6777..d1d18809a5b 100644 --- a/pkgs/tools/system/facter/default.nix +++ b/pkgs/tools/system/facter/default.nix @@ -1,18 +1,18 @@ -{ stdenv, fetchFromGitHub, boost, cmake, cpp-hocon, curl, leatherman, libwhereami, libyamlcpp, openssl, ruby, utillinux }: +{ lib, stdenv, fetchFromGitHub, boost, cmake, cpp-hocon, curl, leatherman, libwhereami, libyamlcpp, openssl, ruby, util-linux }: stdenv.mkDerivation rec { pname = "facter"; - version = "3.14.12"; + version = "3.14.17"; src = fetchFromGitHub { - sha256 = "1n0m2w133bpbbpc1imp89xlinmny7xaz1w87cs18p1lnk2w043lc"; + sha256 = "sha256-RvsUt1DyN8Xr+Xtz84mbKlDwxLewgK6qklYVdQHu6q0="; rev = version; repo = pname; owner = "puppetlabs"; }; - CXXFLAGS = stdenv.lib.optionalString stdenv.cc.isGNU "-fpermissive -Wno-error=catch-value"; - NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lblkid"; + CXXFLAGS = lib.optionalString stdenv.cc.isGNU "-fpermissive -Wno-error=catch-value"; + NIX_LDFLAGS = lib.optionalString stdenv.isLinux "-lblkid"; cmakeFlags = [ "-DFACTER_RUBY=${ruby}/lib/libruby${stdenv.hostPlatform.extensions.sharedLibrary}" @@ -22,11 +22,9 @@ stdenv.mkDerivation rec { NIX_CFLAGS_COMPILE = "-Wno-error"; nativeBuildInputs = [ cmake ]; - buildInputs = [ boost cpp-hocon curl leatherman libwhereami libyamlcpp openssl ruby utillinux ]; + buildInputs = [ boost cpp-hocon curl leatherman libwhereami libyamlcpp openssl ruby util-linux ]; - enableParallelBuilding = true; - - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://github.com/puppetlabs/facter"; description = "A system inventory tool"; license = licenses.asl20; diff --git a/pkgs/tools/system/fakechroot/default.nix b/pkgs/tools/system/fakechroot/default.nix index fc74644ab03..382a47039ba 100644 --- a/pkgs/tools/system/fakechroot/default.nix +++ b/pkgs/tools/system/fakechroot/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, perl }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, perl }: stdenv.mkDerivation rec { pname = "fakechroot"; @@ -21,12 +21,30 @@ stdenv.mkDerivation rec { # and are uninteresting as well as unimportant for our purposes (since NEWS never leaves the build env). excludes = [ "NEWS.md" ]; }) + + # glibc 2.33 compat (https://github.com/dex4er/fakechroot/pull/85/) + (fetchpatch { + url = "https://github.com/dex4er/fakechroot/commit/534e6d555736b97211523970d378dfb0db2608e9.patch"; + sha256 = "sha256-bUlGJZvOSrATPt8bxGqU1UETTUD9V/HhJyA5ZxsOLQU="; + }) + (fetchpatch { + url = "https://github.com/dex4er/fakechroot/commit/75d7e6fa191c11a791faff06a0de86eaa7801d05.patch"; + sha256 = "sha256-vWN7zFkKlBd/F+h/66z21RiZqkSCn3UIzy9NHV7TYDg="; + }) + (fetchpatch { + url = "https://github.com/dex4er/fakechroot/commit/693a3597ea7fccfb62f357503ff177bd3e3d5a89.patch"; + sha256 = "sha256-bFXsT0hWocJFbtS1cpzo7oIy/x66iUw6QE1/cEoZ+3k="; + }) + (fetchpatch { + url = "https://github.com/dex4er/fakechroot/commit/e7c1f3a446e594a4d0cce5f5d499c9439ce1d5c5.patch"; + sha256 = "sha256-eX6kB4U1ZlXoRtkSVEIBTRjO/cTS/7z5a9S366DiRMg="; + }) ]; nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ perl ]; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://github.com/dex4er/fakechroot"; description = "Give a fake chroot environment through LD_PRELOAD"; license = licenses.lgpl21; diff --git a/pkgs/tools/system/fakeroot/default.nix b/pkgs/tools/system/fakeroot/default.nix index c5765609a27..bf42e987c4d 100644 --- a/pkgs/tools/system/fakeroot/default.nix +++ b/pkgs/tools/system/fakeroot/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchpatch, getopt, libcap, gnused }: +{ lib, stdenv, fetchurl, fetchpatch, getopt, libcap, gnused }: stdenv.mkDerivation rec { version = "1.23"; @@ -9,9 +9,25 @@ stdenv.mkDerivation rec { sha256 = "1xpl0s2yjyjwlf832b6kbkaa5921liybaar13k7n45ckd9lxd700"; }; - patches = stdenv.lib.optional stdenv.isLinux ./einval.patch + patches = lib.optionals stdenv.isLinux [ + ./einval.patch + + # glibc 2.33 patches from ArchLinux + (fetchpatch { + url = "https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/fakeroot/trunk/fakeroot-1.25.3-glibc-2.33-fix-1.patch"; + sha256 = "sha256-F6BcxYInSLu7Fxg6OmMZDhTWoLqsc//yYPlTZqQQl68="; + }) + (fetchpatch { + url = "https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/fakeroot/trunk/fakeroot-1.25.3-glibc-2.33-fix-2.patch"; + sha256 = "sha256-ifpJxhk6MyQpFolC1hIAAUjcHmOHVU1D25tRwpu2S/k="; + }) + (fetchpatch { + url = "https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/fakeroot/trunk/fakeroot-1.25.3-glibc-2.33-fix-3.patch"; + sha256 = "sha256-o2Xm4C64Ny9TL8fjsZltjO1CdJ4VGwqZ+LnufVL5Sq8="; + }) + ] # patchset from brew - ++ stdenv.lib.optionals stdenv.isDarwin [ + ++ lib.optionals stdenv.isDarwin [ (fetchpatch { name = "0001-Implement-openat-2-wrapper-which-handles-optional-ar.patch"; url = "https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=0001-Implement-openat-2-wrapper-which-handles-optional-ar.patch;att=1;bug=766649"; @@ -30,19 +46,31 @@ stdenv.mkDerivation rec { ]; buildInputs = [ getopt gnused ] - ++ stdenv.lib.optional (!stdenv.isDarwin) libcap + ++ lib.optional (!stdenv.isDarwin) libcap ; postUnpack = '' sed -i -e "s@getopt@$(type -p getopt)@g" -e "s@sed@$(type -p sed)@g" ${pname}-${version}/scripts/fakeroot.in ''; + postConfigure = let + # additional patch from brew, but needs to be applied to a generated file + patch-wraptmpf = fetchpatch { + name = "fakeroot-patch-wraptmpf-h.patch"; + url = "https://bugs.debian.org/cgi-bin/bugreport.cgi?att=3;bug=766649;filename=fakeroot-patch-wraptmpf-h.patch;msg=20"; + sha256 = "1jhsi4bv6nnnjb4vmmmbhndqg719ckg860hgw98bli8m05zwbx6a"; + }; + in lib.optional stdenv.isDarwin '' + make wraptmpf.h + patch -p1 < ${patch-wraptmpf} + ''; + meta = { homepage = "https://salsa.debian.org/clint/fakeroot"; description = "Give a fake root environment through LD_PRELOAD"; - license = stdenv.lib.licenses.gpl2Plus; - maintainers = with stdenv.lib.maintainers; [viric]; - platforms = stdenv.lib.platforms.unix; + license = lib.licenses.gpl2Plus; + maintainers = with lib.maintainers; [viric]; + platforms = lib.platforms.unix; }; } diff --git a/pkgs/tools/system/fancy-motd/default.nix b/pkgs/tools/system/fancy-motd/default.nix new file mode 100644 index 00000000000..e8f21c6fbd3 --- /dev/null +++ b/pkgs/tools/system/fancy-motd/default.nix @@ -0,0 +1,47 @@ +{ stdenv, lib, fetchFromGitHub, bc, curl, figlet, fortune, gawk, iproute2, procps }: + +stdenv.mkDerivation rec { + pname = "fancy-motd"; + version = "unstable-2021-07-15"; + + src = fetchFromGitHub { + owner = "bcyran"; + repo = pname; + rev = "e8d2d2602d9b9fbc132ddc4f9fbf22428d715721"; + sha256 = "10fxr1grsiwvdc5m2wd4n51lvz0zd4sldg9rzviaim18nw68gdq3"; + }; + + buildInputs = [ bc curl figlet fortune gawk iproute2 ]; + + postPatch = '' + substituteInPlace motd.sh \ + --replace 'BASE_DIR="$(dirname "$(readlink -f "$0")")"' "BASE_DIR=\"$out/lib\"" + + substituteInPlace modules/20-uptime \ + --replace "uptime -p" "${procps}/bin/uptime -p" + + # does not work on nixos + rm modules/41-updates + ''; + + installPhase = '' + runHook preInstall + + install -D motd.sh $out/bin/motd + + install -D framework.sh $out/lib/framework.sh + install -D config.sh.example $out/lib/config.sh + find modules -type f -exec install -D {} $out/lib/{} \; + + runHook postInstall + ''; + + meta = with lib; { + description = "Fancy, colorful MOTD written in bash. Server status at a glance."; + homepage = "https://github.com/bcyran/fancy-motd"; + license = licenses.mit; + maintainers = with maintainers; [ rhoriguchi ]; + platforms = platforms.linux; + mainProgram = "motd"; + }; +} diff --git a/pkgs/tools/system/fcron/default.nix b/pkgs/tools/system/fcron/default.nix index 59daac89bd4..9e3b3c2c16d 100644 --- a/pkgs/tools/system/fcron/default.nix +++ b/pkgs/tools/system/fcron/default.nix @@ -1,7 +1,7 @@ # restart using 'killall -TERM fcron; fcron -b # use convert-fcrontab to update fcrontab files -{ stdenv, fetchurl, perl, busybox, vim }: +{ lib, stdenv, fetchurl, perl, busybox, vim }: stdenv.mkDerivation rec { pname = "fcron"; @@ -52,10 +52,10 @@ stdenv.mkDerivation rec { find -type f | xargs sed -i -e 's@^\(\s\)*chown@\1:@' -e 's@^\(\s\)*chgrp@\1:@' ''; - meta = with stdenv.lib; { + meta = with lib; { description="A command scheduler with extended capabilities over cron and anacron"; homepage = "http://fcron.free.fr"; license = licenses.gpl2; - platforms = stdenv.lib.platforms.all; + platforms = lib.platforms.all; }; } diff --git a/pkgs/tools/system/fdisk/default.nix b/pkgs/tools/system/fdisk/default.nix index 423b00bd543..4ad654783df 100644 --- a/pkgs/tools/system/fdisk/default.nix +++ b/pkgs/tools/system/fdisk/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, stdenv, parted, libuuid, gettext, guile }: +{ fetchurl, lib, stdenv, parted, libuuid, gettext, guile }: stdenv.mkDerivation rec { name = "gnufdisk-2.0.0a"; # .0a1 seems broken, see https://lists.gnu.org/archive/html/bug-fdisk/2012-09/msg00000.html @@ -20,10 +20,10 @@ stdenv.mkDerivation rec { cfdisk. It uses GNU Parted. ''; - license = stdenv.lib.licenses.gpl3Plus; + license = lib.licenses.gpl3Plus; homepage = "https://www.gnu.org/software/fdisk/"; - platforms = stdenv.lib.platforms.linux; + platforms = lib.platforms.linux; }; } diff --git a/pkgs/tools/system/fio/default.nix b/pkgs/tools/system/fio/default.nix index 80789681fc4..b108c9dd3d1 100644 --- a/pkgs/tools/system/fio/default.nix +++ b/pkgs/tools/system/fio/default.nix @@ -1,23 +1,25 @@ -{ stdenv, fetchFromGitHub, makeWrapper -, libaio, python, zlib +{ lib, stdenv, fetchFromGitHub, makeWrapper +, libaio, python3, zlib , withGnuplot ? false, gnuplot ? null }: stdenv.mkDerivation rec { pname = "fio"; - version = "3.21"; + version = "3.27"; src = fetchFromGitHub { owner = "axboe"; repo = "fio"; rev = "fio-${version}"; - sha256 = "0v8bq79n2nfnrs8pw2f3a93f8k691dnfzd5qxb5srwak4y2za7hn"; + sha256 = "sha256-/VzqmDbCTOOwFBMDj9nYuAW7ZJNM8B2LQ3QxReWG+iw="; }; - buildInputs = [ python zlib ] - ++ stdenv.lib.optional (!stdenv.isDarwin) libaio; + buildInputs = [ python3 zlib ] + ++ lib.optional (!stdenv.isDarwin) libaio; nativeBuildInputs = [ makeWrapper ]; + strictDeps = true; + enableParallelBuilding = true; postPatch = '' @@ -27,12 +29,12 @@ stdenv.mkDerivation rec { substituteInPlace tools/plot/fio2gnuplot --replace /usr/share/fio $out/share/fio ''; - postInstall = stdenv.lib.optionalString withGnuplot '' + postInstall = lib.optionalString withGnuplot '' wrapProgram $out/bin/fio2gnuplot \ - --prefix PATH : ${stdenv.lib.makeBinPath [ gnuplot ]} + --prefix PATH : ${lib.makeBinPath [ gnuplot ]} ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Flexible IO Tester - an IO benchmark tool"; homepage = "https://git.kernel.dk/cgit/fio/"; license = licenses.gpl2; diff --git a/pkgs/tools/system/foreman/gemset.nix b/pkgs/tools/system/foreman/gemset.nix index b35bd15c974..f747a2b0634 100644 --- a/pkgs/tools/system/foreman/gemset.nix +++ b/pkgs/tools/system/foreman/gemset.nix @@ -15,4 +15,4 @@ sha256 = "1caz8mi7gq1hs4l1flcyyw1iw1bdvdbhppsvy12akr01k3s17xaq"; }; }; -} \ No newline at end of file +} diff --git a/pkgs/tools/system/foremost/default.nix b/pkgs/tools/system/foremost/default.nix index 96c54513ef1..24f207e95f1 100644 --- a/pkgs/tools/system/foremost/default.nix +++ b/pkgs/tools/system/foremost/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl }: +{ lib, stdenv, fetchurl }: stdenv.mkDerivation rec { pname = "foremost"; @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { mkdir -p $out/{bin,share/man/man8} ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Recover files based on their contents"; longDescription = '' Foremost is a console program to recover files based on their headers, diff --git a/pkgs/tools/system/freeipmi/default.nix b/pkgs/tools/system/freeipmi/default.nix index 35fb630d238..77828ae823d 100644 --- a/pkgs/tools/system/freeipmi/default.nix +++ b/pkgs/tools/system/freeipmi/default.nix @@ -1,12 +1,12 @@ -{ fetchurl, stdenv, libgcrypt, readline, libgpgerror }: +{ fetchurl, lib, stdenv, libgcrypt, readline, libgpgerror }: stdenv.mkDerivation rec { - version = "1.6.5"; + version = "1.6.8"; pname = "freeipmi"; src = fetchurl { url = "mirror://gnu/freeipmi/${pname}-${version}.tar.gz"; - sha256 = "1ncf1s84752xaq07h36wrxa5ww1167s2bizkww0igxv8djyddwk1"; + sha256 = "0w8af1i57szmxl9vfifwwyal7xh8aixz2l9487wvy6yckqk6m92a"; }; buildInputs = [ libgcrypt readline libgpgerror ]; @@ -33,12 +33,11 @@ stdenv.mkDerivation rec { homepage = "https://www.gnu.org/software/freeipmi/"; downloadPage = "https://www.gnu.org/software/freeipmi/download.html"; - license = stdenv.lib.licenses.gpl3Plus; + license = lib.licenses.gpl3Plus; - maintainers = with stdenv.lib.maintainers; [ raskin ]; - platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux; # arbitrary choice + maintainers = with lib.maintainers; [ raskin ]; + platforms = lib.platforms.gnu ++ lib.platforms.linux; # arbitrary choice updateWalker = true; - inherit version; }; } diff --git a/pkgs/tools/system/gdmap/default.nix b/pkgs/tools/system/gdmap/default.nix index 6fdfd6e7190..d9c639ab1c4 100644 --- a/pkgs/tools/system/gdmap/default.nix +++ b/pkgs/tools/system/gdmap/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, gtk2, pkgconfig, libxml2, intltool, gettext }: +{ lib, stdenv, fetchurl, gtk2, pkg-config, libxml2, intltool, gettext }: stdenv.mkDerivation rec { name = "gdmap-0.8.1"; @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "0nr8l88cg19zj585hczj8v73yh21k7j13xivhlzl8jdk0j0cj052"; }; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkg-config ]; buildInputs = [ gtk2 libxml2 intltool gettext ]; patches = [ ./get_sensitive.patch ./set_flags.patch ]; @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { NIX_LDFLAGS = "-lm"; - meta = with stdenv.lib; { + meta = with lib; { homepage = "http://gdmap.sourceforge.net"; description = "Recursive rectangle map of disk usage"; license = licenses.gpl2; diff --git a/pkgs/tools/system/gdu/default.nix b/pkgs/tools/system/gdu/default.nix new file mode 100644 index 00000000000..c50b2a4c84e --- /dev/null +++ b/pkgs/tools/system/gdu/default.nix @@ -0,0 +1,52 @@ +{ lib +, stdenv +, buildGoModule +, fetchFromGitHub +, installShellFiles +}: + +buildGoModule rec { + pname = "gdu"; + version = "5.3.0"; + + src = fetchFromGitHub { + owner = "dundee"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-hf5jTEAN5oOPg2PaAlYjIDMYcwXkaFAqPtWTwZV98N0="; + }; + + vendorSha256 = "sha256-9W1K01PJ+tRLSJ0L7NGHXT5w5oHmlBkT8kwnOLOzSCc="; + + nativeBuildInputs = [ installShellFiles ]; + + buildFlagsArray = [ + "-ldflags=" + "-s" + "-w" + "-X github.com/dundee/gdu/v${lib.versions.major version}/build.Version=${version}" + ]; + + postPatch = '' + substituteInPlace cmd/gdu/app/app_test.go --replace "development" "${version}" + ''; + + postInstall = '' + installManPage gdu.1 + ''; + + doCheck = !stdenv.isDarwin; + + meta = with lib; { + description = "Disk usage analyzer with console interface"; + longDescription = '' + Gdu is intended primarily for SSD disks where it can fully + utilize parallel processing. However HDDs work as well, but + the performance gain is not so huge. + ''; + homepage = "https://github.com/dundee/gdu"; + license = with licenses; [ mit ]; + maintainers = [ maintainers.fab ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/tools/system/go-audit/default.nix b/pkgs/tools/system/go-audit/default.nix new file mode 100644 index 00000000000..9670a4d0684 --- /dev/null +++ b/pkgs/tools/system/go-audit/default.nix @@ -0,0 +1,29 @@ +{ buildGoModule +, fetchFromGitHub +, lib +}: + +buildGoModule rec { + pname = "go-audit"; + version = "1.0.0"; + + src = fetchFromGitHub { + owner = "slackhq"; + repo = pname; + rev = "v${version}"; + sha256 = "02iwjzaz2ks0zmwijaijwzc3gn9mhn7xpx369ylgaz68arlapfjg"; + }; + + vendorSha256 = "11kb7xm82s0d8d06b2jknwn3dfh4i0a1dv0740y47vk62sf6f05i"; + + # Tests need network access + doCheck = false; + + meta = with lib; { + description = "An alternative to the auditd daemon"; + homepage = "https://github.com/slackhq/go-audit"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/tools/system/gotop/default.nix b/pkgs/tools/system/gotop/default.nix index f5d7ff4759e..dffbaaa8183 100644 --- a/pkgs/tools/system/gotop/default.nix +++ b/pkgs/tools/system/gotop/default.nix @@ -1,28 +1,32 @@ -{ stdenv, buildGoModule, fetchFromGitHub }: +{ lib, stdenv, buildGoModule, fetchFromGitHub }: buildGoModule rec { pname = "gotop"; - version = "4.0.1"; + version = "4.1.2"; src = fetchFromGitHub { owner = "xxxserxxx"; repo = pname; rev = "v${version}"; - sha256 = "10qfzmq1wdgpvv319khzicalix1x4fqava0wry3bzz84k5c9dabs"; + sha256 = "15bsxaxqxp17wsr0p9fkpvgfyqnhhwm3j8jxkvcs4cdw73qaxdsy"; }; runVend = true; - vendorSha256 = "09vdhdgj74ifdhl6rmxddkvk7ls26jn8gswzcxf9389zkjzi7822"; + vendorSha256 = "06hl1npwmy9dvpf4kljvw8lwwiigm52wf106lmf9k6k2gi5ikprz"; + + ldflags = [ "-s" "-w" "-X main.Version=v${version}" ]; preCheck = '' export HOME=$(mktemp -d) ''; - meta = with stdenv.lib; { + doCheck = !stdenv.isDarwin; + + meta = with lib; { description = "A terminal based graphical activity monitor inspired by gtop and vtop"; homepage = "https://github.com/xxxserxxx/gotop"; - license = licenses.agpl3; + changelog = "https://github.com/xxxserxxx/gotop/raw/v${version}/CHANGELOG.md"; + license = licenses.mit; maintainers = [ maintainers.magnetophon ]; - platforms = platforms.unix; }; } diff --git a/pkgs/tools/system/gptfdisk/default.nix b/pkgs/tools/system/gptfdisk/default.nix index 613f63c3f04..0e7aff32bf0 100644 --- a/pkgs/tools/system/gptfdisk/default.nix +++ b/pkgs/tools/system/gptfdisk/default.nix @@ -1,19 +1,19 @@ -{ fetchurl, stdenv, libuuid, popt, icu, ncurses }: +{ fetchurl, lib, stdenv, libuuid, popt, icu, ncurses, nixosTests }: stdenv.mkDerivation rec { pname = "gptfdisk"; - version = "1.0.5"; + version = "1.0.8"; src = fetchurl { # https://www.rodsbooks.com/gdisk/${name}.tar.gz also works, but the home # page clearly implies a preference for using SourceForge's bandwidth: url = "mirror://sourceforge/gptfdisk/${pname}-${version}.tar.gz"; - sha256 = "0bybgp30pqxb6x5krxazkq4drca0gz4inxj89fpyr204rn3kjz8f"; + sha256 = "sha256-ldGYVvAE2rxLjDQrJhLo0KnuvdUgBClxiDafFS6dxt8="; }; postPatch = '' patchShebangs gdisk_test.sh - '' + stdenv.lib.optionalString stdenv.isDarwin '' + '' + lib.optionalString stdenv.isDarwin '' substituteInPlace Makefile.mac --replace \ "-mmacosx-version-min=10.4" "-mmacosx-version-min=10.6" substituteInPlace Makefile.mac --replace \ @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { "/opt/local/lib/libncurses.a" "${ncurses.out}/lib/libncurses.dylib" ''; - buildPhase = stdenv.lib.optionalString stdenv.isDarwin "make -f Makefile.mac"; + buildPhase = lib.optionalString stdenv.isDarwin "make -f Makefile.mac"; buildInputs = [ libuuid popt icu ncurses ]; installPhase = '' @@ -37,10 +37,15 @@ stdenv.mkDerivation rec { done ''; - meta = with stdenv.lib; { + passthru.tests = lib.optionalAttrs stdenv.hostPlatform.isx86 { + installer-simpleLabels = nixosTests.installer.simpleLabels; + }; + + meta = with lib; { description = "Set of text-mode partitioning tools for Globally Unique Identifier (GUID) Partition Table (GPT) disks"; license = licenses.gpl2; homepage = "https://www.rodsbooks.com/gdisk/"; platforms = platforms.all; + maintainers = [ maintainers.ehmry ]; }; } diff --git a/pkgs/tools/system/gptman/default.nix b/pkgs/tools/system/gptman/default.nix new file mode 100644 index 00000000000..648b68bcbc4 --- /dev/null +++ b/pkgs/tools/system/gptman/default.nix @@ -0,0 +1,24 @@ +{ lib, stdenv, fetchFromGitHub, rustPlatform, libiconv }: + +rustPlatform.buildRustPackage rec { + pname = "gptman"; + version = "0.8.0"; + + src = fetchFromGitHub { + owner = "cecton"; + repo = pname; + rev = "v${version}"; + sha256 = "11zyjrw4f8gi5s4sd2kl3sdiz0avq7clr8zqnwl04y61b3fpg7y1"; + }; + + cargoSha256 = "1cp8cyrd7ab8r2j28b69c2p3ysix5b9hpsqk07cmzgqwwml0qj12"; + + buildInputs = lib.optional stdenv.isDarwin libiconv; + + meta = with lib; { + description = "A CLI tool for Linux to copy a partition from one disk to another and more."; + homepage = "https://github.com/cecton/gptman"; + license = with licenses; [ asl20 /* or */ mit ]; + maintainers = with maintainers; [ akshgpt7 ]; + }; +} diff --git a/pkgs/tools/system/gt5/default.nix b/pkgs/tools/system/gt5/default.nix index 61d25f414bb..374bcf0e314 100644 --- a/pkgs/tools/system/gt5/default.nix +++ b/pkgs/tools/system/gt5/default.nix @@ -1,8 +1,8 @@ -{stdenv, fetchurl}: +{lib, stdenv, fetchurl}: stdenv.mkDerivation rec { name = "gt5-1.4.0"; - + src = fetchurl { url = "mirror://sourceforge/gt5/${name}.tar.gz"; sha256 = "0gm0gzyp4d9rxqddbaskbz5zvmlhyr4nyb5x9g7x4abyyxqjlnkq"; @@ -19,8 +19,8 @@ stdenv.mkDerivation rec { meta = { description = "A diff-capable 'du' browser"; homepage = "http://gt5.sourceforge.net/"; - license = stdenv.lib.licenses.gpl2Plus; - maintainers = with stdenv.lib.maintainers; [viric]; - platforms = with stdenv.lib.platforms; linux; + license = lib.licenses.gpl2Plus; + maintainers = with lib.maintainers; [viric]; + platforms = with lib.platforms; all; }; } diff --git a/pkgs/tools/system/hardinfo/default.nix b/pkgs/tools/system/hardinfo/default.nix index fd8fb08cf29..15c8cbd12f0 100644 --- a/pkgs/tools/system/hardinfo/default.nix +++ b/pkgs/tools/system/hardinfo/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, which, pkgconfig, gtk2, pcre, glib, libxml2 +{ lib, stdenv, fetchurl, which, pkg-config, gtk2, pcre, glib, libxml2 , libsoup ? null }: @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { # Not adding 'hostname' command, the build shouldn't depend on what the build # host is called. - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkg-config ]; buildInputs = [ which gtk2 pcre glib libxml2 libsoup ]; # Fixes '#error You must compile this program without "-O"' @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { rmdir "$out/usr" ''; - meta = with stdenv.lib; { + meta = with lib; { homepage = "http://hardinfo.org/"; description = "Display information about your hardware and operating system"; license = licenses.gpl2; diff --git a/pkgs/tools/system/hardlink/default.nix b/pkgs/tools/system/hardlink/default.nix index c0c6aa72d3b..a790c600a9d 100644 --- a/pkgs/tools/system/hardlink/default.nix +++ b/pkgs/tools/system/hardlink/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pcre2 }: +{ lib, stdenv, fetchurl, pcre2 }: stdenv.mkDerivation { @@ -23,7 +23,7 @@ stdenv.mkDerivation { cp -f hardlink.1 $out/share/man/man1/hardlink.1 ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Consolidate duplicate files via hardlinks"; homepage = "https://pagure.io/hardlink"; repositories.git = "https://src.fedoraproject.org/cgit/rpms/hardlink.git"; diff --git a/pkgs/tools/system/hiera-eyaml/gemset.nix b/pkgs/tools/system/hiera-eyaml/gemset.nix index d5aa722e5fc..cf7d8d6905d 100644 --- a/pkgs/tools/system/hiera-eyaml/gemset.nix +++ b/pkgs/tools/system/hiera-eyaml/gemset.nix @@ -28,4 +28,4 @@ }; version = "3.0.0"; }; -} \ No newline at end of file +} diff --git a/pkgs/tools/system/honcho/default.nix b/pkgs/tools/system/honcho/default.nix index eb96c3f4613..17fa9489333 100644 --- a/pkgs/tools/system/honcho/default.nix +++ b/pkgs/tools/system/honcho/default.nix @@ -1,15 +1,14 @@ -{ stdenv, fetchFromGitHub, pythonPackages }: +{ lib, fetchFromGitHub, python3Packages }: let - inherit (pythonPackages) python; + inherit (python3Packages) python; pname = "honcho"; in -pythonPackages.buildPythonApplication rec { +python3Packages.buildPythonApplication rec { name = "${pname}-${version}"; version = "1.0.1"; - namePrefix = ""; src = fetchFromGitHub { owner = "nickstenning"; @@ -18,7 +17,7 @@ pythonPackages.buildPythonApplication rec { sha256 = "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"; }; - checkInputs = with pythonPackages; [ jinja2 pytest mock coverage ]; + checkInputs = with python3Packages; [ jinja2 pytest mock coverage ]; buildPhase = '' ${python.interpreter} setup.py build @@ -40,7 +39,7 @@ pythonPackages.buildPythonApplication rec { runHook postCheck ''; - meta = with stdenv.lib; { + meta = with lib; { description = "A Python clone of Foreman, a tool for managing Procfile-based applications"; license = licenses.mit; homepage = "https://github.com/nickstenning/honcho"; diff --git a/pkgs/tools/system/hostctl/default.nix b/pkgs/tools/system/hostctl/default.nix new file mode 100644 index 00000000000..54bc72144ea --- /dev/null +++ b/pkgs/tools/system/hostctl/default.nix @@ -0,0 +1,36 @@ +{ buildGoModule, fetchFromGitHub, lib, installShellFiles }: + +buildGoModule rec { + pname = "hostctl"; + version = "1.1.0"; + + src = fetchFromGitHub { + owner = "guumaster"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-X07JvXN1mwOQE2XBfaYbqQnQ92fBSg/Erj0yUygAqmM="; + }; + + vendorSha256 = "sha256-rGDWrivIdl5FTu/kNR8nAfE2+1hE4cm3uDg7oBobE9M="; + + buildFlagsArray = [ "-ldflags=-s -w -X github.com/guumaster/hostctl/cmd/hostctl/actions.version=${version}" ]; + + nativeBuildInputs = [ installShellFiles ]; + postInstall = '' + installShellCompletion --cmd hostctl \ + --bash <($out/bin/hostctl completion bash) \ + --zsh <($out/bin/hostctl completion zsh) + ''; + + meta = with lib; { + description = "Your dev tool to manage /etc/hosts like a pro!"; + longDescription = '' + This tool gives you more control over the use of your hosts file. + You can have multiple profiles and switch them on/off as you need. + ''; + homepage = "https://guumaster.github.io/hostctl/"; + license = licenses.mit; + maintainers = with maintainers; [ blaggacao ]; + }; +} + diff --git a/pkgs/tools/system/htop/default.nix b/pkgs/tools/system/htop/default.nix index c9adf5377e2..25a397bc987 100644 --- a/pkgs/tools/system/htop/default.nix +++ b/pkgs/tools/system/htop/default.nix @@ -1,29 +1,29 @@ -{ lib, fetchurl, stdenv, ncurses, -IOKit, python3 }: +{ lib, fetchFromGitHub, stdenv, autoreconfHook +, ncurses, IOKit +}: stdenv.mkDerivation rec { pname = "htop"; - version = "2.2.0"; + version = "3.0.5"; - src = fetchurl { - url = "https://hisham.hm/htop/releases/${version}/${pname}-${version}.tar.gz"; - sha256 = "0mrwpb3cpn3ai7ar33m31yklj64c3pp576vh1naqff6f21pq5mnr"; + src = fetchFromGitHub { + owner = "htop-dev"; + repo = pname; + rev = version; + sha256 = "sha256-9zecDd3oZ24RyOLnKdJmR29Chx6S24Kvuf/F7RYzl4I="; }; - nativeBuildInputs = [ python3 ]; - buildInputs = - [ ncurses ] ++ - lib.optionals stdenv.isDarwin [ IOKit ]; + nativeBuildInputs = [ autoreconfHook ]; - prePatch = '' - patchShebangs scripts/MakeHeader.py - ''; + buildInputs = [ ncurses + ] ++ lib.optionals stdenv.isDarwin [ IOKit ]; - meta = with stdenv.lib; { + meta = with lib; { description = "An interactive process viewer for Linux"; - homepage = "https://hisham.hm/htop/"; - license = licenses.gpl2Plus; - platforms = with platforms; linux ++ freebsd ++ openbsd ++ darwin; + homepage = "https://htop.dev"; + license = licenses.gpl2Only; + platforms = platforms.all; maintainers = with maintainers; [ rob relrod ]; + changelog = "https://github.com/htop-dev/${pname}/blob/${version}/ChangeLog"; }; } diff --git a/pkgs/tools/system/hwinfo/default.nix b/pkgs/tools/system/hwinfo/default.nix index 6b6aa40a0f7..9ee77bfc6d3 100644 --- a/pkgs/tools/system/hwinfo/default.nix +++ b/pkgs/tools/system/hwinfo/default.nix @@ -1,17 +1,17 @@ -{ stdenv, fetchFromGitHub, libx86emu, flex, perl, libuuid }: +{ lib, stdenv, fetchFromGitHub, libx86emu, flex, perl, libuuid }: stdenv.mkDerivation rec { pname = "hwinfo"; - version = "21.70"; + version = "21.75"; src = fetchFromGitHub { owner = "opensuse"; repo = "hwinfo"; rev = version; - sha256 = "13vvsxj06wy86m7fy6bwy63ga49a2k4chdnk8jj3klj2cnh7ql8z"; + sha256 = "sha256-w2Lb+4FvPXw2uFqwsmzVdKIXY8IXV/TAb8FHFPl/K40="; }; - patchPhase = '' + postPatch = '' # VERSION and changelog are usually generated using Git # unless HWINFO_VERSION is defined (see Makefile) export HWINFO_VERSION="${version}" @@ -30,9 +30,9 @@ stdenv.mkDerivation rec { installFlags = [ "DESTDIR=$(out)" ]; - meta = with stdenv.lib; { + meta = with lib; { description = "Hardware detection tool from openSUSE"; - license = licenses.gpl2; + license = licenses.gpl2Only; homepage = "https://github.com/openSUSE/hwinfo"; maintainers = with maintainers; [ bobvanderlinden ]; platforms = platforms.linux; diff --git a/pkgs/tools/system/idle3tools/default.nix b/pkgs/tools/system/idle3tools/default.nix index fa5234d8cbc..5e9796396a9 100644 --- a/pkgs/tools/system/idle3tools/default.nix +++ b/pkgs/tools/system/idle3tools/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl}: +{lib, stdenv, fetchurl}: stdenv.mkDerivation { name = "idle3-tools-0.9.1"; @@ -15,8 +15,8 @@ stdenv.mkDerivation { meta = { homepage = "http://idle3-tools.sourceforge.net/"; description = "Tool to get/set the infamous idle3 timer in WD HDDs"; - license = stdenv.lib.licenses.gpl3; - maintainers = with stdenv.lib.maintainers; [viric]; - platforms = with stdenv.lib.platforms; linux; + license = lib.licenses.gpl3; + maintainers = with lib.maintainers; [viric]; + platforms = with lib.platforms; linux; }; } diff --git a/pkgs/tools/system/illum/default.nix b/pkgs/tools/system/illum/default.nix index 41fce9b9b91..42aae9d81a2 100644 --- a/pkgs/tools/system/illum/default.nix +++ b/pkgs/tools/system/illum/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit, pkgconfig, ninja, libevdev, libev }: +{ lib, stdenv, fetchgit, pkg-config, ninja, libevdev, libev }: stdenv.mkDerivation { version = "0.4"; @@ -11,7 +11,7 @@ stdenv.mkDerivation { sha256 = "05v3hz7n6b1mlhc6zqijblh1vpl0ja1y8y0lafw7mjdz03wxhfdb"; }; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkg-config ]; buildInputs = [ ninja libevdev libev ]; configurePhase = '' @@ -26,8 +26,8 @@ stdenv.mkDerivation { meta = { homepage = "https://github.com/jmesmon/illum"; description = "Daemon that wires button presses to screen backlight level"; - platforms = stdenv.lib.platforms.linux; - maintainers = [ stdenv.lib.maintainers.dancek ]; - license = stdenv.lib.licenses.agpl3; + platforms = lib.platforms.linux; + maintainers = [ lib.maintainers.dancek ]; + license = lib.licenses.agpl3; }; } diff --git a/pkgs/tools/system/incron/default.nix b/pkgs/tools/system/incron/default.nix index 4b5709e6227..2df4acba9b5 100644 --- a/pkgs/tools/system/incron/default.nix +++ b/pkgs/tools/system/incron/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, bash }: +{ lib, stdenv, fetchFromGitHub, bash }: stdenv.mkDerivation rec { name = "incron-0.5.12"; @@ -26,8 +26,8 @@ stdenv.mkDerivation rec { cp incrond incrontab $out/bin/ ''; - meta = with stdenv.lib; { - description = "A cron-like daemon which handles filesystem events."; + meta = with lib; { + description = "A cron-like daemon which handles filesystem events"; homepage = "https://github.com/ar-/incron"; license = licenses.gpl2; maintainers = [ maintainers.aanderse ]; diff --git a/pkgs/tools/system/inxi/default.nix b/pkgs/tools/system/inxi/default.nix index 4a59facb27b..b03a7c14a7d 100644 --- a/pkgs/tools/system/inxi/default.nix +++ b/pkgs/tools/system/inxi/default.nix @@ -1,18 +1,18 @@ { lib, stdenv, fetchFromGitHub, perl, perlPackages, makeWrapper , ps, dnsutils # dig is recommended for multiple categories , withRecommends ? false # Install (almost) all recommended tools (see --recommends) -, withRecommendedSystemPrograms ? withRecommends, utillinuxMinimal, dmidecode -, file, hddtemp, iproute, ipmitool, usbutils, kmod, lm_sensors, smartmontools -, binutils, tree, upower +, withRecommendedSystemPrograms ? withRecommends, util-linuxMinimal, dmidecode +, file, hddtemp, iproute2, ipmitool, usbutils, kmod, lm_sensors, smartmontools +, binutils, tree, upower, pciutils , withRecommendedDisplayInformationPrograms ? withRecommends, glxinfo, xorg }: let prefixPath = programs: - "--prefix PATH ':' '${stdenv.lib.makeBinPath programs}'"; + "--prefix PATH ':' '${lib.makeBinPath programs}'"; recommendedSystemPrograms = lib.optionals withRecommendedSystemPrograms [ - utillinuxMinimal dmidecode file hddtemp iproute ipmitool usbutils kmod - lm_sensors smartmontools binutils tree upower + util-linuxMinimal dmidecode file hddtemp iproute2 ipmitool usbutils kmod + lm_sensors smartmontools binutils tree upower pciutils ]; recommendedDisplayInformationPrograms = lib.optionals withRecommendedDisplayInformationPrograms @@ -22,16 +22,17 @@ let ++ recommendedDisplayInformationPrograms; in stdenv.mkDerivation rec { pname = "inxi"; - version = "3.1.06-1"; + version = "3.3.04-1"; src = fetchFromGitHub { owner = "smxi"; repo = "inxi"; rev = version; - sha256 = "11z90x7rwzm7krkcnmcs9f41i1d284vrj0aqk2xnvl3p79vx25f7"; + sha256 = "sha256-/EutIHQGLiRcRD/r8LJYG7oJBb7EAhR5cn6QiC7zMOc="; }; - buildInputs = [ perl makeWrapper ]; + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ perl ]; installPhase = '' mkdir -p $out/bin @@ -43,7 +44,7 @@ in stdenv.mkDerivation rec { cp inxi.1 $out/share/man/man1/ ''; - meta = with stdenv.lib; { + meta = with lib; { description = "A full featured CLI system information tool"; longDescription = '' inxi is a command line system information script built for console and @@ -56,6 +57,6 @@ in stdenv.mkDerivation rec { changelog = "https://github.com/smxi/inxi/blob/${version}/inxi.changelog"; license = licenses.gpl3Plus; platforms = platforms.unix; - maintainers = with maintainers; [ primeos ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/tools/system/ioping/default.nix b/pkgs/tools/system/ioping/default.nix index 7b65739c1a8..9af290503f4 100644 --- a/pkgs/tools/system/ioping/default.nix +++ b/pkgs/tools/system/ioping/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, fetchpatch }: +{ lib, stdenv, fetchFromGitHub, fetchpatch }: stdenv.mkDerivation rec { pname = "ioping"; @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { makeFlags = [ "PREFIX=$(out)" ]; - meta = with stdenv.lib; { + meta = with lib; { description = "Disk I/O latency measuring tool"; maintainers = with maintainers; [ raskin ]; platforms = platforms.unix; diff --git a/pkgs/tools/system/iops/default.nix b/pkgs/tools/system/iops/default.nix index cf34cb115f1..b2be488673e 100644 --- a/pkgs/tools/system/iops/default.nix +++ b/pkgs/tools/system/iops/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl }: +{ lib, stdenv, fetchurl }: stdenv.mkDerivation rec { pname = "iops"; @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { cp iops $out/bin ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Measure I/O operations per second of a storage device"; longDescription = '' Iops lets you measure how many I/O operations per second a storage device can perform. diff --git a/pkgs/tools/system/ior/default.nix b/pkgs/tools/system/ior/default.nix index eff85589a1e..c2616797da3 100644 --- a/pkgs/tools/system/ior/default.nix +++ b/pkgs/tools/system/ior/default.nix @@ -1,22 +1,22 @@ -{ stdenv, fetchFromGitHub, openmpi, perl, autoreconfHook }: +{ lib, stdenv, fetchFromGitHub, mpi, perl, autoreconfHook }: stdenv.mkDerivation rec { pname = "ior"; - version = "3.2.1"; + version = "3.3.0"; src = fetchFromGitHub { owner = "hpc"; repo = pname; rev = version; - sha256 = "036cg75c5vq6kijfv8f918vpm9sf1h7lyg6xr9fba7n0dwbbmycv"; + sha256 = "sha256-pSjptDfiPlaToXe1yHyk9MQMC9PqcVSjqAmWLD11iOM="; }; nativeBuildInputs = [ autoreconfHook ]; - buildInputs = [ openmpi perl ]; + buildInputs = [ mpi perl ]; enableParallelBuilding = true; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://ior.readthedocs.io/en/latest/"; description = "Parallel file system I/O performance test"; license = licenses.gpl2; diff --git a/pkgs/tools/system/ipmitool/default.nix b/pkgs/tools/system/ipmitool/default.nix index b5da2db67fe..e7d6130ffa6 100644 --- a/pkgs/tools/system/ipmitool/default.nix +++ b/pkgs/tools/system/ipmitool/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, openssl, fetchpatch, static ? false }: +{ stdenv, lib, fetchurl, openssl, fetchpatch, static ? stdenv.hostPlatform.isStatic }: let pkgname = "ipmitool"; @@ -22,6 +22,11 @@ stdenv.mkDerivation { url = "https://github.com/ipmitool/ipmitool/commit/5db314f694f75c575cd7c9ffe9ee57aaf3a88866.patch"; sha256 = "01niwrgajhrdhl441gzmw6v1r1yc3i8kn98db4b6smfn5fwdp1pa"; }) + (fetchpatch { + name = "CVE-2020-5208.patch"; + url = "https://github.com/ipmitool/ipmitool/commit/e824c23316ae50beb7f7488f2055ac65e8b341f2.patch"; + sha256 = "sha256-X7MnoX2fzByRpRY4p33xetT+V2aehlQ/qU+aeaqtTUY="; + }) ]; buildInputs = [ openssl ]; @@ -29,19 +34,19 @@ stdenv.mkDerivation { configureFlags = [ "--infodir=${placeholder "out"}/share/info" "--mandir=${placeholder "out"}/share/man" - ] ++ stdenv.lib.optionals static [ + ] ++ lib.optionals static [ "LDFLAGS=-static" "--enable-static" "--disable-shared" - ] ++ stdenv.lib.optionals (!static) [ + ] ++ lib.optionals (!static) [ "--enable-shared" ]; - makeFlags = stdenv.lib.optional static "AM_LDFLAGS=-all-static"; + makeFlags = lib.optional static "AM_LDFLAGS=-all-static"; dontDisableStatic = static; meta = with lib; { - description = ''Command-line interface to IPMI-enabled devices''; + description = "Command-line interface to IPMI-enabled devices"; license = licenses.bsd3; homepage = "https://sourceforge.net/projects/ipmitool/"; platforms = platforms.unix; diff --git a/pkgs/tools/system/ipmiutil/default.nix b/pkgs/tools/system/ipmiutil/default.nix index 17c28b3cd42..a11890dabd6 100644 --- a/pkgs/tools/system/ipmiutil/default.nix +++ b/pkgs/tools/system/ipmiutil/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, openssl }: +{ lib, stdenv, fetchurl, openssl }: stdenv.mkDerivation rec { baseName = "ipmiutil"; @@ -20,13 +20,12 @@ stdenv.mkDerivation rec { NIX_CFLAGS_COMPILE = "-fno-stack-protector"; - meta = with stdenv.lib; { + meta = with lib; { description = "An easy-to-use IPMI server management utility"; homepage = "http://ipmiutil.sourceforge.net/"; maintainers = with maintainers; [ raskin ]; platforms = platforms.linux; license = licenses.bsd3; downloadPage = "https://sourceforge.net/projects/ipmiutil/files/ipmiutil/"; - inherit version; }; } diff --git a/pkgs/tools/system/java-service-wrapper/default.nix b/pkgs/tools/system/java-service-wrapper/default.nix index 758942c0549..4d1417b4b83 100644 --- a/pkgs/tools/system/java-service-wrapper/default.nix +++ b/pkgs/tools/system/java-service-wrapper/default.nix @@ -1,15 +1,15 @@ -{ stdenv, fetchurl +{ lib, stdenv, fetchurl , jdk , ant, cunit, ncurses }: stdenv.mkDerivation rec { pname = "java-service-wrapper"; - version = "3.5.43"; + version = "3.5.45"; src = fetchurl { url = "https://wrapper.tanukisoftware.com/download/${version}/wrapper_${version}_src.tar.gz"; - sha256 = "19cx3854rk7b2056z8pvxnf4simsg5js7czsy2bys7jl6vh2x02b"; + sha256 = "sha256-rnlloa0DicWT1RlP2szDvBINvT5/RZ17GOarUzvX1AI="; }; buildInputs = [ jdk ]; @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { cp lib/libwrapper.so $out/lib/libwrapper.so ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Enables a Java Application to be run as a Windows Service or Unix Daemon"; homepage = "https://wrapper.tanukisoftware.com/"; license = licenses.gpl2; diff --git a/pkgs/tools/system/journalwatch/default.nix b/pkgs/tools/system/journalwatch/default.nix index b41196b85c9..3d85d13149c 100644 --- a/pkgs/tools/system/journalwatch/default.nix +++ b/pkgs/tools/system/journalwatch/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder, systemd, pytest }: +{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder, systemd, pytest }: buildPythonPackage rec { pname = "journalwatch"; @@ -30,7 +30,7 @@ buildPythonPackage rec { ]; - meta = with stdenv.lib; { + meta = with lib; { description = "journalwatch is a tool to find error messages in the systemd journal."; homepage = "https://github.com/The-Compiler/journalwatch"; license = licenses.gpl3Plus; diff --git a/pkgs/tools/system/jsvc/default.nix b/pkgs/tools/system/jsvc/default.nix new file mode 100644 index 00000000000..442f8d90419 --- /dev/null +++ b/pkgs/tools/system/jsvc/default.nix @@ -0,0 +1,40 @@ +{ lib, stdenv, fetchurl, commonsDaemon, jdk, makeWrapper, jre }: + +stdenv.mkDerivation rec { + pname = "jsvc"; + version = "1.2.4"; + + src = fetchurl { + url = "https://downloads.apache.org//commons/daemon/source/commons-daemon-${version}-src.tar.gz"; + sha256 = "1nrr6ggy6h20r9zyv14vx6vc9p1w6l8fl9fn6i8dx2hrq6kk2bjw"; + }; + + buildInputs = [ commonsDaemon ]; + nativeBuildInputs = [ jdk makeWrapper ]; + + preConfigure = '' + cd ./src/native/unix/ + sh ./support/buildconf.sh + ''; + + preBuild = '' + export JAVA_HOME=${jre} + ''; + + installPhase = '' + runHook preInstall + mkdir -p $out/bin + cp jsvc $out/bin/jsvc + chmod +x $out/bin/jsvc + wrapProgram $out/bin/jsvc --set JAVA_HOME "${jre}" + runHook postInstall + ''; + + meta = { + homepage = "https://commons.apache.org/proper/commons-daemon"; + description = "JSVC is part of the Apache Commons Daemon software, a set of utilities and Java support classes for running Java applications as server processes."; + maintainers = with lib.maintainers; [ rsynnest ]; + license = lib.licenses.asl20; + platforms = with lib.platforms; unix; + }; +} diff --git a/pkgs/tools/system/jump/default.nix b/pkgs/tools/system/jump/default.nix index 9966ace14f4..fa0c2f73922 100644 --- a/pkgs/tools/system/jump/default.nix +++ b/pkgs/tools/system/jump/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "jump"; - version = "0.30.1"; + version = "0.40.0"; src = fetchFromGitHub { owner = "gsamokovarov"; repo = pname; rev = "v${version}"; - sha256 = "0mph3bqfjnw3yf0a6ml3ccmkr1shviwvvq4d04ky4gppfy6z51jy"; + sha256 = "sha256-8Lfta4qDXYVSHG3UI8iUA6vIjBe5OIX7n0LC4OW1qMU="; }; - vendorSha256 = "1500vim2lmkkls758pwhlx3piqbw6ap0nnhdwz9pcxih4s4as2nk"; + vendorSha256 = null; doCheck = false; @@ -28,7 +28,7 @@ buildGoModule rec { ''; meta = with lib; { - description = "Jump helps you navigate faster by learning your habits."; + description = "Navigate directories faster by learning your habits"; longDescription = '' Jump integrates with the shell and learns about your navigational habits by keeping track of the directories you visit. It diff --git a/pkgs/tools/system/kmon/default.nix b/pkgs/tools/system/kmon/default.nix index a2610327f61..85d9df5df48 100644 --- a/pkgs/tools/system/kmon/default.nix +++ b/pkgs/tools/system/kmon/default.nix @@ -1,17 +1,17 @@ -{ stdenv, fetchFromGitHub, rustPlatform, python3, libxcb }: +{ lib, fetchFromGitHub, rustPlatform, python3, libxcb }: rustPlatform.buildRustPackage rec { pname = "kmon"; - version = "1.4.0"; + version = "1.5.4"; src = fetchFromGitHub { owner = "orhun"; repo = pname; rev = "v${version}"; - sha256 = "1f9q4bc1kr1hgwf8byj13d6vsfs97wz7x10zwa82iv9b0wb1lr5w"; + sha256 = "sha256-zbTS4nGb2jDYGhNYxoPaVv9kAc51CQOi9qiHiSLjAjo="; }; - cargoSha256 = "1xy8rkba9idd0w4bnczmv4ll9awvar99vb7s0jd25fjbzqqlz820"; + cargoSha256 = "sha256-ujVlOShZOuaV3B1ydggVJXLNMQHoTZC0dJaw+/ajVFg="; nativeBuildInputs = [ python3 ]; @@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec { install -D man/kmon.8 -t $out/share/man/man8/ ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Linux Kernel Manager and Activity Monitor"; homepage = "https://github.com/orhun/kmon"; license = with licenses; [ gpl3 ]; diff --git a/pkgs/tools/system/ledmon/default.nix b/pkgs/tools/system/ledmon/default.nix index 6775a471126..0ca1aa441db 100644 --- a/pkgs/tools/system/ledmon/default.nix +++ b/pkgs/tools/system/ledmon/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, perl, udev, sg3_utils }: +{ lib, stdenv, fetchFromGitHub, perl, udev, sg3_utils }: stdenv.mkDerivation rec { pname = "ledmon"; @@ -25,11 +25,11 @@ stdenv.mkDerivation rec { "LEDMON_INSTDIR=${placeholder "out"}/sbin" ]; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://github.com/intel/ledmon"; description = "Enclosure LED Utilities"; platforms = platforms.linux; license = with licenses; [ gpl2 ]; - maintainers = with stdenv.lib.maintainers; [ sorki ]; + maintainers = with lib.maintainers; [ sorki ]; }; } diff --git a/pkgs/tools/system/loadwatch/default.nix b/pkgs/tools/system/loadwatch/default.nix index eb7f1e3bb59..80f808214bc 100644 --- a/pkgs/tools/system/loadwatch/default.nix +++ b/pkgs/tools/system/loadwatch/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit, ... }: +{ lib, stdenv, fetchgit, ... }: stdenv.mkDerivation { name = "loadwatch-1.1-1-g6d2544c"; @@ -11,10 +11,10 @@ stdenv.mkDerivation { mkdir -p $out/bin install loadwatch lw-ctl $out/bin ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Run a program using only idle cycles"; license = licenses.gpl2; maintainers = with maintainers; [ woffs ]; - platforms = platforms.linux; + platforms = platforms.all; }; } diff --git a/pkgs/tools/system/localtime/default.nix b/pkgs/tools/system/localtime/default.nix index 805a70c74e9..798e3b3e883 100644 --- a/pkgs/tools/system/localtime/default.nix +++ b/pkgs/tools/system/localtime/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, buildGoPackage, m4 }: +{ lib, fetchFromGitHub, buildGoPackage, m4 }: buildGoPackage rec { name = "localtime-2017-11-07"; @@ -28,7 +28,7 @@ buildGoPackage rec { make install $makeFlags ''; - meta = with stdenv.lib; { + meta = with lib; { description = "A daemon for keeping the system timezone up-to-date based on the current location"; homepage = "https://github.com/Stebalien/localtime"; platforms = platforms.linux; diff --git a/pkgs/tools/system/logcheck/default.nix b/pkgs/tools/system/logcheck/default.nix index 71edfde9a0b..dea241e11ac 100644 --- a/pkgs/tools/system/logcheck/default.nix +++ b/pkgs/tools/system/logcheck/default.nix @@ -1,13 +1,13 @@ -{ stdenv, fetchurl, lockfileProgs, perlPackages }: +{ lib, stdenv, fetchurl, lockfileProgs, perlPackages }: stdenv.mkDerivation rec { pname = "logcheck"; - version = "1.3.20"; + version = "1.3.23"; _name = "logcheck_${version}"; src = fetchurl { url = "mirror://debian/pool/main/l/logcheck/${_name}.tar.xz"; - sha256 = "1rmkvxhcwr9gb6z4dlgr6rrx5l70hshlxdggs6qx0w1ljcmx1dlz"; + sha256 = "sha256-ohiLpUn/9EEsggdLJxiE/2bSXz/bKkGRboF85naFWyk="; }; prePatch = '' @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { "SHAREDIR=share/logtail/detectrotate" ]; - meta = with stdenv.lib; { + meta = with lib; { description = "Mails anomalies in the system logfiles to the administrator"; longDescription = '' Mails anomalies in the system logfiles to the administrator. @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { Logcheck was part of the Abacus Project of security tools, but this version has been rewritten. ''; homepage = "https://salsa.debian.org/debian/logcheck"; - license = licenses.gpl2; + license = licenses.gpl2Plus; maintainers = [ maintainers.bluescreen303 ]; }; } diff --git a/pkgs/tools/system/logrotate/default.nix b/pkgs/tools/system/logrotate/default.nix index 4c891e3e5b3..3d5dac7faa8 100644 --- a/pkgs/tools/system/logrotate/default.nix +++ b/pkgs/tools/system/logrotate/default.nix @@ -1,40 +1,35 @@ -{ stdenv, fetchFromGitHub, gzip, popt, autoreconfHook +{ lib, stdenv, fetchFromGitHub, gzip, popt, autoreconfHook , mailutils ? null +, aclSupport ? true, acl }: stdenv.mkDerivation rec { pname = "logrotate"; - version = "3.17.0"; + version = "3.18.1"; src = fetchFromGitHub { owner = "logrotate"; repo = "logrotate"; rev = version; - sha256 = "133k4y24p918v4dva6dh70bdfv13jvwl2vlhq0mybrs3ripvnh4h"; + sha256 = "sha256-OJOV++rtN9ry+l0c0eanpu/Pwu8cOHfyEaDWp3FZjkw="; }; # Logrotate wants to access the 'mail' program; to be done. - patchPhase = '' - sed -i -e 's,[a-z/]\+gzip,${gzip}/bin/gzip,' \ - -e 's,[a-z/]\+gunzip,${gzip}/bin/gunzip,' configure.ac - - ${stdenv.lib.optionalString (mailutils != null) '' - sed -i -e 's,[a-z/]\+mail,${mailutils}/bin/mail,' configure.ac - ''} - ''; - - autoreconfPhase = '' - ./autogen.sh - ''; + configureFlags = [ + "--with-compress-command=${gzip}/bin/gzip" + "--with-uncompress-command=${gzip}/bin/gunzip" + ] ++ lib.optionals (mailutils != null) [ + "--with-default-mail-command=${mailutils}/bin/mail" + ]; nativeBuildInputs = [ autoreconfHook ]; - buildInputs = [ popt ]; + buildInputs = [ popt ] ++ lib.optionals aclSupport [ acl ]; - meta = { + meta = with lib; { homepage = "https://fedorahosted.org/releases/l/o/logrotate/"; description = "Rotates and compresses system logs"; - license = stdenv.lib.licenses.gpl2Plus; - maintainers = [ stdenv.lib.maintainers.viric ]; - platforms = stdenv.lib.platforms.all; + license = licenses.gpl2Plus; + maintainers = [ maintainers.viric ]; + platforms = platforms.all; }; } diff --git a/pkgs/tools/system/lr/default.nix b/pkgs/tools/system/lr/default.nix index 8d2febbeb8a..43d37569ba3 100644 --- a/pkgs/tools/system/lr/default.nix +++ b/pkgs/tools/system/lr/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub }: +{ lib, stdenv, fetchFromGitHub }: stdenv.mkDerivation rec { pname = "lr"; @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { makeFlags = [ "PREFIX=$(out)" ]; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://github.com/chneukirchen/lr"; description = "List files recursively"; license = licenses.mit; diff --git a/pkgs/tools/system/lshw/default.nix b/pkgs/tools/system/lshw/default.nix index 3d1a6ace08e..040f065acd7 100644 --- a/pkgs/tools/system/lshw/default.nix +++ b/pkgs/tools/system/lshw/default.nix @@ -1,5 +1,5 @@ { stdenv, lib, fetchurl, fetchpatch -, withGUI ? false, gtk2, pkgconfig, sqlite # compile GUI +, withGUI ? false, gtk2, pkg-config, sqlite # compile GUI }: let numVersion = "02.18"; # :( @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { }) ]; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkg-config ]; buildInputs = lib.optionals withGUI [ gtk2 sqlite ]; @@ -44,7 +44,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://ezix.org/project/wiki/HardwareLiSter"; description = "Provide detailed information on the hardware configuration of the machine"; license = licenses.gpl2; diff --git a/pkgs/tools/system/mcron/default.nix b/pkgs/tools/system/mcron/default.nix index ca515cbdfd8..b8175b51483 100644 --- a/pkgs/tools/system/mcron/default.nix +++ b/pkgs/tools/system/mcron/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, stdenv, guile, which, ed, libtool }: +{ fetchurl, lib, stdenv, guile, which, ed, libtool }: stdenv.mkDerivation rec { name = "mcron-1.0.6"; @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { homepage = "https://www.gnu.org/software/mcron/"; - license = stdenv.lib.licenses.gpl3Plus; - platforms = stdenv.lib.platforms.unix; + license = lib.licenses.gpl3Plus; + platforms = lib.platforms.unix; }; } diff --git a/pkgs/tools/system/memtester/default.nix b/pkgs/tools/system/memtester/default.nix index 7b065c6cfa8..276d4f446cf 100644 --- a/pkgs/tools/system/memtester/default.nix +++ b/pkgs/tools/system/memtester/default.nix @@ -1,8 +1,8 @@ -{ stdenv, fetchurl }: +{ lib, stdenv, fetchurl }: stdenv.mkDerivation rec { pname = "memtester"; - version = "4.3.0"; + version = "4.5.0"; preConfigure = '' echo "$CC" > conf-cc @@ -11,12 +11,12 @@ stdenv.mkDerivation rec { src = fetchurl { url = "http://pyropus.ca/software/memtester/old-versions/memtester-${version}.tar.gz"; - sha256 = "127xymmyzb9r6dxqrwd69v7gf8csv8kv7fjvagbglf3wfgyy5pzr"; + sha256 = "0dxfwayns3hjjplkxkpkm1409lmjlpi4chcrahcvdbnl0q6jpmcf"; }; installFlags = [ "INSTALLPATH=$(out)" ]; - meta = with stdenv.lib; { + meta = with lib; { description = "A userspace utility for testing the memory subsystem for faults"; homepage = "http://pyropus.ca/software/memtester/"; license = licenses.gpl2; diff --git a/pkgs/tools/system/minijail/default.nix b/pkgs/tools/system/minijail/default.nix index 2f5adc3f4c9..fac934f7bb2 100644 --- a/pkgs/tools/system/minijail/default.nix +++ b/pkgs/tools/system/minijail/default.nix @@ -11,12 +11,12 @@ in stdenv.mkDerivation rec { pname = "minijail"; - version = "14"; + version = "16"; src = fetchFromGitiles { url = "https://android.googlesource.com/platform/external/minijail"; rev = "linux-v${version}"; - sha256 = "00dq854n4zg3ca2b46f90k15n32zn2sgabi76mnq2w985k9v977n"; + sha256 = "0pxazds3w12c30msq6bxs4a9cbds0dkj6n3ca0i1wqvgz864yrgs"; }; nativeBuildInputs = diff --git a/pkgs/tools/system/mlc/default.nix b/pkgs/tools/system/mlc/default.nix new file mode 100644 index 00000000000..257cd31c060 --- /dev/null +++ b/pkgs/tools/system/mlc/default.nix @@ -0,0 +1,30 @@ +{ lib, stdenv, fetchurl, patchelf }: +stdenv.mkDerivation rec { + pname = "mlc"; + version = "3.9"; + + src = fetchurl { + url = "https://software.intel.com/content/dam/develop/external/us/en/protected/mlc_v${version}.tgz"; + sha256 = "1x7abm9hbv9hkqa3cgxz6l04m3ycyl40i4zgx1w819pc10n6dhdb"; + }; + + sourceRoot = "Linux"; + + installPhase = '' + install -Dm755 mlc $out/bin/mlc + ''; + + nativeBuildInputs = [ patchelf ]; + + fixupPhase = '' + patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/bin/mlc + ''; + + meta = with lib; { + homepage = "https://software.intel.com/content/www/us/en/develop/articles/intelr-memory-latency-checker.html"; + description = "Intel Memory Latency Checker"; + license = licenses.unfree; + maintainers = with maintainers; [ basvandijk ]; + platforms = with platforms; linux; + }; +} diff --git a/pkgs/tools/system/monit/default.nix b/pkgs/tools/system/monit/default.nix index 8be921b385e..8a2a3406c3e 100644 --- a/pkgs/tools/system/monit/default.nix +++ b/pkgs/tools/system/monit/default.nix @@ -1,4 +1,4 @@ -{ stdenv +{ lib, stdenv , fetchurl, bison, flex , zlib , usePAM ? stdenv.hostPlatform.isLinux, pam @@ -6,26 +6,26 @@ }: stdenv.mkDerivation rec { - name = "monit-5.27.0"; + name = "monit-5.27.2"; src = fetchurl { url = "${meta.homepage}dist/${name}.tar.gz"; - sha256 = "197w59wkg6izlj6p7xbx0n6ksvm6pym9pzh24nakl6agcbpxxh6q"; + sha256 = "sha256-2ICceNXcHtenujKlpVxRFIVRMsxNpIBfjTqvjPRuqkw="; }; nativeBuildInputs = [ bison flex ]; buildInputs = [ zlib.dev ] ++ - stdenv.lib.optionals useSSL [ openssl ] ++ - stdenv.lib.optionals usePAM [ pam ]; + lib.optionals useSSL [ openssl ] ++ + lib.optionals usePAM [ pam ]; configureFlags = [ - (stdenv.lib.withFeature usePAM "pam") + (lib.withFeature usePAM "pam") ] ++ (if useSSL then [ "--with-ssl-incl-dir=${openssl.dev}/include" "--with-ssl-lib-dir=${openssl.out}/lib" ] else [ "--without-ssl" - ]) ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + ]) ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ # will need to check both these are true for musl "libmonit_cv_setjmp_available=yes" "libmonit_cv_vsnprintf_c99_conformant=yes" @@ -34,8 +34,8 @@ stdenv.mkDerivation rec { meta = { homepage = "http://mmonit.com/monit/"; description = "Monitoring system"; - license = stdenv.lib.licenses.agpl3; - maintainers = with stdenv.lib.maintainers; [ raskin wmertens ]; - platforms = with stdenv.lib.platforms; linux; + license = lib.licenses.agpl3; + maintainers = with lib.maintainers; [ raskin wmertens ryantm ]; + platforms = with lib.platforms; linux; }; } diff --git a/pkgs/tools/system/mq-cli/default.nix b/pkgs/tools/system/mq-cli/default.nix index a29e1630116..2c1baa24f6f 100644 --- a/pkgs/tools/system/mq-cli/default.nix +++ b/pkgs/tools/system/mq-cli/default.nix @@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec { sha256 = "02z85waj5jc312biv2qhbgplsggxgjmfmyv9v8b1ky0iq1mpxjw7"; }; - cargoSha256 = "19ccylnmmlm2d8kc178cffpjwrjlia6b4v3nzvxcs81a396ymr7b"; + cargoSha256 = "19mk0hl7cr5qb3r64zi0hcsn4yqbg8c3g2f9jywm0g2c13ak36li"; meta = with lib; { description = "CLI tool to manage POSIX message queues"; diff --git a/pkgs/tools/system/nats-top/default.nix b/pkgs/tools/system/nats-top/default.nix new file mode 100644 index 00000000000..f2be03d4301 --- /dev/null +++ b/pkgs/tools/system/nats-top/default.nix @@ -0,0 +1,25 @@ +{ lib +, buildGoModule +, fetchFromGitHub +}: + +buildGoModule rec { + pname = "nats-top"; + version = "0.4.0"; + + src = fetchFromGitHub { + owner = "nats-io"; + repo = pname; + rev = "v${version}"; + sha256 = "0b1hpnq8m1xfrn58ammmnx6lmhk319m8z4xjxgckz7wvy2fbzw0n"; + }; + + vendorSha256 = "1a48p9gx5zdc340ma6cqakhi6f3lw9b0kz2597j1jcsk2qb7s581"; + + meta = with lib; { + description = "top-like tool for monitoring NATS servers"; + homepage = "https://github.com/nats-io/nats-top"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/tools/system/natscli/default.nix b/pkgs/tools/system/natscli/default.nix new file mode 100644 index 00000000000..a7f4337ce81 --- /dev/null +++ b/pkgs/tools/system/natscli/default.nix @@ -0,0 +1,25 @@ +{ lib +, buildGoModule +, fetchFromGitHub +}: + +buildGoModule rec { + pname = "natscli"; + version = "0.0.25"; + + src = fetchFromGitHub { + owner = "nats-io"; + repo = pname; + rev = version; + sha256 = "180511x3sciqs0njz80qc1a785m84ks9l338qi3liv7bcd541xcr"; + }; + + vendorSha256 = "1j2a6wmyb9akndiwq79jqy5lz84bz2k01xp505j60ynsflim7shq"; + + meta = with lib; { + description = "NATS Command Line Interface"; + homepage = "https://github.com/nats-io/natscli"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/tools/system/netdata/default.nix b/pkgs/tools/system/netdata/default.nix index e5316e028db..25d0366ef71 100644 --- a/pkgs/tools/system/netdata/default.nix +++ b/pkgs/tools/system/netdata/default.nix @@ -1,30 +1,33 @@ -{ stdenv, callPackage, fetchFromGitHub, autoreconfHook, pkgconfig +{ lib, stdenv, callPackage, fetchFromGitHub, autoreconfHook, pkg-config, makeWrapper , CoreFoundation, IOKit, libossp_uuid -, curl, libcap, libuuid, lm_sensors, zlib, fetchpatch +, nixosTests +, curl, libcap, libuuid, lm_sensors, zlib , withCups ? false, cups , withDBengine ? true, libuv, lz4, judy , withIpmi ? (!stdenv.isDarwin), freeipmi , withNetfilter ? (!stdenv.isDarwin), libmnl, libnetfilter_acct +, withCloud ? (!stdenv.isDarwin), json_c , withSsl ? true, openssl , withDebug ? false }: -with stdenv.lib; +with lib; let go-d-plugin = callPackage ./go.d.plugin.nix {}; in stdenv.mkDerivation rec { - version = "1.23.2"; + version = "1.31.0"; pname = "netdata"; src = fetchFromGitHub { owner = "netdata"; repo = "netdata"; rev = "v${version}"; - sha256 = "1vv92plk9dxk6fl76ik1zralpzc35ymrfyrf1cr6pv8q3agyy5k4"; + sha256 = "0735cxmljrp8zlkcq7hcxizy4j4xiv7vf782zkz5chn06n38mcik"; + fetchSubmodules = true; }; - nativeBuildInputs = [ autoreconfHook pkgconfig ]; + nativeBuildInputs = [ autoreconfHook pkg-config makeWrapper ]; buildInputs = [ curl.dev zlib.dev ] ++ optionals stdenv.isDarwin [ CoreFoundation IOKit libossp_uuid ] ++ optionals (!stdenv.isDarwin) [ libcap.dev libuuid.dev ] @@ -32,16 +35,18 @@ in stdenv.mkDerivation rec { ++ optionals withDBengine [ libuv lz4.dev judy ] ++ optionals withIpmi [ freeipmi ] ++ optionals withNetfilter [ libmnl libnetfilter_acct ] + ++ optionals withCloud [ json_c ] ++ optionals withSsl [ openssl.dev ]; patches = [ + # required to prevent plugins from relying on /etc + # and /var ./no-files-in-etc-and-var.patch - ] ++ stdenv.lib.optionals (!stdenv.cc.isGNU) [ - # fix memcpy typo for non-gnu. Remove with the next release. - (fetchpatch { - url = "https://github.com/netdata/netdata/commit/da7f267196b489e9a75724b68897e8f2e6137d72.patch"; - sha256 = "1j2sa06j6v491nw58bjx5nqqyfi1n2n9z3p3jiy4yh74m3asldlv"; - }) + # The current IPC location is unsafe as it writes + # a fixed path in /tmp, which is world-writable. + # Therefore we put it into `/run/netdata`, which is owned + # by netdata only. + ./ipc-socket-in-run.patch ]; NIX_CFLAGS_COMPILE = optionalString withDebug "-O1 -ggdb -DNETDATA_INTERNAL_CHECKS=1"; @@ -53,6 +58,8 @@ in stdenv.mkDerivation rec { # rename this plugin so netdata will look for setuid wrapper mv $out/libexec/netdata/plugins.d/apps.plugin \ $out/libexec/netdata/plugins.d/apps.plugin.org + mv $out/libexec/netdata/plugins.d/cgroup-network \ + $out/libexec/netdata/plugins.d/cgroup-network.org mv $out/libexec/netdata/plugins.d/perf.plugin \ $out/libexec/netdata/plugins.d/perf.plugin.org mv $out/libexec/netdata/plugins.d/slabinfo.plugin \ @@ -71,18 +78,22 @@ in stdenv.mkDerivation rec { configureFlags = [ "--localstatedir=/var" "--sysconfdir=/etc" + ] ++ optionals withCloud [ + "--enable-cloud" + "--with-aclk-ng" ]; postFixup = '' - rm -r $out/sbin + wrapProgram $out/bin/netdata-claim.sh --prefix PATH : ${lib.makeBinPath [ openssl ]} ''; + passthru.tests.netdata = nixosTests.netdata; + meta = { description = "Real-time performance monitoring tool"; - homepage = "https://my-netdata.io/"; - license = licenses.gpl3; + homepage = "https://www.netdata.cloud/"; + license = licenses.gpl3Plus; platforms = platforms.unix; - maintainers = [ maintainers.lethalman ]; + maintainers = [ ]; }; - } diff --git a/pkgs/tools/system/netdata/go.d.plugin.nix b/pkgs/tools/system/netdata/go.d.plugin.nix index e2392df495f..be6e8f26763 100644 --- a/pkgs/tools/system/netdata/go.d.plugin.nix +++ b/pkgs/tools/system/netdata/go.d.plugin.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "netdata-go.d.plugin"; - version = "0.20.0"; + version = "0.28.1"; src = fetchFromGitHub { owner = "netdata"; repo = "go.d.plugin"; rev = "v${version}"; - sha256 = "0wd1wg56q955jm5ksq2zqzlms1nlxx7n7vv43l096k1578fv93jv"; + sha256 = "0i77nvqi3dcby0gr3b06bai170q2ibp5390qfjijrk1yqz6x6sd5"; }; - vendorSha256 = "1k84l97fw4s9jdwbka4p168m7l7wil0c4cpijis8ypj3g1xfrw90"; + vendorSha256 = "1q8z4smaxzqd5iwvbnkkr33c3b94rjwa3xjirwlr595g0wn93wc7"; doCheck = false; @@ -26,6 +26,6 @@ buildGoModule rec { description = "Netdata orchestrator for data collection modules written in go"; homepage = "https://github.com/netdata/go.d.plugin"; license = licenses.gpl3; - maintainers = [ maintainers.lethalman ]; + maintainers = [ ]; }; } diff --git a/pkgs/tools/system/netdata/ipc-socket-in-run.patch b/pkgs/tools/system/netdata/ipc-socket-in-run.patch new file mode 100644 index 00000000000..a117955af09 --- /dev/null +++ b/pkgs/tools/system/netdata/ipc-socket-in-run.patch @@ -0,0 +1,13 @@ +diff --git a/daemon/commands.h b/daemon/commands.h +index bd4aabfe1cbe4..ce7eb3c730228 100644 +--- a/daemon/commands.h ++++ b/daemon/commands.h +@@ -6,7 +6,7 @@ + #ifdef _WIN32 + # define PIPENAME "\\\\?\\pipe\\netdata-cli" + #else +-# define PIPENAME "/tmp/netdata-ipc" ++# define PIPENAME "/run/netdata/ipc" + #endif + + #define MAX_COMMAND_LENGTH 4096 diff --git a/pkgs/tools/system/netdata/no-files-in-etc-and-var.patch b/pkgs/tools/system/netdata/no-files-in-etc-and-var.patch index 594805fdf18..1d0c5cfba58 100644 --- a/pkgs/tools/system/netdata/no-files-in-etc-and-var.patch +++ b/pkgs/tools/system/netdata/no-files-in-etc-and-var.patch @@ -1,28 +1,8 @@ -From 4ecc1475be94a384c122594b5f7d455beb64a2f0 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io> -Date: Sat, 22 Feb 2020 06:42:14 +0000 -Subject: [PATCH] no files in etc and var -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Jörg Thalheim <joerg@thalheim.io> ---- - collectors/Makefile.am | 2 +- - collectors/charts.d.plugin/Makefile.am | 2 +- - collectors/node.d.plugin/Makefile.am | 2 +- - collectors/python.d.plugin/Makefile.am | 2 +- - collectors/statsd.plugin/Makefile.am | 2 +- - health/Makefile.am | 2 +- - system/Makefile.am | 3 +-- - web/Makefile.am | 2 +- - 8 files changed, 8 insertions(+), 9 deletions(-) - diff --git a/collectors/Makefile.am b/collectors/Makefile.am -index 9bb52958..c9799165 100644 +index 021e2ff23..115b88277 100644 --- a/collectors/Makefile.am +++ b/collectors/Makefile.am -@@ -32,7 +32,7 @@ usercustompluginsconfigdir=$(configdir)/custom-plugins.d +@@ -33,7 +33,7 @@ usercustompluginsconfigdir=$(configdir)/custom-plugins.d usergoconfigdir=$(configdir)/go.d # Explicitly install directories to avoid permission issues due to umask @@ -32,7 +12,7 @@ index 9bb52958..c9799165 100644 $(INSTALL) -d $(DESTDIR)$(usergoconfigdir) diff --git a/collectors/charts.d.plugin/Makefile.am b/collectors/charts.d.plugin/Makefile.am -index 03c7f0a9..01985db0 100644 +index 03c7f0a94..01985db01 100644 --- a/collectors/charts.d.plugin/Makefile.am +++ b/collectors/charts.d.plugin/Makefile.am @@ -34,7 +34,7 @@ dist_userchartsconfig_DATA = \ @@ -44,8 +24,21 @@ index 03c7f0a9..01985db0 100644 $(INSTALL) -d $(DESTDIR)$(userchartsconfigdir) chartsconfigdir=$(libconfigdir)/charts.d +diff --git a/collectors/ebpf.plugin/Makefile.am b/collectors/ebpf.plugin/Makefile.am +index 18b1fc6c8..b4b0c7852 100644 +--- a/collectors/ebpf.plugin/Makefile.am ++++ b/collectors/ebpf.plugin/Makefile.am +@@ -13,7 +13,7 @@ SUFFIXES = .in + userebpfconfigdir=$(configdir)/ebpf.d + + # Explicitly install directories to avoid permission issues due to umask +-install-exec-local: ++no-install-exec-local: + $(INSTALL) -d $(DESTDIR)$(userebpfconfigdir) + + dist_plugins_SCRIPTS = \ diff --git a/collectors/node.d.plugin/Makefile.am b/collectors/node.d.plugin/Makefile.am -index c3142d43..95e32445 100644 +index c3142d433..95e324455 100644 --- a/collectors/node.d.plugin/Makefile.am +++ b/collectors/node.d.plugin/Makefile.am @@ -26,7 +26,7 @@ dist_usernodeconfig_DATA = \ @@ -58,7 +51,7 @@ index c3142d43..95e32445 100644 nodeconfigdir=$(libconfigdir)/node.d diff --git a/collectors/python.d.plugin/Makefile.am b/collectors/python.d.plugin/Makefile.am -index e678f86a..29a319da 100644 +index 38eb90f79..ce7079441 100644 --- a/collectors/python.d.plugin/Makefile.am +++ b/collectors/python.d.plugin/Makefile.am @@ -32,7 +32,7 @@ dist_userpythonconfig_DATA = \ @@ -71,10 +64,10 @@ index e678f86a..29a319da 100644 pythonconfigdir=$(libconfigdir)/python.d diff --git a/collectors/statsd.plugin/Makefile.am b/collectors/statsd.plugin/Makefile.am -index b01302d1..f5b77da4 100644 +index 71f2d468d..2c9ced2bf 100644 --- a/collectors/statsd.plugin/Makefile.am +++ b/collectors/statsd.plugin/Makefile.am -@@ -17,5 +17,5 @@ dist_userstatsdconfig_DATA = \ +@@ -18,5 +18,5 @@ dist_userstatsdconfig_DATA = \ $(NULL) # Explicitly install directories to avoid permission issues due to umask @@ -82,7 +75,7 @@ index b01302d1..f5b77da4 100644 +no-install-exec-local: $(INSTALL) -d $(DESTDIR)$(userstatsdconfigdir) diff --git a/health/Makefile.am b/health/Makefile.am -index 853ed0d7..210330a6 100644 +index b963ea0cd..6979e69bf 100644 --- a/health/Makefile.am +++ b/health/Makefile.am @@ -19,7 +19,7 @@ dist_userhealthconfig_DATA = \ @@ -95,10 +88,10 @@ index 853ed0d7..210330a6 100644 healthconfigdir=$(libconfigdir)/health.d diff --git a/system/Makefile.am b/system/Makefile.am -index ad68c655..74f032f9 100644 +index 5323738c9..06e1b6a73 100644 --- a/system/Makefile.am +++ b/system/Makefile.am -@@ -17,11 +17,10 @@ include $(top_srcdir)/build/subst.inc +@@ -20,11 +20,10 @@ include $(top_srcdir)/build/subst.inc SUFFIXES = .in dist_config_SCRIPTS = \ @@ -112,7 +105,7 @@ index ad68c655..74f032f9 100644 nodist_noinst_DATA = \ diff --git a/web/Makefile.am b/web/Makefile.am -index ccaccd76..16a2977e 100644 +index ccaccd764..16a2977e5 100644 --- a/web/Makefile.am +++ b/web/Makefile.am @@ -12,7 +12,7 @@ SUBDIRS = \ @@ -124,6 +117,3 @@ index ccaccd76..16a2977e 100644 $(INSTALL) -d $(DESTDIR)$(usersslconfigdir) dist_noinst_DATA = \ --- -2.25.0 - diff --git a/pkgs/tools/system/nkeys/default.nix b/pkgs/tools/system/nkeys/default.nix new file mode 100644 index 00000000000..05d2d853b24 --- /dev/null +++ b/pkgs/tools/system/nkeys/default.nix @@ -0,0 +1,25 @@ +{ lib +, buildGoModule +, fetchFromGitHub +}: + +buildGoModule rec { + pname = "nkeys"; + version = "0.3.0"; + + src = fetchFromGitHub { + owner = "nats-io"; + repo = pname; + rev = "v${version}"; + sha256 = "06wbmb3cxjrcfvgfbn6rdfzb4pfaaw11bnvl1r4kig4ag22qcz7b"; + }; + + vendorSha256 = "0kiqlw2411x5c1pamq3mn5wcm8mdn91avwg8xh2a7sy3kqw5d26d"; + + meta = with lib; { + description = "Public-key signature system for NATS"; + homepage = "https://github.com/nats-io/nkeys"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/tools/system/nq/default.nix b/pkgs/tools/system/nq/default.nix index 9e6522b2028..239ac1368ad 100644 --- a/pkgs/tools/system/nq/default.nix +++ b/pkgs/tools/system/nq/default.nix @@ -2,24 +2,24 @@ stdenv.mkDerivation rec { pname = "nq"; - version = "0.3.1"; + version = "0.4"; src = fetchFromGitHub { owner = "chneukirchen"; repo = "nq"; rev = "v${version}"; - sha256 = "1db96ykz35r273jyhf7cdknqk4p2jj9l8gbz7pjy1hq4pb6ffk99"; + sha256 = "sha256-UfCeHwOD+tG6X2obW64DYZr6j90yh1Yl7My4ur+sqmk="; }; makeFlags = [ "PREFIX=$(out)" ]; postPatch = '' sed -i tq \ - -e 's|\bfq\b|'$out'/bin/fq|g' \ - -e 's|\bnq\b|'$out'/bin/nq|g' + -e 's|\bnq\b|'$out'/bin/nq|g' \ + -e 's|\bfq\b|'$out'/bin/fq|g' ''; meta = with lib; { description = "Unix command line queue utility"; homepage = "https://github.com/chneukirchen/nq"; license = licenses.publicDomain; - platforms = platforms.linux; + platforms = platforms.all; maintainers = with maintainers; [ cstrahan ]; }; } diff --git a/pkgs/tools/system/nvtop/default.nix b/pkgs/tools/system/nvtop/default.nix index cd9ec7c7082..fdbfeb1c31f 100644 --- a/pkgs/tools/system/nvtop/default.nix +++ b/pkgs/tools/system/nvtop/default.nix @@ -1,27 +1,31 @@ -{ stdenv, fetchFromGitHub, cmake, nvidia_x11, cudatoolkit, ncurses }: +{ lib, stdenv, fetchFromGitHub, cmake, cudatoolkit, ncurses, addOpenGLRunpath }: stdenv.mkDerivation rec { pname = "nvtop"; - version = "1.0.0"; + version = "1.1.0"; src = fetchFromGitHub { owner = "Syllo"; - repo = "nvtop"; + repo = "nvtop"; rev = version; - sha256 = "1b6yz54xddip1r0k8cbqg41dpyhds18fj29bj3yf40xvysklb0f4"; + sha256 = "1h24ppdz7l6l0znwbgir49f7r1fshzjavc6i5j33c6bvr318dpqb"; }; cmakeFlags = [ "-DNVML_INCLUDE_DIRS=${cudatoolkit}/include" - "-DNVML_LIBRARIES=${nvidia_x11}/lib/libnvidia-ml.so" + "-DNVML_LIBRARIES=${cudatoolkit}/targets/x86_64-linux/lib/stubs/libnvidia-ml.so" "-DCMAKE_BUILD_TYPE=Release" ]; - nativeBuildInputs = [ cmake ]; - buildInputs = [ ncurses nvidia_x11 cudatoolkit ]; + nativeBuildInputs = [ cmake addOpenGLRunpath ]; + buildInputs = [ ncurses cudatoolkit ]; - meta = with stdenv.lib; { - description = "A (h)top like like task monitor for NVIDIA GPUs"; + postFixup = '' + addOpenGLRunpath $out/bin/nvtop + ''; + + meta = with lib; { + description = "A (h)top like task monitor for NVIDIA GPUs"; homepage = "https://github.com/Syllo/nvtop"; license = licenses.gpl3; platforms = platforms.linux; diff --git a/pkgs/tools/system/opencl-info/default.nix b/pkgs/tools/system/opencl-info/default.nix index a5013a68885..d5fd86f231a 100644 --- a/pkgs/tools/system/opencl-info/default.nix +++ b/pkgs/tools/system/opencl-info/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, opencl-clhpp, ocl-icd }: +{ lib, stdenv, fetchFromGitHub, opencl-clhpp, ocl-icd }: stdenv.mkDerivation { name = "opencl-info-2014-02-21"; @@ -10,6 +10,14 @@ stdenv.mkDerivation { sha256 = "114lxgnjg40ivjjszkv4n3f3yq2lbrvywryvbazf20kqmdz7315l"; }; + patches = [ + # The cl.hpp header was removed from opencl-clhpp. This patch + # updates opencl-info to use the new cp2.hpp header. + # + # Submitted upstream: https://github.com/marchv/opencl-info/pull/2 + ./opencl-info-clhpp2.diff + ]; + buildInputs = [ opencl-clhpp ocl-icd ]; NIX_LDFLAGS = "-lOpenCL"; @@ -18,7 +26,7 @@ stdenv.mkDerivation { install -Dm755 opencl-info $out/bin/opencl-info ''; - meta = with stdenv.lib; { + meta = with lib; { description = "A tool to dump OpenCL platform/device information"; homepage = "https://github.com/marchv/opencl-info"; license = licenses.mit; diff --git a/pkgs/tools/system/opencl-info/opencl-info-clhpp2.diff b/pkgs/tools/system/opencl-info/opencl-info-clhpp2.diff new file mode 100644 index 00000000000..013222beebf --- /dev/null +++ b/pkgs/tools/system/opencl-info/opencl-info-clhpp2.diff @@ -0,0 +1,22 @@ +diff --git a/opencl-info.cpp b/opencl-info.cpp +index a23015d..a6de0c1 100644 +--- a/opencl-info.cpp ++++ b/opencl-info.cpp +@@ -7,7 +7,7 @@ + #if defined(__APPLE__) || defined(__MACOSX) + # include <OpenCL/cl.hpp> + #else +-# include <CL/cl.hpp> ++# include <CL/cl2.hpp> + #endif + + #include <iostream> +@@ -130,7 +130,7 @@ int main() { + PconstEnd; + P(device, CL_DEVICE_LOCAL_MEM_SIZE); + Pbool(device, CL_DEVICE_ERROR_CORRECTION_SUPPORT); +- Pbool(device, CL_DEVICE_HOST_UNIFIED_MEMORY); ++ // Pbool(device, CL_DEVICE_HOST_UNIFIED_MEMORY); /* Deprecated in 2.0 */ + P(device, CL_DEVICE_PROFILING_TIMER_RESOLUTION); + Pbool(device, CL_DEVICE_ENDIAN_LITTLE); + Pbool(device, CL_DEVICE_AVAILABLE); diff --git a/pkgs/tools/system/pciutils/default.nix b/pkgs/tools/system/pciutils/default.nix index 4bbe2bdcee0..8c017c42d7a 100644 --- a/pkgs/tools/system/pciutils/default.nix +++ b/pkgs/tools/system/pciutils/default.nix @@ -1,4 +1,8 @@ -{ stdenv, fetchurl, pkgconfig, zlib, kmod, which }: +{ lib, stdenv, fetchurl, pkg-config, zlib, kmod, which +, hwdata +, static ? stdenv.hostPlatform.isStatic +, IOKit +}: stdenv.mkDerivation rec { name = "pciutils-3.7.0"; # with release-date database @@ -8,11 +12,16 @@ stdenv.mkDerivation rec { sha256 = "1ss0rnfsx8gvqjxaji4mvbhf9xyih4cadmgadbwwv8mnx1xvjh4x"; }; - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ zlib kmod which ]; + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ zlib kmod which ] ++ + lib.optional stdenv.hostPlatform.isDarwin IOKit; + + preConfigure = if stdenv.cc.isGNU then null else '' + substituteInPlace Makefile --replace 'CC=$(CROSS_COMPILE)gcc' "" + ''; makeFlags = [ - "SHARED=yes" + "SHARED=${if static then "no" else "yes"}" "PREFIX=\${out}" "STRIP=" "HOST=${stdenv.hostPlatform.system}" @@ -22,10 +31,17 @@ stdenv.mkDerivation rec { installTargets = [ "install" "install-lib" ]; - # Get rid of update-pciids as it won't work. - postInstall = "rm $out/sbin/update-pciids $out/man/man8/update-pciids.8"; + postInstall = '' + # Remove update-pciids as it won't work on nixos + rm $out/sbin/update-pciids $out/man/man8/update-pciids.8 + + # use database from hwdata instead + # (we don't create a symbolic link because we do not want to pull in the + # full closure of hwdata) + cp --reflink=auto ${hwdata}/share/hwdata/pci.ids $out/share/pci.ids + ''; - meta = with stdenv.lib; { + meta = with lib; { homepage = "http://mj.ucw.cz/pciutils.html"; description = "A collection of programs for inspecting and manipulating configuration of PCI devices"; license = licenses.gpl2Plus; diff --git a/pkgs/tools/system/pcstat/default.nix b/pkgs/tools/system/pcstat/default.nix index 5febbcb6ef6..d01b08a1434 100644 --- a/pkgs/tools/system/pcstat/default.nix +++ b/pkgs/tools/system/pcstat/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildGoPackage, fetchFromGitHub }: +{ lib, buildGoPackage, fetchFromGitHub }: buildGoPackage { pname = "pcstat-unstable"; @@ -15,8 +15,8 @@ buildGoPackage { goDeps = ./deps.nix; - meta = with stdenv.lib; { - description = "Page Cache stat: get page cache stats for files on Linux."; + meta = with lib; { + description = "Page Cache stat: get page cache stats for files on Linux"; homepage = "https://github.com/tobert/pcstat"; license = licenses.asl20; maintainers = with maintainers; [ aminechikhaoui ]; diff --git a/pkgs/tools/system/plan9port/darwin-cfframework.patch b/pkgs/tools/system/plan9port/darwin-cfframework.patch deleted file mode 100644 index 01541af92e3..00000000000 --- a/pkgs/tools/system/plan9port/darwin-cfframework.patch +++ /dev/null @@ -1,24 +0,0 @@ -From d1f0bd3de7d3d54523aeefd9731ea850d20eaab4 Mon Sep 17 00:00:00 2001 -From: Jason Felice <jason.m.felice@gmail.com> -Date: Tue, 2 Jul 2019 13:19:23 -0400 -Subject: [PATCH] Need CoreFoundation - ---- - src/cmd/devdraw/cocoa-screen.m | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/cmd/devdraw/cocoa-screen.m b/src/cmd/devdraw/cocoa-screen.m -index 97128da2..0e380dd3 100644 ---- a/src/cmd/devdraw/cocoa-screen.m -+++ b/src/cmd/devdraw/cocoa-screen.m -@@ -56,6 +56,7 @@ - #endif - - AUTOFRAMEWORK(Cocoa) -+AUTOFRAMEWORK(CoreFoundation) - - #define LOG if(0)NSLog - #define panic sysfatal --- -2.21.0 - diff --git a/pkgs/tools/system/plan9port/darwin-sw_vers.patch b/pkgs/tools/system/plan9port/darwin-sw_vers.patch deleted file mode 100644 index 3e61c83e540..00000000000 --- a/pkgs/tools/system/plan9port/darwin-sw_vers.patch +++ /dev/null @@ -1,47 +0,0 @@ -From d21d082275f04f88eabcc8ecdb03ee932c71ebf1 Mon Sep 17 00:00:00 2001 -From: Jason Felice <jason.m.felice@gmail.com> -Date: Mon, 1 Jul 2019 15:23:19 -0400 -Subject: [PATCH 2/3] Build for 10.12 - ---- - bin/osxvers | 3 +-- - src/cmd/devdraw/mkwsysrules.sh | 4 ++-- - 2 files changed, 3 insertions(+), 4 deletions(-) - -diff --git a/bin/osxvers b/bin/osxvers -index 4af44da2..3be7e6e9 100755 ---- a/bin/osxvers -+++ b/bin/osxvers -@@ -2,6 +2,5 @@ - - u=`uname` - case "$u" in --Darwin) -- sw_vers | awk '$1 == "ProductVersion:" {print $2}' | awk -F. '{printf("CFLAGS=$CFLAGS -DOSX_VERSION=%d%02d%02d\n", $1, $2, $3)}' -+Darwin) printf 'CFLAGS=$CFLAGS -DOSX_VERSION=101200\n';; - esac -diff --git a/src/cmd/devdraw/mkwsysrules.sh b/src/cmd/devdraw/mkwsysrules.sh -index e94afbd3..40e632db 100644 ---- a/src/cmd/devdraw/mkwsysrules.sh -+++ b/src/cmd/devdraw/mkwsysrules.sh -@@ -22,7 +22,7 @@ fi - - if [ "x$WSYSTYPE" = "x" ]; then - if [ "x`uname`" = "xDarwin" ]; then -- if sw_vers | grep 'ProductVersion: 10\.[0-5]\.' >/dev/null; then -+ if false; then - echo 1>&2 'OS X 10.5 and older are not supported' - exit 1 - else -@@ -54,7 +54,7 @@ if [ $WSYSTYPE = x11 ]; then - XO=`ls x11-*.c 2>/dev/null | sed 's/\.c$/.o/'` - echo 'WSYSOFILES=$WSYSOFILES '$XO - elif [ $WSYSTYPE = osx-cocoa ]; then -- if sw_vers|awk '/ProductVersion/{split($2,a,".");exit(a[2]<14)}' >/dev/null; then # 0 is true in sh. -+ if false; then - echo 'OBJCFLAGS=$OBJCFLAGS -fobjc-arc' - echo 'WSYSOFILES=$WSYSOFILES osx-draw.o cocoa-screen-metal-objc.o cocoa-srv.o cocoa-thread.o' - else --- -2.21.0 - diff --git a/pkgs/tools/system/plan9port/default.nix b/pkgs/tools/system/plan9port/default.nix index 8164dfa9136..78db6e2037e 100644 --- a/pkgs/tools/system/plan9port/default.nix +++ b/pkgs/tools/system/plan9port/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, which +{ lib, stdenv, fetchFromGitHub, which , darwin ? null , xorgproto ? null , libX11 @@ -11,20 +11,15 @@ stdenv.mkDerivation { pname = "plan9port"; - version = "2020-01-08"; + version = "2021-04-22"; src = fetchFromGitHub { owner = "9fans"; repo = "plan9port"; - rev = "cc3d97d52a72d7eaceb5b636bcdf81c3e19f7a2e"; - sha256 = "0gb55kj0gzx1kdhiwcrbr7xcgz1im21dyxgxhfhh6d0q9rw0c17g"; + rev = "70cc6e5ba7798b315c3fb3aae19620a01604a459"; + hash = "sha256-HCn8R9YSocHrpw/xK5n8gsCLSAbAQgw0NtjO9vYIbKo="; }; - patches = [ - ./darwin-sw_vers.patch - ./darwin-cfframework.patch - ]; - postPatch = '' #hardcoded path substituteInPlace src/cmd/acme/acme.c \ @@ -37,7 +32,7 @@ stdenv.mkDerivation { substituteInPlace bin/9c \ --replace 'which uniq' '${which}/bin/which uniq' - '' + stdenv.lib.optionalString (!stdenv.isDarwin) '' + '' + lib.optionalString (!stdenv.isDarwin) '' #add missing ctrl+c\z\x\v keybind for non-Darwin substituteInPlace src/cmd/acme/text.c \ --replace "case Kcmd+'c':" "case 0x03: case Kcmd+'c':" \ @@ -48,10 +43,10 @@ stdenv.mkDerivation { buildInputs = [ perl - ] ++ stdenv.lib.optionals (!stdenv.isDarwin) [ + ] ++ lib.optionals (!stdenv.isDarwin) [ xorgproto libX11 libXext libXt fontconfig freetype # fontsrv wants ft2build.h provides system fonts for acme and sam. - ] ++ stdenv.lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ + ] ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Carbon Cocoa IOKit Metal QuartzCore ]); @@ -79,17 +74,23 @@ stdenv.mkDerivation { ./test ''; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://9fans.github.io/plan9port/"; description = "Plan 9 from User Space"; longDescription = '' Plan 9 from User Space (aka plan9port) is a port of many Plan 9 programs from their native Plan 9 environment to Unix-like operating systems. ''; - license = licenses.lpl-102; - maintainers = with maintainers; [ AndersonTorres bbarker - ftrvxmtrx kovirobi ]; + license = licenses.mit; + maintainers = with maintainers; [ + AndersonTorres + bbarker + ehmry + ftrvxmtrx + kovirobi + ]; platforms = platforms.unix; + broken = stdenv.isDarwin; }; } # TODO: investigate the mouse chording support patch diff --git a/pkgs/tools/system/procodile/gemset.nix b/pkgs/tools/system/procodile/gemset.nix index 36ec2a9cf18..f5b73b617bb 100644 --- a/pkgs/tools/system/procodile/gemset.nix +++ b/pkgs/tools/system/procodile/gemset.nix @@ -20,4 +20,4 @@ }; version = "1.0.23"; }; -} \ No newline at end of file +} diff --git a/pkgs/tools/system/proot/default.nix b/pkgs/tools/system/proot/default.nix index 06147df093e..daf543d7f75 100644 --- a/pkgs/tools/system/proot/default.nix +++ b/pkgs/tools/system/proot/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub +{ lib, stdenv, fetchFromGitHub , talloc, docutils, swig, python, coreutils, enablePython ? true }: stdenv.mkDerivation { @@ -19,8 +19,8 @@ stdenv.mkDerivation { sed -i /CROSS_COMPILE/d src/GNUmakefile ''; - buildInputs = [ talloc ] ++ stdenv.lib.optional enablePython python; - nativeBuildInputs = [ docutils ] ++ stdenv.lib.optional enablePython swig; + buildInputs = [ talloc ] ++ lib.optional enablePython python; + nativeBuildInputs = [ docutils ] ++ lib.optional enablePython swig; enableParallelBuilding = true; @@ -36,7 +36,7 @@ stdenv.mkDerivation { install -Dm644 doc/proot/man.1 $out/share/man/man1/proot.1 ''; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://proot-me.github.io"; description = "User-space implementation of chroot, mount --bind and binfmt_misc"; platforms = platforms.linux; diff --git a/pkgs/tools/system/ps_mem/default.nix b/pkgs/tools/system/ps_mem/default.nix index 45a33a1adb7..1752aba240f 100644 --- a/pkgs/tools/system/ps_mem/default.nix +++ b/pkgs/tools/system/ps_mem/default.nix @@ -1,4 +1,4 @@ -{ stdenv, pythonPackages, fetchFromGitHub }: +{ lib, pythonPackages, fetchFromGitHub }: let version = "3.13"; @@ -13,11 +13,11 @@ in pythonPackages.buildPythonApplication { sha256 = "0pgi9hvwfbkzvwicqlkwx4rwal1ikza018yxbwpnf7c80zw0zaw9"; }; - meta = with stdenv.lib; { + meta = with lib; { description = "A utility to accurately report the in core memory usage for a program"; homepage = "https://github.com/pixelb/ps_mem"; license = licenses.lgpl21; - maintainers = [ maintainers.gnidorah ]; + maintainers = [ ]; platforms = platforms.linux; }; } diff --git a/pkgs/tools/system/psensor/default.nix b/pkgs/tools/system/psensor/default.nix index afbab363443..079055bd3ba 100644 --- a/pkgs/tools/system/psensor/default.nix +++ b/pkgs/tools/system/psensor/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, pkgconfig, lm_sensors, libgtop, libatasmart, gtk3 +{ stdenv, lib, fetchurl, pkg-config, lm_sensors, libgtop, libatasmart, gtk3 , libnotify, udisks2, libXNVCtrl, wrapGAppsHook }: @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { sha256 = "1ark901va79gfq5p8h8dqypjgm3f8crmj37520q3slwz2rfphkq8"; }; - nativeBuildInputs = [ pkgconfig wrapGAppsHook ]; + nativeBuildInputs = [ pkg-config wrapGAppsHook ]; buildInputs = [ lm_sensors libgtop libatasmart gtk3 libnotify udisks2 diff --git a/pkgs/tools/system/psstop/default.nix b/pkgs/tools/system/psstop/default.nix index 3a5ee2b0581..1d4fff918ec 100644 --- a/pkgs/tools/system/psstop/default.nix +++ b/pkgs/tools/system/psstop/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, glib }: +{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, glib }: stdenv.mkDerivation rec { pname = "psstop"; @@ -11,11 +11,11 @@ stdenv.mkDerivation rec { sha256 = "03ir3jjpzm7q8n1qc5jr99hqarr9r529w1zb6f7q4wak2vfj7w9h"; }; - nativeBuildInputs = [ autoreconfHook pkgconfig ]; + nativeBuildInputs = [ autoreconfHook pkg-config ]; buildInputs = [ glib ]; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://github.com/clearlinux/psstop"; description = "Show processes' memory usage by looking into pss"; # upstream summary license = licenses.gpl3; diff --git a/pkgs/tools/system/r10k/gemset.nix b/pkgs/tools/system/r10k/gemset.nix index d0e955d4cea..9b46cce00da 100644 --- a/pkgs/tools/system/r10k/gemset.nix +++ b/pkgs/tools/system/r10k/gemset.nix @@ -165,4 +165,4 @@ }; version = "1.3.1"; }; -} \ No newline at end of file +} diff --git a/pkgs/tools/system/retry/default.nix b/pkgs/tools/system/retry/default.nix new file mode 100644 index 00000000000..48125d2df37 --- /dev/null +++ b/pkgs/tools/system/retry/default.nix @@ -0,0 +1,23 @@ +{ lib, stdenv, fetchFromGitHub, autoreconfHook, which, txt2man }: +stdenv.mkDerivation rec { + pname = "retry"; + version = "1.0.4"; + + nativeBuildInputs = [ autoreconfHook which txt2man ]; + + src = fetchFromGitHub { + owner = "minfrin"; + repo = "retry"; + rev = "${pname}-${version}"; + sha256 = "sha256:0jrx4yrwlf4fn3309kxraj7zgwk7gq6rz5ibswq3w3b3jfvxi8qb"; + }; + + meta = with lib; { + homepage = "https://github.com/minfrin/retry"; + description = "Retry a command until the command succeeds"; + platforms = platforms.all; + license = licenses.asl20; + maintainers = with maintainers; [ gfrascadorio ]; + }; +} + diff --git a/pkgs/tools/system/rocm-smi/default.nix b/pkgs/tools/system/rocm-smi/default.nix index 8cbc56e0468..de9afdae294 100644 --- a/pkgs/tools/system/rocm-smi/default.nix +++ b/pkgs/tools/system/rocm-smi/default.nix @@ -1,30 +1,52 @@ -{ lib, buildPythonApplication, fetchFromGitHub }: +{ lib, stdenv, fetchFromGitHub, cmake, python3 }: -buildPythonApplication rec { +stdenv.mkDerivation rec { pname = "rocm-smi"; - version = "3.7.0"; + version = "4.1.0"; src = fetchFromGitHub { owner = "RadeonOpenCompute"; - repo = "ROC-smi"; + repo = "rocm_smi_lib"; rev = "rocm-${version}"; - sha256 = "00g9cbni73x9da05lx7hiffp303mdkj1wpxiavfylr4q4z84yhrz"; + hash = "sha256-LEaC1XhmyoVWrpL05MhgN02LVT2rLKdnw9g2QdfM/uE="; }; - format = "other"; + nativeBuildInputs = [ cmake python3.pkgs.wrapPython ]; - dontConfigure = true; - dontBuild = true; + postPatch = '' + # Upstream ROCm is installed in an /opt directory. For this reason, + # it does not completely follow FHS layout, creating top-level + # rocm_smi, oam, and bindings top-level directories. Since rocm-smi + # is a package that is typically installed, we change the paths to + # follow FHS more closely. - installPhase = '' - install -Dm0755 rocm_smi.py $out/bin/rocm-smi + # rocm_smi libraries and headers go into lib and include. Bindings + # go into lib/rocm_smi/bindings. + substituteInPlace rocm_smi/CMakeLists.txt \ + --replace "DESTINATION rocm_smi/" "DESTINATION " \ + --replace "DESTINATION bindings" "DESTINATION lib/rocm_smi/bindings" \ + --replace "../rocm_smi/bindings/rsmiBindings.py" "../lib/rocm_smi/bindings/rsmiBindings.py" \ + --replace 'DESTINATION ''${ROCM_SMI}/' "DESTINATION " + + # oam libraries and headers go into lib and include. + substituteInPlace oam/CMakeLists.txt \ + --replace "DESTINATION oam/" "DESTINATION " \ + --replace 'DESTINATION ''${OAM_NAME}/' "DESTINATION " + + # Update relative path to librocm_smi64 in the Python binding. + substituteInPlace python_smi_tools/rsmiBindings.py \ + --replace "/../lib/librocm_smi64.so" "/../../librocm_smi64.so" + ''; + + postInstall = '' + wrapPythonProgramsIn $out/bin ''; meta = with lib; { description = "System management interface for AMD GPUs supported by ROCm"; homepage = "https://github.com/RadeonOpenCompute/ROC-smi"; license = with licenses; [ mit ]; - maintainers = with maintainers; [ danieldk ]; - platforms = platforms.linux; + maintainers = with maintainers; [ ]; + platforms = [ "x86_64-linux" ]; }; } diff --git a/pkgs/tools/system/rofi-systemd/default.nix b/pkgs/tools/system/rofi-systemd/default.nix index 92c13527c6f..f64a84c5509 100644 --- a/pkgs/tools/system/rofi-systemd/default.nix +++ b/pkgs/tools/system/rofi-systemd/default.nix @@ -1,18 +1,18 @@ -{ stdenv, fetchFromGitHub, rofi, systemd, coreutils, utillinux, gawk, makeWrapper +{ lib, stdenv, fetchFromGitHub, rofi, systemd, coreutils, util-linux, gawk, makeWrapper, jq }: stdenv.mkDerivation rec { pname = "rofi-systemd"; - version = "0.1.0"; + version = "0.1.1"; src = fetchFromGitHub { owner = "IvanMalison"; repo = "rofi-systemd"; rev = "v${version}"; - sha256 = "1dbygq3qaj1f73hh3njdnmibq7vi6zbyzdc6c0j989c0r1ksv0zi"; + sha256 = "0lgffb6rk1kf91j4j303lzpx8w2g9zy2gk99p8g8pk62a30c5asm"; }; - buildInputs = [ makeWrapper ]; + nativeBuildInputs = [ makeWrapper ]; dontBuild = true; @@ -21,12 +21,13 @@ stdenv.mkDerivation rec { cp -a rofi-systemd $out/bin/rofi-systemd ''; - wrapperPath = with stdenv.lib; makeBinPath [ - rofi + wrapperPath = with lib; makeBinPath [ coreutils - utillinux gawk + jq + rofi systemd + util-linux ]; fixupPhase = '' @@ -38,8 +39,8 @@ stdenv.mkDerivation rec { meta = { description = "Control your systemd units using rofi"; homepage = "https://github.com/IvanMalison/rofi-systemd"; - maintainers = with stdenv.lib.maintainers; [ imalison ]; - license = stdenv.lib.licenses.gpl3; - platforms = with stdenv.lib.platforms; linux; + maintainers = with lib.maintainers; [ imalison ]; + license = lib.licenses.gpl3; + platforms = with lib.platforms; linux; }; } diff --git a/pkgs/tools/system/rowhammer-test/default.nix b/pkgs/tools/system/rowhammer-test/default.nix index 02462584c65..9afb1933e17 100644 --- a/pkgs/tools/system/rowhammer-test/default.nix +++ b/pkgs/tools/system/rowhammer-test/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub }: +{ lib, stdenv, fetchFromGitHub }: stdenv.mkDerivation { name = "rowhammer-test-20150811"; @@ -10,7 +10,7 @@ stdenv.mkDerivation { sha256 = "1fbfcnm5gjish47wdvikcsgzlb5vnlfqlzzm6mwiw2j5qkq0914i"; }; - NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isi686 "-Wno-error=format"; + NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isi686 "-Wno-error=format"; buildPhase = "sh -e make.sh"; @@ -19,7 +19,7 @@ stdenv.mkDerivation { cp rowhammer_test double_sided_rowhammer $out/bin ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Test DRAM for bit flips caused by the rowhammer problem"; homepage = "https://github.com/google/rowhammer-test"; license = licenses.asl20; diff --git a/pkgs/tools/system/rsyslog/default.nix b/pkgs/tools/system/rsyslog/default.nix index 7be7e5b3d37..7fc11d49d7c 100644 --- a/pkgs/tools/system/rsyslog/default.nix +++ b/pkgs/tools/system/rsyslog/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, autoreconfHook, libestr, json_c, zlib, pythonPackages, fastJson +{ lib, stdenv, fetchurl, pkg-config, autoreconfHook, libestr, json_c, zlib, pythonPackages, fastJson , libkrb5 ? null, systemd ? null, jemalloc ? null, libmysqlclient ? null, postgresql ? null , libdbi ? null, net-snmp ? null, libuuid ? null, curl ? null, gnutls ? null , libgcrypt ? null, liblognorm ? null, openssl ? null, librelp ? null, libksi ? null @@ -8,7 +8,7 @@ , nixosTests ? null }: -with stdenv.lib; +with lib; let mkFlag = cond: name: if cond then "--enable-${name}" else "--disable-${name}"; in @@ -23,14 +23,14 @@ stdenv.mkDerivation rec { #patches = [ ./fix-gnutls-detection.patch ]; - nativeBuildInputs = [ pkgconfig autoreconfHook ]; + nativeBuildInputs = [ pkg-config autoreconfHook ]; buildInputs = [ fastJson libestr json_c zlib pythonPackages.docutils libkrb5 jemalloc postgresql libdbi net-snmp libuuid curl gnutls libgcrypt liblognorm openssl librelp libksi liblogging libnet hadoop rdkafka libmongo-client czmq rabbitmq-c hiredis mongoc libmaxminddb - ] ++ stdenv.lib.optional (libmysqlclient != null) libmysqlclient - ++ stdenv.lib.optional stdenv.isLinux systemd; + ] ++ lib.optional (libmysqlclient != null) libmysqlclient + ++ lib.optional stdenv.isLinux systemd; configureFlags = [ "--sysconfdir=/etc" diff --git a/pkgs/tools/system/runit/default.nix b/pkgs/tools/system/runit/default.nix index acca0acf3ef..2553c07cd6b 100644 --- a/pkgs/tools/system/runit/default.nix +++ b/pkgs/tools/system/runit/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, darwin +{ lib, stdenv, fetchurl, darwin # Build runit-init as a static binary , static ? false @@ -23,15 +23,15 @@ stdenv.mkDerivation rec { doCheck = true; - buildInputs = stdenv.lib.optionals static [ stdenv.cc.libc stdenv.cc.libc.static ] ++ - stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.libs.utmp; + buildInputs = lib.optionals static [ stdenv.cc.libc stdenv.cc.libc.static ] ++ + lib.optional stdenv.isDarwin darwin.apple_sdk.libs.utmp; postPatch = '' sed -i "s,\(#define RUNIT\) .*,\1 \"$out/bin/runit\"," src/runit.h # usernamespace sandbox of nix seems to conflict with runit's assumptions # about unix users. Therefor skip the check sed -i '/.\/chkshsgr/d' src/Makefile - '' + stdenv.lib.optionalString (!static) '' + '' + lib.optionalString (!static) '' sed -i 's,-static,,g' src/Makefile ''; @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { # Both of these are originally hard-coded to gcc echo ${stdenv.cc.targetPrefix}cc > conf-cc - echo ${stdenv.cc.targetPrefix}cc ${stdenv.lib.optionalString stdenv.isDarwin "-Xlinker -x "}> conf-ld + echo ${stdenv.cc.targetPrefix}cc ${lib.optionalString stdenv.isDarwin "-Xlinker -x "}> conf-ld ''; installPhase = '' @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { cp -r ../man $man/share/man/man8 ''; - meta = with stdenv.lib; { + meta = with lib; { description = "UNIX init scheme with service supervision"; license = licenses.bsd3; homepage = "http://smarden.org/runit"; diff --git a/pkgs/tools/system/s-tui/default.nix b/pkgs/tools/system/s-tui/default.nix index 1192a176263..3943a8f4eef 100644 --- a/pkgs/tools/system/s-tui/default.nix +++ b/pkgs/tools/system/s-tui/default.nix @@ -1,4 +1,4 @@ -{ stdenv, python3Packages }: +{ lib, python3Packages }: python3Packages.buildPythonPackage rec { pname = "s-tui"; @@ -16,7 +16,7 @@ python3Packages.buildPythonPackage rec { LC_ALL = "en_US.UTF-8"; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://amanusk.github.io/s-tui/"; description = "Stress-Terminal UI monitoring tool"; license = licenses.gpl2; diff --git a/pkgs/tools/system/s6-rc/default.nix b/pkgs/tools/system/s6-rc/default.nix index 4ddc7fbecc0..532575d16c8 100644 --- a/pkgs/tools/system/s6-rc/default.nix +++ b/pkgs/tools/system/s6-rc/default.nix @@ -1,14 +1,14 @@ -{ stdenv, skawarePackages }: +{ lib, skawarePackages }: with skawarePackages; buildPackage { pname = "s6-rc"; - version = "0.5.1.2"; - sha256 = "18m8jsx3bkj566p6xwwnsvdckk10n8wqnhp0na2k88i295h4rnjp"; + version = "0.5.2.2"; + sha256 = "12bzc483jpd16xmhfsfrib84daj1k3kwy5s5nc18ap60apa1r39a"; description = "A service manager for s6-based systems"; - platforms = stdenv.lib.platforms.linux; + platforms = lib.platforms.linux; outputs = [ "bin" "lib" "dev" "doc" "out" ]; diff --git a/pkgs/tools/system/s6/default.nix b/pkgs/tools/system/s6/default.nix index 3ce97a9d97b..e9d096a7ab0 100644 --- a/pkgs/tools/system/s6/default.nix +++ b/pkgs/tools/system/s6/default.nix @@ -4,8 +4,8 @@ with skawarePackages; buildPackage { pname = "s6"; - version = "2.9.1.0"; - sha256 = "1xqzl2wnvcmcyhppk7mc10h1ac7fkik3i6gpyliwpf3d5i9mkqh5"; + version = "2.10.0.3"; + sha256 = "0mw7blp8dwr09z58m9mrxwmmvvpnjzq9klcf1vgm0hbha4qkf88x"; description = "skarnet.org's small & secure supervision software suite"; diff --git a/pkgs/tools/system/safe-rm/default.nix b/pkgs/tools/system/safe-rm/default.nix index a9fc44e8b40..bac9bb35602 100644 --- a/pkgs/tools/system/safe-rm/default.nix +++ b/pkgs/tools/system/safe-rm/default.nix @@ -1,34 +1,36 @@ -{ stdenv, fetchgit, perl, coreutils }: +{ lib, rustPlatform, fetchgit, coreutils, installShellFiles }: -stdenv.mkDerivation rec { +rustPlatform.buildRustPackage rec { pname = "safe-rm"; - version = "0.12"; + version = "1.1.0"; src = fetchgit { - url = "https://gitorious.org/safe-rm/mainline.git"; + url = "https://git.launchpad.net/safe-rm"; rev = "refs/tags/${pname}-${version}"; - sha256 = "0zkmwxyl1870ar6jr9h537vmqgkckqs9jd1yv6m4qqzdsmg5gdbq"; + sha256 = "sha256-7+4XwsjzLBCQmHDYNwhlN4Yg3eL43GUEbq8ROtuP2Kw="; }; - propagatedBuildInputs = [ perl coreutils ]; + cargoSha256 = "sha256-durb4RTzEun7HPeYfvDJpvO+6L7tNFmAxdIwINbwZrg="; - postFixup = '' - sed -e 's@/bin/rm@${coreutils}/bin/rm@' -i $out/bin/safe-rm + postPatch = '' + substituteInPlace src/main.rs \ + --replace "/bin/rm" "${coreutils}/bin/rm" ''; - installPhase = '' - mkdir -p $out/bin - cp safe-rm $out/bin + nativeBuildInputs = [ installShellFiles ]; - mkdir -p $out/share/man/man1 - pod2man safe-rm > $out/share/man/man1/safe-rm.1 + # uses lots of absolute paths outside of the sandbox + doCheck = false; + + postInstall = '' + installManPage safe-rm.1 ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Tool intended to prevent the accidental deletion of important files"; homepage = "https://launchpad.net/safe-rm"; - license = licenses.gpl3; + license = licenses.gpl3Plus; platforms = platforms.all; - maintainers = [ maintainers.koral ]; + maintainers = with maintainers; [ SuperSandro2000 ]; }; } diff --git a/pkgs/tools/system/safecopy/default.nix b/pkgs/tools/system/safecopy/default.nix index e8db6a2fd39..5533c9a57ff 100644 --- a/pkgs/tools/system/safecopy/default.nix +++ b/pkgs/tools/system/safecopy/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl }: +{ lib, stdenv, fetchurl }: stdenv.mkDerivation rec { name = "safecopy-1.7"; @@ -22,9 +22,9 @@ stdenv.mkDerivation rec { homepage = "http://safecopy.sourceforge.net"; - license = stdenv.lib.licenses.gpl2Plus; + license = lib.licenses.gpl2Plus; - platforms = stdenv.lib.platforms.linux; - maintainers = [ stdenv.lib.maintainers.bluescreen303 ]; + platforms = lib.platforms.linux; + maintainers = [ lib.maintainers.bluescreen303 ]; }; } diff --git a/pkgs/tools/system/setserial/default.nix b/pkgs/tools/system/setserial/default.nix index 68ea32e1e8a..da5d3b2a0d1 100644 --- a/pkgs/tools/system/setserial/default.nix +++ b/pkgs/tools/system/setserial/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, groff }: +{ lib, stdenv, fetchurl, groff }: stdenv.mkDerivation rec { pname = "setserial"; @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { meta = { description = "Serial port configuration utility"; - platforms = stdenv.lib.platforms.linux; - license = stdenv.lib.licenses.gpl2; + platforms = lib.platforms.linux; + license = lib.licenses.gpl2; }; } diff --git a/pkgs/tools/system/sg3_utils/default.nix b/pkgs/tools/system/sg3_utils/default.nix index 45e3287511a..d0084e1f4d8 100644 --- a/pkgs/tools/system/sg3_utils/default.nix +++ b/pkgs/tools/system/sg3_utils/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl }: +{ lib, stdenv, fetchurl }: stdenv.mkDerivation rec { name = "sg3_utils-1.45"; @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "0qasc3qm4i8swjfaywiwpgz76gdxqvm47qycxgmprbsjmxqwk1qb"; }; - meta = with stdenv.lib; { + meta = with lib; { homepage = "http://sg.danny.cz/sg/"; description = "Utilities that send SCSI commands to devices"; platforms = platforms.linux; diff --git a/pkgs/tools/system/sleuthkit/default.nix b/pkgs/tools/system/sleuthkit/default.nix index 8dbc28d3a31..912afb7021c 100644 --- a/pkgs/tools/system/sleuthkit/default.nix +++ b/pkgs/tools/system/sleuthkit/default.nix @@ -1,18 +1,18 @@ -{ stdenv, fetchFromGitHub, autoreconfHook, libewf, afflib, openssl, zlib }: +{ lib, stdenv, fetchFromGitHub, autoreconfHook, libewf, afflib, openssl, zlib }: stdenv.mkDerivation rec { - version = "4.6.5"; + version = "4.10.2"; pname = "sleuthkit"; src = fetchFromGitHub { owner = "sleuthkit"; repo = "sleuthkit"; rev = "${pname}-${version}"; - sha256 = "1q1cdixnfv9v4qlzza8xwdsyvq1vdw6gjgkd41yc1d57ldp1qm0c"; + sha256 = "sha256-N0/spV/Bxk/UNULPot82Vw1uTIxy/Arf84wqUp6W2Tc="; }; postPatch = '' - substituteInPlace tsk/img/ewf.c --replace libewf_handle_read_random libewf_handle_read_buffer_at_offset + substituteInPlace tsk/img/ewf.cpp --replace libewf_handle_read_random libewf_handle_read_buffer_at_offset ''; enableParallelBuilding = true; @@ -26,9 +26,8 @@ stdenv.mkDerivation rec { meta = { description = "A forensic/data recovery tool"; homepage = "https://www.sleuthkit.org/"; - maintainers = [ stdenv.lib.maintainers.raskin ]; - platforms = stdenv.lib.platforms.linux; - license = stdenv.lib.licenses.ipl10; - inherit version; + maintainers = [ lib.maintainers.raskin ]; + platforms = lib.platforms.linux; + license = lib.licenses.ipl10; }; } diff --git a/pkgs/tools/system/smartmontools/default.nix b/pkgs/tools/system/smartmontools/default.nix index 5d9196fcc16..669d1a9fbc6 100644 --- a/pkgs/tools/system/smartmontools/default.nix +++ b/pkgs/tools/system/smartmontools/default.nix @@ -1,43 +1,43 @@ -{ stdenv, fetchurl, autoreconfHook -, mailutils, inetutils -, IOKit ? null , ApplicationServices ? null }: +{ lib, stdenv, fetchurl, autoreconfHook +, mailutils, enableMail ? true +, inetutils +, IOKit, ApplicationServices }: let - version = "7.1"; - - dbrev = "5062"; - drivedbBranch = "RELEASE_7_0_DRIVEDB"; + dbrev = "5171"; + drivedbBranch = "RELEASE_7_2_DRIVEDB"; driverdb = fetchurl { url = "https://sourceforge.net/p/smartmontools/code/${dbrev}/tree/branches/${drivedbBranch}/smartmontools/drivedb.h?format=raw"; - sha256 = "0gggl55h9gq0z846ndhyd7xrpxh8lqfbidblx0598q2wlh9rvlww"; + sha256 = "0vncr98xagbcfsxgfgxsip2qrl9q3y8va19qhv6yknlwbdfap4mn"; name = "smartmontools-drivedb.h"; }; in stdenv.mkDerivation rec { pname = "smartmontools"; - inherit version; + version = "7.2"; src = fetchurl { url = "mirror://sourceforge/smartmontools/${pname}-${version}.tar.gz"; - sha256 = "0imqb7ka4ia5573w8rnpck571pjjc9698pdjcapy9cfyk4n4swrz"; + sha256 = "1mlc25sd5rgj5xmzcllci47inmfdw7cp185fday6hc9rwqkqmnaw"; }; patches = [ ./smartmontools.patch ]; postPatch = "cp -v ${driverdb} drivedb.h"; configureFlags = [ - "--with-scriptpath=${stdenv.lib.makeBinPath [ mailutils inetutils ]}" + "--with-scriptpath=${lib.makeBinPath ([ inetutils ] ++ lib.optional enableMail mailutils)}" ]; nativeBuildInputs = [ autoreconfHook ]; - buildInputs = [] ++ stdenv.lib.optionals stdenv.isDarwin [IOKit ApplicationServices]; + buildInputs = [] ++ lib.optionals stdenv.isDarwin [IOKit ApplicationServices]; enableParallelBuilding = true; - meta = with stdenv.lib; { + meta = with lib; { description = "Tools for monitoring the health of hard drives"; homepage = "https://www.smartmontools.org/"; license = licenses.gpl2Plus; maintainers = with maintainers; [ peti Frostman ]; platforms = with platforms; linux ++ darwin; + mainProgram = "smartctl"; }; } diff --git a/pkgs/tools/system/snooze/default.nix b/pkgs/tools/system/snooze/default.nix new file mode 100644 index 00000000000..bfe91c6e0e8 --- /dev/null +++ b/pkgs/tools/system/snooze/default.nix @@ -0,0 +1,19 @@ +{ lib, stdenv, fetchFromGitHub }: +stdenv.mkDerivation rec { + pname = "snooze"; + version = "0.5"; + src = fetchFromGitHub { + owner = "leahneukirchen"; + repo = "snooze"; + rev = "v${version}"; + sha256 = "sha256-K77axli/mapUr3yxpmUfFq4iWwgRmEVUlP6+/0Iezwo="; + }; + makeFlags = [ "DESTDIR=$(out)" "PREFIX=/" ]; + + meta = with lib; { + description = "Tool for waiting until a particular time and then running a command"; + maintainers = with maintainers; [ kaction ]; + license = licenses.cc0; + platforms = platforms.unix; + }; +} diff --git a/pkgs/tools/system/socklog/default.nix b/pkgs/tools/system/socklog/default.nix index cf7fbe5e9a1..a87beb14a84 100644 --- a/pkgs/tools/system/socklog/default.nix +++ b/pkgs/tools/system/socklog/default.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchurl }: +{ lib, stdenv, fetchurl }: -with stdenv.lib; +with lib; stdenv.mkDerivation rec { pname = "socklog"; @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { echo "$NIX_CC/bin/cc -s" >src/conf-ld ''; - buildPhase = ''package/compile''; + buildPhase = "package/compile"; installPhase = '' mkdir -p $out/bin @@ -45,7 +45,7 @@ stdenv.mkDerivation rec { mv doc/*.html $doc/share/doc/socklog/html/ ''; - checkPhase = ''package/check''; + checkPhase = "package/check"; doCheck = true; diff --git a/pkgs/tools/system/stress-ng/default.nix b/pkgs/tools/system/stress-ng/default.nix index d9953b7cdb5..8065355383a 100644 --- a/pkgs/tools/system/stress-ng/default.nix +++ b/pkgs/tools/system/stress-ng/default.nix @@ -1,14 +1,14 @@ -{ stdenv, fetchurl +{ lib, stdenv, fetchurl , attr, judy, keyutils, libaio, libapparmor, libbsd, libcap, libgcrypt, lksctp-tools, zlib }: stdenv.mkDerivation rec { pname = "stress-ng"; - version = "0.11.14"; + version = "0.12.11"; src = fetchurl { url = "https://kernel.ubuntu.com/~cking/tarballs/${pname}/${pname}-${version}.tar.xz"; - sha256 = "0sqka2ns9xqma9wa67in4vrd15q0rz62gblmzniq5i4xppykc55j"; + sha256 = "sha256-lxOTB1Mhwkw9V2ms+rtwWRHR9BHO1ZN7fP6lhSjBtOY="; }; postPatch = '' @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { # All platforms inputs then Linux-only ones buildInputs = [ judy libbsd libgcrypt zlib ] - ++ stdenv.lib.optionals stdenv.hostPlatform.isLinux [ + ++ lib.optionals stdenv.hostPlatform.isLinux [ attr keyutils libaio libapparmor libcap lksctp-tools ]; @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { "BASHDIR=${placeholder "out"}/share/bash-completion/completions" ]; - NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.hostPlatform.isMusl "-D_LINUX_SYSINFO_H=1"; + NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isMusl "-D_LINUX_SYSINFO_H=1"; # Won't build on i686 because the binary will be linked again in the # install phase without checking the dependencies. This will prevent @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { # mystery, though. :-( enableParallelBuilding = (!stdenv.isi686); - meta = with stdenv.lib; { + meta = with lib; { description = "Stress test a computer system"; longDescription = '' stress-ng will stress test a computer system in various selectable ways. It diff --git a/pkgs/tools/system/stress/default.nix b/pkgs/tools/system/stress/default.nix index 1595e8347e1..33fbd15c5e6 100644 --- a/pkgs/tools/system/stress/default.nix +++ b/pkgs/tools/system/stress/default.nix @@ -1,14 +1,14 @@ -{ stdenv, fetchurl }: +{ lib, stdenv, fetchurl }: stdenv.mkDerivation rec { name = "stress-1.0.4"; - + src = fetchurl { url = "https://people.seas.harvard.edu/~apw/stress/${name}.tar.gz"; sha256 = "0nw210jajk38m3y7h8s130ps2qsbz7j75wab07hi2r3hlz14yzh5"; }; - meta = with stdenv.lib; { + meta = with lib; { description = "Simple workload generator for POSIX systems. It imposes a configurable amount of CPU, memory, I/O, and disk stress on the system"; license = licenses.gpl2; platforms = platforms.unix; diff --git a/pkgs/tools/system/stressapptest/default.nix b/pkgs/tools/system/stressapptest/default.nix new file mode 100644 index 00000000000..9b7eb0a6f3e --- /dev/null +++ b/pkgs/tools/system/stressapptest/default.nix @@ -0,0 +1,27 @@ +{ lib +, stdenv +, fetchFromGitHub +, libaio +}: + +stdenv.mkDerivation rec { + pname = "stressapptest"; + version = "1.0.9"; + + src = fetchFromGitHub { + owner = pname; + repo = pname; + rev = "v${version}"; + sha256 = "1qzj6h6adx042rb9aiz916jna269whibvj5ys4p5nwdp17fqh922"; + }; + + buildInputs = [ libaio ]; + + meta = with lib; { + description = "Userspace memory and IO stress test tool"; + homepage = "https://github.com/stressapptest/stressapptest"; + license = with licenses; [ asl20 ]; + maintainers = with lib.maintainers; [ fab ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/tools/system/suid-chroot/default.nix b/pkgs/tools/system/suid-chroot/default.nix index 9697748e056..e12b0d82861 100644 --- a/pkgs/tools/system/suid-chroot/default.nix +++ b/pkgs/tools/system/suid-chroot/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl }: +{ lib, stdenv, fetchurl }: stdenv.mkDerivation rec { pname = "suid-chroot"; @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { sed -i -e '/chmod u+s/d' Makefile ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Setuid-safe wrapper for chroot"; license = licenses.gpl2Plus; platforms = with platforms; unix; diff --git a/pkgs/tools/system/supervise/default.nix b/pkgs/tools/system/supervise/default.nix index cbf96818f48..3d69faf7bd4 100644 --- a/pkgs/tools/system/supervise/default.nix +++ b/pkgs/tools/system/supervise/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchzip }: +{ lib, stdenv, fetchzip }: stdenv.mkDerivation rec { @@ -10,11 +10,11 @@ stdenv.mkDerivation rec { sha256 = "0jk6q2f67pfs18ah040lmsbvbrnjap7w04jjddsfn1j5bcrvs13x"; }; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://github.com/catern/supervise"; description = "A minimal unprivileged process supervisor making use of modern Linux features"; platforms = platforms.linux; license = licenses.gpl3; - maintainers = with stdenv.lib.maintainers; [ catern ]; + maintainers = with lib.maintainers; [ catern ]; }; } diff --git a/pkgs/tools/system/symlinks/default.nix b/pkgs/tools/system/symlinks/default.nix index 93a6bbf0c75..ad275a2d447 100644 --- a/pkgs/tools/system/symlinks/default.nix +++ b/pkgs/tools/system/symlinks/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, stdenv }: +{ fetchurl, lib, stdenv }: stdenv.mkDerivation rec { pname = "symlinks"; @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { cp symlinks.8 $out/share/man/man8 ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Find and remedy problematic symbolic links on a system"; homepage = "https://github.com/brandt/symlinks"; license = licenses.mit; diff --git a/pkgs/tools/system/syslog-ng-incubator/default.nix b/pkgs/tools/system/syslog-ng-incubator/default.nix index 5d802dbed7e..0f8db091d61 100644 --- a/pkgs/tools/system/syslog-ng-incubator/default.nix +++ b/pkgs/tools/system/syslog-ng-incubator/default.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, glib, syslogng -, eventlog, perl, python, yacc, protobufc, libivykis, libcap, czmq +{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, glib, syslogng +, eventlog, perl, python, bison, protobufc, libivykis, libcap, czmq }: stdenv.mkDerivation rec { @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { sha256 = "17y85cqcyfbp882gaii731cvz5bg1s8rgda271jh6kgnrz5rbd4s"; }; - nativeBuildInputs = [ pkgconfig autoreconfHook yacc ]; + nativeBuildInputs = [ pkg-config autoreconfHook bison ]; buildInputs = [ glib syslogng eventlog perl python protobufc libivykis libcap czmq @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { "--with-module-dir=$(out)/lib/syslog-ng" ]; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://github.com/balabit/syslog-ng-incubator"; description = "A collection of tools and modules for syslog-ng"; license = licenses.gpl2; diff --git a/pkgs/tools/system/syslog-ng/default.nix b/pkgs/tools/system/syslog-ng/default.nix index eeb2a99740e..41da0b99fd9 100644 --- a/pkgs/tools/system/syslog-ng/default.nix +++ b/pkgs/tools/system/syslog-ng/default.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchurl, openssl, libcap, curl, which -, eventlog, pkgconfig, glib, python, systemd, perl +{ lib, stdenv, fetchurl, openssl, libcap, curl, which +, eventlog, pkg-config, glib, python, systemd, perl , riemann_c_client, protobufc, pcre, libnet , json_c, libuuid, libivykis, mongoc, rabbitmq-c , libesmtp @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { sha256 = "1s56q8k69sdrqsh3y9lr4di01fqw7xb49wr0dz75jmz084yg8kmg"; }; - nativeBuildInputs = [ pkgconfig which ]; + nativeBuildInputs = [ pkg-config which ]; buildInputs = [ libcap @@ -54,7 +54,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://www.syslog-ng.com"; description = "Next-generation syslogd with advanced networking and filtering capabilities"; license = licenses.gpl2; diff --git a/pkgs/tools/system/systemd-journal2gelf/default.nix b/pkgs/tools/system/systemd-journal2gelf/default.nix index 3f23624071f..62a7c9d8aea 100644 --- a/pkgs/tools/system/systemd-journal2gelf/default.nix +++ b/pkgs/tools/system/systemd-journal2gelf/default.nix @@ -1,20 +1,20 @@ -{ stdenv, buildGoPackage, fetchFromGitHub }: +{ lib, buildGoPackage, fetchFromGitHub }: buildGoPackage rec { pname = "SystemdJournal2Gelf-unstable"; - version = "20190702"; + version = "20200813"; src = fetchFromGitHub { - rev = "b1aa5ff31307d11a3c9b4dd08c3cd6230d935ec5"; + rev = "d389dc8583b752cbd37c389a55a6c82200e47394"; owner = "parse-nl"; repo = "SystemdJournal2Gelf"; - sha256 = "13jyh34wprjixinmh6l7wj7lr1f6qy6nrjcf8l29a74mczbphnvv"; + sha256 = "0p38r5kdfcn6n2d44dygrs5xgv51s5qlsfhzzwn16r3n6x91s62b"; fetchSubmodules = true; }; goPackagePath = "github.com/parse-nl/SystemdJournal2Gelf"; - meta = with stdenv.lib; { + meta = with lib; { description = "Export entries from systemd's journal and send them to a graylog server using gelf"; license = licenses.bsd2; maintainers = with maintainers; [ fadenb fpletz ]; diff --git a/pkgs/tools/system/taskspooler/default.nix b/pkgs/tools/system/taskspooler/default.nix new file mode 100644 index 00000000000..9899a9fb3f6 --- /dev/null +++ b/pkgs/tools/system/taskspooler/default.nix @@ -0,0 +1,31 @@ +{ stdenv, lib, fetchurl, makeWrapper, coreutils }: + +stdenv.mkDerivation rec { + pname = "taskspooler"; + version = "1.0.1"; + + src = fetchurl { + url = "https://vicerveza.homeunix.net/%7Eviric/wsgi-bin/hgweb.wsgi/ts/archive/7cf9a8bda6d3.tar.gz"; + sha256 = "11i21s8sdmjl4gy5f3dyfsxsmg1japgs4r5ym0b3jdyp99xhpbl1"; + }; + + nativeBuildInputs = [ makeWrapper ]; + + postPatch = '' + substituteInPlace Makefile \ + --replace "PREFIX?=/usr/local" "PREFIX=$out" + ''; + + postFixup = '' + wrapProgram $out/bin/ts \ + --set-default TS_SLOTS "$(${coreutils}/bin/nproc --all)" + ''; + + meta = with lib; { + description = "Simple single node task scheduler"; + license = licenses.gpl2Plus; + homepage = "https://vicerveza.homeunix.net/~viric/wsgi-bin/hgweb.wsgi/ts"; + platforms = platforms.unix; + maintainers = [ maintainers.sheepforce ]; + }; +} diff --git a/pkgs/tools/system/testdisk/default.nix b/pkgs/tools/system/testdisk/default.nix index 223d1102e0d..10cbed47068 100644 --- a/pkgs/tools/system/testdisk/default.nix +++ b/pkgs/tools/system/testdisk/default.nix @@ -1,9 +1,9 @@ { mkDerivation -, stdenv +, lib, stdenv , fetchurl , ncurses , libuuid -, pkgconfig +, pkg-config , libjpeg , zlib , libewf @@ -35,18 +35,18 @@ assert enableQt -> qwt != null; zlib libewf ] - ++ stdenv.lib.optional enableNtfs ntfs3g - ++ stdenv.lib.optional enableExtFs e2fsprogs - ++ stdenv.lib.optionals enableQt [ qtbase qttools qwt ]; + ++ lib.optional enableNtfs ntfs3g + ++ lib.optional enableExtFs e2fsprogs + ++ lib.optionals enableQt [ qtbase qttools qwt ]; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkg-config ]; NIX_CFLAGS_COMPILE="-Wno-unused"; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://www.cgsecurity.org/wiki/Main_Page"; downloadPage = "https://www.cgsecurity.org/wiki/TestDisk_Download"; - description = "Testdisk / Photorec - Data recovery utilities"; + description = "Data recovery utilities"; longDescription = '' TestDisk is a powerful free data recovery software. It was primarily designed to help recover lost partitions and/or make non-booting disks @@ -61,8 +61,8 @@ assert enableQt -> qwt != null; it will still work even if your media's file system has been severely damaged or reformatted. ''; - license = stdenv.lib.licenses.gpl2Plus; - platforms = stdenv.lib.platforms.all; + license = lib.licenses.gpl2Plus; + platforms = lib.platforms.all; maintainers = with maintainers; [ fgaz eelco ]; }; } diff --git a/pkgs/tools/system/thermald/default.nix b/pkgs/tools/system/thermald/default.nix index c0a94457e6a..4d2ca811837 100644 --- a/pkgs/tools/system/thermald/default.nix +++ b/pkgs/tools/system/thermald/default.nix @@ -1,42 +1,73 @@ -{ stdenv, fetchFromGitHub, autoconf, automake, libtool -, pkgconfig, dbus, dbus-glib, libxml2, autoconf-archive }: +{ autoconf +, autoconf-archive +, automake +, dbus +, dbus-glib +, docbook_xml_dtd_412 +, docbook-xsl-nons +, fetchFromGitHub +, gtk-doc +, libevdev +, libtool +, libxml2 +, xz +, pkg-config +, lib, stdenv +, upower +}: stdenv.mkDerivation rec { pname = "thermald"; - version = "2.2"; + version = "2.4.3"; + + outputs = [ "out" "devdoc" ]; src = fetchFromGitHub { owner = "intel"; repo = "thermal_daemon"; rev = "v${version}"; - sha256 = "1nrhv3bypyc48h9smj5cpq63rawm6vqyg3cwkhpz69rgjnf1283m"; + sha256 = "sha256-CPrk2r3C4WG+y3KzWf6xWhfNdDgEigki62iAXu+DccU="; }; - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ autoconf automake libtool dbus dbus-glib libxml2 autoconf-archive ]; - - patchPhase = ''sed -e 's/upstartconfdir = \/etc\/init/upstartconfdir = $(out)\/etc\/init/' -i data/Makefile.am''; + nativeBuildInputs = [ + autoconf + autoconf-archive + automake + docbook-xsl-nons + docbook_xml_dtd_412 + gtk-doc + libtool + pkg-config + ]; - preConfigure = '' - export PKG_CONFIG_PATH="${dbus.dev}/lib/pkgconfig:$PKG_CONFIG_PATH" - ./autogen.sh - ''; + buildInputs = [ + dbus + dbus-glib + libevdev + libxml2 + xz + upower + ]; configureFlags = [ "--sysconfdir=${placeholder "out"}/etc" "--localstatedir=/var" + "--enable-gtk-doc" "--with-dbus-sys-dir=${placeholder "out"}/share/dbus-1/system.d" "--with-systemdsystemunitdir=${placeholder "out"}/etc/systemd/system" ]; + preConfigure = "NO_CONFIGURE=1 ./autogen.sh"; + postInstall = '' cp ./data/thermal-conf.xml $out/etc/thermald/ ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Thermal Daemon"; homepage = "https://01.org/linux-thermal-daemon"; - license = licenses.gpl2; + changelog = "https://github.com/intel/thermal_daemon/blob/master/README.txt"; + license = licenses.gpl2Plus; platforms = [ "x86_64-linux" "i686-linux" ]; maintainers = with maintainers; [ abbradar ]; }; diff --git a/pkgs/tools/system/thinkfan/default.nix b/pkgs/tools/system/thinkfan/default.nix index 4edcfb63fe5..a53ef4ae9f8 100644 --- a/pkgs/tools/system/thinkfan/default.nix +++ b/pkgs/tools/system/thinkfan/default.nix @@ -1,46 +1,59 @@ -{ stdenv, fetchFromGitHub, cmake, libyamlcpp, pkgconfig -, smartSupport ? false, libatasmart }: +{ lib +, stdenv +, fetchFromGitHub +, cmake +, libyamlcpp +, pkg-config +, procps +, coreutils +, smartSupport ? false, libatasmart +}: stdenv.mkDerivation rec { pname = "thinkfan"; - version = "1.1"; + version = "1.2.2"; src = fetchFromGitHub { owner = "vmatare"; repo = "thinkfan"; rev = version; - sha256 = "1fxd1w3z65glw6y04myn7ihgswkx6sqnkky159mik4n96pfrsvr5"; + sha256 = "01l1pnj1cgy3dwgyys2s5iqzyv6kk47vlpy09qjafk8py21ijik3"; }; + postPatch = '' + # fix hardcoded install path + substituteInPlace CMakeLists.txt --replace /etc $out/etc + + # fix command paths in unit files + for unit in rcscripts/systemd/*; do + substituteInPlace "$unit" \ + --replace /bin/kill ${procps}/bin/kill \ + --replace /usr/bin/pkill ${procps}/bin/pkill \ + --replace /usr/bin/sleep ${coreutils}/bin/sleep + done + ''; + cmakeFlags = [ "-DCMAKE_INSTALL_DOCDIR=share/doc/${pname}" "-DUSE_NVML=OFF" - ] ++ stdenv.lib.optional smartSupport "-DUSE_ATASMART=ON"; - - nativeBuildInputs = [ cmake pkgconfig ]; - - buildInputs = [ libyamlcpp ] ++ stdenv.lib.optional smartSupport libatasmart; - - installPhase = '' - runHook preInstall - - install -Dm755 {.,$out/bin}/thinkfan - - cd "$NIX_BUILD_TOP"; cd "$sourceRoot" # attempt to be a bit robust - install -Dm644 {.,$out/share/doc/thinkfan}/README - cp -R examples $out/share/doc/thinkfan - install -Dm644 {src,$out/share/man/man1}/thinkfan.1 - - runHook postInstall - ''; - - meta = with stdenv.lib; { - description = "A minimalist fan control program. Originally designed -specifically for IBM/Lenovo Thinkpads, it now supports any kind of system via -the sysfs hwmon interface (/sys/class/hwmon)."; - license = licenses.gpl3; + # force install unit files + "-DSYSTEMD_FOUND=ON" + ] ++ lib.optional smartSupport "-DUSE_ATASMART=ON"; + + nativeBuildInputs = [ cmake pkg-config ]; + + buildInputs = [ libyamlcpp ] ++ lib.optional smartSupport libatasmart; + + meta = { + description = "A simple, lightweight fan control program"; + longDescription = '' + Thinkfan is a minimalist fan control program. Originally designed + specifically for IBM/Lenovo Thinkpads, it now supports any kind of + system via the sysfs hwmon interface (/sys/class/hwmon). + ''; + license = lib.licenses.gpl3Plus; homepage = "https://github.com/vmatare/thinkfan"; - maintainers = with maintainers; [ domenkozar ]; - platforms = platforms.linux; + maintainers = with lib.maintainers; [ domenkozar rnhmjoj ]; + platforms = lib.platforms.linux; }; } diff --git a/pkgs/tools/system/throttled/default.nix b/pkgs/tools/system/throttled/default.nix index 71bb6dfb357..9b92635d1d7 100644 --- a/pkgs/tools/system/throttled/default.nix +++ b/pkgs/tools/system/throttled/default.nix @@ -1,14 +1,14 @@ -{ stdenv, fetchFromGitHub, python3Packages }: +{ lib, stdenv, fetchFromGitHub, python3Packages }: stdenv.mkDerivation rec { pname = "throttled"; - version = "0.7"; + version = "0.8"; src = fetchFromGitHub { owner = "erpalma"; repo = pname; rev = "v${version}"; - sha256 = "1y1sczvj2qc8ml9i1rdzr8hklvci9bdphm3mmri2ncaqys8wdbh4"; + sha256 = "0qw124gdgjqij3xhgg8j1mdsg6j0xg340as5qf8hd3gwc38sqi9x"; }; nativeBuildInputs = [ python3Packages.wrapPython ]; @@ -31,9 +31,9 @@ stdenv.mkDerivation rec { runHook postInstall ''; - postFixup = ''wrapPythonPrograms''; + postFixup = "wrapPythonPrograms"; - meta = with stdenv.lib; { + meta = with lib; { description = "Fix for Intel CPU throttling issues"; homepage = "https://github.com/erpalma/throttled"; license = licenses.mit; diff --git a/pkgs/tools/system/tm/default.nix b/pkgs/tools/system/tm/default.nix index 390eae4de50..19ade9b929c 100644 --- a/pkgs/tools/system/tm/default.nix +++ b/pkgs/tools/system/tm/default.nix @@ -1,26 +1,28 @@ -{stdenv, fetchurl}: +{ lib +, stdenv +, fetchurl +}: -stdenv.mkDerivation { +stdenv.mkDerivation rec { + pname = "tm"; + version = "0.4.1"; - name = "tm-0.4.1"; + src = fetchurl { + url = "https://vicerveza.homeunix.net/~viric/soft/tm/tm-${version}.tar.gz"; + sha256 = "3b389bc03b6964ad5ffa57a344b891fdbcf7c9b2604adda723a863f83657c4a0"; + }; - installPhase=''make install "PREFIX=$out"''; + makeFlags = [ "PREFIX=$(out)" ]; - patchPhase = '' + postPatch = '' sed -i 's@/usr/bin/install@install@g ; s/gcc/cc/g' Makefile ''; - src = fetchurl { - url = "http://vicerveza.homeunix.net/~viric/soft/tm/tm-0.4.1.tar.gz"; - sha256 = "3b389bc03b6964ad5ffa57a344b891fdbcf7c9b2604adda723a863f83657c4a0"; - }; - - meta = with stdenv.lib; { - homepage = "http://vicerveza.homeunix.net/~viric/soft/tm"; + meta = with lib; { description = "Terminal mixer - multiplexer for the i/o of terminal applications"; - license = licenses.gpl2; + homepage = "http://vicerveza.homeunix.net/~viric/soft/tm"; + license = licenses.gpl2Plus; maintainers = with maintainers; [ viric ]; platforms = platforms.all; }; - } diff --git a/pkgs/tools/system/tre-command/default.nix b/pkgs/tools/system/tre-command/default.nix index d0f81414741..85b4f9fe2ac 100644 --- a/pkgs/tools/system/tre-command/default.nix +++ b/pkgs/tools/system/tre-command/default.nix @@ -1,17 +1,17 @@ -{ rustPlatform, fetchFromGitHub, stdenv, installShellFiles }: +{ rustPlatform, fetchFromGitHub, lib, installShellFiles }: rustPlatform.buildRustPackage rec { pname = "tre-command"; - version = "0.3.2"; + version = "0.3.6"; src = fetchFromGitHub { owner = "dduan"; repo = "tre"; rev = "v${version}"; - sha256 = "1kb8jwmjhlp9bk08rb6gq3j810cv9bidm28sa417vyykp9a8p2ky"; + sha256 = "1r84xzv3p0ml3wac2j7j5fkm7i93v2xvadb8f8al5wi57q39irj7"; }; - cargoSha256 = "0cqkpvq8b2vnqpkd819cdgh4fqr9yns337fgzah4m40ygs25n9iv"; + cargoSha256 = "1f7yhnbgccqmz8hpc1xdv97j53far6d5p5gqvq6xxaqq9irf9bgj"; nativeBuildInputs = [ installShellFiles ]; @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec { installManPage manual/tre.1 ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Tree command, improved"; homepage = "https://github.com/dduan/tre"; license = licenses.mit; diff --git a/pkgs/tools/system/tree/default.nix b/pkgs/tools/system/tree/default.nix index 24d11a9c0ee..ab76de74762 100644 --- a/pkgs/tools/system/tree/default.nix +++ b/pkgs/tools/system/tree/default.nix @@ -1,8 +1,6 @@ -{ stdenv, fetchurl }: +{ lib, stdenv, fetchurl }: let - version = "1.8.0"; - # These settings are found in the Makefile, but there seems to be no # way to select one ore the other setting other than editing the file # manually, so we have to duplicate the know how here. @@ -23,9 +21,9 @@ let '' else ""; # use linux flags by default in -stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "tree"; - inherit version; + version = "1.8.0"; src = fetchurl { url = "http://mama.indstate.edu/users/ice/tree/src/tree-${version}.tgz"; @@ -45,7 +43,7 @@ stdenv.mkDerivation { meta = { homepage = "http://mama.indstate.edu/users/ice/tree/"; description = "Command to produce a depth indented directory listing"; - license = stdenv.lib.licenses.gpl2; + license = lib.licenses.gpl2; longDescription = '' Tree is a recursive directory listing command that produces a @@ -53,7 +51,7 @@ stdenv.mkDerivation { the LS_COLORS environment variable is set and output is to tty. ''; - platforms = stdenv.lib.platforms.all; - maintainers = [stdenv.lib.maintainers.peti]; + platforms = lib.platforms.all; + maintainers = [lib.maintainers.peti]; }; } diff --git a/pkgs/tools/system/ts/default.nix b/pkgs/tools/system/ts/default.nix index 4046b363811..b954b1adc01 100644 --- a/pkgs/tools/system/ts/default.nix +++ b/pkgs/tools/system/ts/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl +{ lib, stdenv, fetchurl , sendmailPath ? "/run/wrappers/bin/sendmail" }: @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { sha256 = "15dkzczx10fhl0zs9bmcgkxfbwq2znc7bpscljm4rchbzx7y6lsg"; }; - meta = with stdenv.lib; { + meta = with lib; { homepage = "http://vicerveza.homeunix.net/~viric/soft/ts"; description = "Task spooler - batch queue"; license = licenses.gpl2; diff --git a/pkgs/tools/system/tuptime/default.nix b/pkgs/tools/system/tuptime/default.nix index abfc8ae5ac8..0d3b6f4d6b8 100644 --- a/pkgs/tools/system/tuptime/default.nix +++ b/pkgs/tools/system/tuptime/default.nix @@ -1,16 +1,16 @@ -{ stdenv, fetchFromGitHub +{ lib, stdenv, fetchFromGitHub , makeWrapper, installShellFiles , python3, sqlite }: stdenv.mkDerivation rec { pname = "tuptime"; - version = "5.0.0"; + version = "5.0.2"; src = fetchFromGitHub { owner = "rfrail3"; repo = "tuptime"; rev = version; - sha256 = "0izps85p8pxidfrzp7l4hp221fx3dcgapapsix1zavq6jrsl2qyh"; + sha256 = "sha256-2Q1czKvwdVq+2+64k4SOghw05CUlT5HdZpvKMRbGdDY="; }; nativeBuildInputs = [ makeWrapper installShellFiles ]; @@ -31,13 +31,13 @@ stdenv.mkDerivation rec { preFixup = '' wrapProgram $out/share/tuptime/db-tuptime-migrate-4.0-to-5.0.sh \ - --prefix PATH : "${stdenv.lib.makeBinPath [ sqlite ]}" + --prefix PATH : "${lib.makeBinPath [ sqlite ]}" ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Total uptime & downtime statistics utility"; homepage = "https://github.com/rfrail3/tuptime"; - license = licenses.gpl2; + license = licenses.gpl2Plus; platforms = platforms.all; maintainers = [ maintainers.evils ]; }; diff --git a/pkgs/tools/system/uefitool/common.nix b/pkgs/tools/system/uefitool/common.nix index 7d5ee82dcf9..7b9c8f2e57d 100644 --- a/pkgs/tools/system/uefitool/common.nix +++ b/pkgs/tools/system/uefitool/common.nix @@ -20,8 +20,10 @@ mkDerivation rec { buildInputs = [ qtbase ]; nativeBuildInputs = [ qmake cmake zip ]; - configurePhase = ":"; - buildPhase = "bash unixbuild.sh"; + dontConfigure = true; + buildPhase = '' + bash unixbuild.sh + ''; installPhase = '' mkdir -p "$out"/bin diff --git a/pkgs/tools/system/uefitool/variants.nix b/pkgs/tools/system/uefitool/variants.nix index 470c8a0ca4d..0e8d7285aab 100644 --- a/pkgs/tools/system/uefitool/variants.nix +++ b/pkgs/tools/system/uefitool/variants.nix @@ -3,8 +3,8 @@ let common = opts: libsForQt5.callPackage (import ./common.nix opts) {}; in rec { new-engine = common rec { - version = "A57"; - sha256 = "0algfdlxfjs582hsqmagbcmw06p8qlh0k5xczfkscs3prdn2vm7n"; + version = "A58"; + sha256 = "131hkyr07fg7rnr938yyj0gk528x3402dhisav221c27v84zb7pn"; installFiles = [ "UEFITool/UEFITool" "UEFIFind/UEFIFind" "UEFIExtract/UEFIExtract" ]; }; old-engine = common rec { diff --git a/pkgs/tools/system/undaemonize/default.nix b/pkgs/tools/system/undaemonize/default.nix index e82ee18b831..45e7a8d6d62 100644 --- a/pkgs/tools/system/undaemonize/default.nix +++ b/pkgs/tools/system/undaemonize/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub }: +{ lib, stdenv, fetchFromGitHub }: stdenv.mkDerivation { name = "undaemonize-2017-07-11"; @@ -14,9 +14,9 @@ stdenv.mkDerivation { meta = { description = "Tiny helper utility to force programs which insist on daemonizing themselves to run in the foreground"; homepage = "https://github.com/nickstenning/undaemonize"; - license = stdenv.lib.licenses.mit; - maintainers = [ stdenv.lib.maintainers.canndrew ]; - platforms = stdenv.lib.platforms.linux; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.canndrew ]; + platforms = lib.platforms.linux; }; } diff --git a/pkgs/tools/system/uptimed/default.nix b/pkgs/tools/system/uptimed/default.nix index e9224977542..5d0d49f198e 100644 --- a/pkgs/tools/system/uptimed/default.nix +++ b/pkgs/tools/system/uptimed/default.nix @@ -1,11 +1,11 @@ -{ stdenv, fetchFromGitHub, autoreconfHook }: +{ lib, stdenv, fetchFromGitHub, autoreconfHook }: stdenv.mkDerivation rec { pname = "uptimed"; - version = "0.4.2"; + version = "0.4.3"; src = fetchFromGitHub { - sha256 = "0wnnpjfxnycigqj6hag0n6p5piss8cv40y9jda72d9s4df5n91z8"; + sha256 = "sha256-X/LnH+EWjXlw8RktfL4ckAUmP2DPV1qlb6Ii4N985cU="; rev = "v${version}"; repo = "uptimed"; owner = "rpodgorny"; @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook ]; patches = [ ./no-var-spool-install.patch ]; - meta = with stdenv.lib; { + meta = with lib; { description = "Uptime record daemon"; longDescription = '' An uptime record daemon keeping track of the highest uptimes a computer @@ -23,8 +23,8 @@ stdenv.mkDerivation rec { which can also easily be used to show your records on a web page. ''; homepage = "https://github.com/rpodgorny/uptimed/"; - license = licenses.gpl2; + license = with licenses; [ gpl2Only lgpl21Plus ]; + maintainers = with maintainers; [ ]; platforms = platforms.linux; }; - } diff --git a/pkgs/tools/system/uroboros/default.nix b/pkgs/tools/system/uroboros/default.nix new file mode 100644 index 00000000000..7f25c70c297 --- /dev/null +++ b/pkgs/tools/system/uroboros/default.nix @@ -0,0 +1,26 @@ +{ lib +, buildGoModule +, fetchFromGitHub +}: + +buildGoModule rec { + pname = "uroboros"; + version = "20210304-${lib.strings.substring 0 7 rev}"; + rev = "9bed95bb4cc44cfd043e8ac192e788df379c7a44"; + + src = fetchFromGitHub { + owner = "evilsocket"; + repo = pname; + inherit rev; + sha256 = "1a1bc2za2ppb7j7ibhykgxwivwmx7yq0593255jd55gl60r0l7i4"; + }; + + vendorSha256 = "1ml3x00zzkwj1f76a4wk2y8z4bxjhadf2p1li96qjpnc8fgfd50l"; + + meta = with lib; { + description = "Tool for monitoring and profiling single processes"; + homepage = "https://github.com/evilsocket/uroboros"; + license = with licenses; [ gpl3Only ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/tools/system/vbetool/default.nix b/pkgs/tools/system/vbetool/default.nix index dc2ec24e594..ebdeae60c38 100644 --- a/pkgs/tools/system/vbetool/default.nix +++ b/pkgs/tools/system/vbetool/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pciutils, libx86, zlib }: +{ lib, stdenv, fetchurl, pciutils, libx86, zlib }: stdenv.mkDerivation rec { pname = "vbetool"; @@ -17,9 +17,9 @@ stdenv.mkDerivation rec { configureFlags = [ "LDFLAGS=-lpci" ]; - meta = with stdenv.lib; { + meta = with lib; { description = "Video BIOS execution tool"; - homepage = "http://www.codon.org.uk/~mjg59/vbetool/"; + homepage = "https://www.codon.org.uk/~mjg59/vbetool/"; maintainers = [ maintainers.raskin ]; platforms = platforms.linux; license = licenses.gpl2; diff --git a/pkgs/tools/system/vboot_reference/default.nix b/pkgs/tools/system/vboot_reference/default.nix index 1391a2a5ed2..b4b92b8f90f 100644 --- a/pkgs/tools/system/vboot_reference/default.nix +++ b/pkgs/tools/system/vboot_reference/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitiles, pkgconfig, libuuid, openssl, libyaml, lzma }: +{ lib, stdenv, fetchFromGitiles, pkg-config, libuuid, openssl, libyaml, xz }: stdenv.mkDerivation rec { version = "20180311"; @@ -12,8 +12,8 @@ stdenv.mkDerivation rec { sha256 = "1zja4ma6flch08h5j2l1hqnxmw2xwylidnddxxd5y2x05dai9ddj"; }; - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ openssl libuuid libyaml lzma ]; + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ openssl libuuid libyaml xz ]; enableParallelBuilding = true; @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { cp -r tests/devkeys* $out/share/vboot/ ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Chrome OS partitioning and kernel signing tools"; license = licenses.bsd3; platforms = platforms.linux; diff --git a/pkgs/tools/system/which/default.nix b/pkgs/tools/system/which/default.nix index 79a50e43ed8..f4c871d5af0 100644 --- a/pkgs/tools/system/which/default.nix +++ b/pkgs/tools/system/which/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl }: +{ lib, stdenv, fetchurl }: stdenv.mkDerivation rec { name = "which-2.21"; @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "1bgafvy3ypbhhfznwjv1lxmd6mci3x1byilnnkc7gcr486wlb8pl"; }; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://www.gnu.org/software/which/"; description = "Shows the full path of (shell) commands"; platforms = platforms.all; diff --git a/pkgs/tools/system/wslu/default.nix b/pkgs/tools/system/wslu/default.nix new file mode 100644 index 00000000000..cab427e1657 --- /dev/null +++ b/pkgs/tools/system/wslu/default.nix @@ -0,0 +1,23 @@ +{ lib, stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + pname = "wslu"; + version = "3.2.3"; + + src = fetchFromGitHub { + owner = "wslutilities"; + repo = pname; + rev = "v${version}"; + sha512 = "2mkvdl65hnwflmi635ngmsm1aqsablz2gypn3a1adby1mwwdc57xym8kkg5359g3mvksac6n43ji2z48lfpvlay64z793q2v0z6by02"; + }; + + makeFlags = [ "PREFIX=$(out)" ]; + + meta = with lib; { + description = "A collection of utilities for Windows 10 Linux Subsystems"; + homepage = "https://github.com/wslutilities/wslu"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ jamiemagee ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/tools/system/wsmancli/default.nix b/pkgs/tools/system/wsmancli/default.nix index 79fb92d5bb2..ac6a561bb0a 100644 --- a/pkgs/tools/system/wsmancli/default.nix +++ b/pkgs/tools/system/wsmancli/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig +{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config , openssl, openwsman }: stdenv.mkDerivation rec { @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { sha256 = "0a67fz9lj7xkyfqim6ai9kj7v6hzx94r1bg0g0l5dymgng648b9j"; }; - nativeBuildInputs = [ autoreconfHook pkgconfig ]; + nativeBuildInputs = [ autoreconfHook pkg-config ]; buildInputs = [ openwsman openssl ]; @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { touch AUTHORS NEWS README ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Openwsman command-line client"; longDescription = '' Openwsman provides a command-line tool, wsman, to perform basic @@ -31,6 +31,5 @@ stdenv.mkDerivation rec { ''; downloadPage = "https://github.com/Openwsman/wsmancli/releases"; inherit (openwsman.meta) homepage license maintainers platforms; - inherit version; }; } diff --git a/pkgs/tools/system/yeshup/default.nix b/pkgs/tools/system/yeshup/default.nix index 3242eeaeebc..113d17b09b5 100644 --- a/pkgs/tools/system/yeshup/default.nix +++ b/pkgs/tools/system/yeshup/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub }: +{ lib, stdenv, fetchFromGitHub }: stdenv.mkDerivation rec { pname = "yeshup"; @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { cp -v yeshup $out/bin ''; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://github.com/RhysU/yeshup"; platforms = platforms.linux; license = licenses.cc-by-sa-30; # From Stackoverflow answer diff --git a/pkgs/tools/system/ytop/default.nix b/pkgs/tools/system/ytop/default.nix deleted file mode 100644 index 64c3bf93aaa..00000000000 --- a/pkgs/tools/system/ytop/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ stdenv, rustPlatform, fetchFromGitHub, IOKit }: - -assert stdenv.isDarwin -> IOKit != null; - -rustPlatform.buildRustPackage rec { - pname = "ytop"; - version = "0.6.2"; - - src = fetchFromGitHub { - owner = "cjbassi"; - repo = pname; - rev = version; - sha256 = "02cpn5257yrmbakx3mlqs97kfambbn9ljb60jbqr1b9w24kd6zgf"; - }; - - buildInputs = stdenv.lib.optionals stdenv.isDarwin [ IOKit ]; - - cargoSha256 = "0alqzy9gbj9m4l7xj1jsrnl09pv6z7c73gq787cqwn0gj93aaj19"; - - meta = with stdenv.lib; { - description = "A TUI system monitor written in Rust"; - homepage = "https://github.com/cjbassi/ytop"; - license = licenses.mit; - maintainers = with maintainers; [ sikmir ]; - platforms = platforms.unix; - }; -} diff --git a/pkgs/tools/system/zenith/default.nix b/pkgs/tools/system/zenith/default.nix index 6e3024a3f7d..1e36614c427 100644 --- a/pkgs/tools/system/zenith/default.nix +++ b/pkgs/tools/system/zenith/default.nix @@ -1,26 +1,42 @@ -{ stdenv, rustPlatform, fetchFromGitHub, IOKit }: +{ lib +, stdenv +, rustPlatform +, fetchFromGitHub +, IOKit +, nvidiaSupport ? false +, makeWrapper +}: rustPlatform.buildRustPackage rec { pname = "zenith"; - version = "0.10.0"; + version = "0.12.0"; src = fetchFromGitHub { owner = "bvaisvil"; repo = pname; rev = version; - sha256 = "04nd5gq49y1k9xxrc9ll155k9j42ivscjzx405qyyxv7dpgyw131"; + sha256 = "1bn364rmp0q86rd7vgv4n7x09cdf9m4njcaq92jnk85ni6h147ax"; }; - cargoSha256 = "0ggpr2skl3d47y771npmbbqb9vga4y4iyry3qn0xj2hg9d7msf4l"; + cargoBuildFlags = lib.optionals nvidiaSupport [ "--features" "nvidia" ]; + cargoSha256 = "0c2mk2bcz4qjyqmf11yqhnhy4pqxr77b3c1gvr5jfmjshx4ff7v2"; - buildInputs = stdenv.lib.optionals stdenv.isDarwin [ IOKit ]; + nativeBuildInputs = lib.optional nvidiaSupport makeWrapper; + buildInputs = lib.optionals stdenv.isDarwin [ IOKit ]; - meta = with stdenv.lib; { - description = "Sort of like top or htop but with zoom-able charts, network, and disk usage"; + postInstall = lib.optionalString nvidiaSupport '' + wrapProgram $out/bin/zenith \ + --suffix LD_LIBRARY_PATH : "/run/opengl-driver/lib" + ''; + + meta = with lib; { + description = "Sort of like top or htop but with zoom-able charts, network, and disk usage" + + lib.optionalString nvidiaSupport ", and NVIDIA GPU usage"; homepage = "https://github.com/bvaisvil/zenith"; license = licenses.mit; maintainers = with maintainers; [ bbigras ]; # doesn't build on aarch64 https://github.com/bvaisvil/zenith/issues/19 + # see https://github.com/NixOS/nixpkgs/pull/88616 platforms = platforms.x86; }; } |