uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
31
pkgs/tools/system/acct/default.nix
Normal file
31
pkgs/tools/system/acct/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ fetchurl, lib, stdenv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "acct";
|
||||
version = "6.6.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/acct/acct-${version}.tar.gz";
|
||||
sha256 = "0gv6m8giazshvgpvwbng98chpas09myyfw1zr2y7hqxib0mvy5ac";
|
||||
};
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "GNU Accounting Utilities, login and process accounting utilities";
|
||||
|
||||
longDescription = ''
|
||||
The GNU Accounting Utilities provide login and process accounting
|
||||
utilities for GNU/Linux and other systems. It is a set of utilities
|
||||
which reports and summarizes data about user connect times and process
|
||||
execution statistics.
|
||||
'';
|
||||
|
||||
license = licenses.gpl3Plus;
|
||||
|
||||
homepage = "https://www.gnu.org/software/acct/";
|
||||
|
||||
maintainers = with maintainers; [ pSub ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
46
pkgs/tools/system/acpica-tools/default.nix
Normal file
46
pkgs/tools/system/acpica-tools/default.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, bison
|
||||
, flex
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "acpica-tools";
|
||||
version = "20220331";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://acpica.org/sites/acpica/files/acpica-unix-${version}.tar.gz";
|
||||
hash = "sha256-rK/2ixTx4IBOu/xLlyaKTMvvz6BTsC7Zkk8rFNipjiE=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ bison flex ];
|
||||
|
||||
buildFlags = [
|
||||
"acpibin"
|
||||
"acpidump"
|
||||
"acpiexamples"
|
||||
"acpiexec"
|
||||
"acpihelp"
|
||||
"acpisrc"
|
||||
"acpixtract"
|
||||
"iasl"
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-O3";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
# We can handle stripping ourselves.
|
||||
INSTALLFLAGS = "-m 555";
|
||||
|
||||
installFlags = [ "PREFIX=${placeholder "out"}" ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.acpica.org/";
|
||||
description = "ACPICA Tools";
|
||||
license = with licenses; [ iasl gpl2Only bsd3 ];
|
||||
maintainers = with maintainers; [ tadfisher ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
35
pkgs/tools/system/actkbd/default.nix
Normal file
35
pkgs/tools/system/actkbd/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ fetchurl, lib, stdenv }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "actkbd";
|
||||
version = "0.2.8";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://users.softlab.ece.ntua.gr/~thkala/projects/actkbd/files/actkbd-${version}.tar.bz2";
|
||||
sha256 = "1ipb7k5q7k7p54is96ij2n74jfa6xc0llb9lpjwxhsqviqxn9slm";
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace /usr/local $out \
|
||||
--replace /etc $out/etc
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/share/doc/actkbd
|
||||
cp -r README samples $out/share/doc/actkbd
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A keyboard shortcut daemon";
|
||||
longDescription = ''
|
||||
actkbd is a simple daemon that binds actions to keyboard events
|
||||
directly on evdev interface (that is, no X11 required). It
|
||||
recognises key combinations and can handle press, repeat and
|
||||
release events.
|
||||
'';
|
||||
license = licenses.gpl2;
|
||||
homepage = "http://users.softlab.ece.ntua.gr/~thkala/projects/actkbd/";
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
28
pkgs/tools/system/amtterm/default.nix
Normal file
28
pkgs/tools/system/amtterm/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ fetchurl, lib, stdenv, makeWrapper, perl, perlPackages }:
|
||||
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "amtterm";
|
||||
version = "1.6-1";
|
||||
|
||||
buildInputs = with perlPackages; [ perl SOAPLite ];
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.kraxel.org/cgit/amtterm/snapshot/${pname}-${version}.tar.gz";
|
||||
sha256 = "1jxcsqkag2bxmrnr4m6g88sln1j2d9liqlna57fj8kkc85316vlc";
|
||||
};
|
||||
|
||||
makeFlags = [ "prefix=$(out)" "STRIP=" ];
|
||||
|
||||
postInstall =
|
||||
"wrapProgram $out/bin/amttool --prefix PERL5LIB : $PERL5LIB";
|
||||
|
||||
meta = with lib;
|
||||
{ description = "Intel AMT® SoL client + tools";
|
||||
homepage = "https://www.kraxel.org/cgit/amtterm/";
|
||||
license = licenses.gpl2;
|
||||
maintainers = [ maintainers.ehmry ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
59
pkgs/tools/system/at/default.nix
Normal file
59
pkgs/tools/system/at/default.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{ lib, stdenv, fetchurl, fetchpatch, bison, flex, pam, perl
|
||||
, sendmailPath ? "/run/wrappers/bin/sendmail"
|
||||
, atWrapperPath ? "/run/wrappers/bin/at"
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "at";
|
||||
version = "3.1.23";
|
||||
|
||||
src = fetchurl {
|
||||
# Debian is apparently the last location where it can be found.
|
||||
url = "mirror://debian/pool/main/a/at/at_${version}.orig.tar.gz";
|
||||
sha256 = "040pr2ivfbrhvrhzis97cpwfkzpr7nin33nc301aga5aajlhlicp";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./install.patch
|
||||
(fetchpatch {
|
||||
url = "https://raw.githubusercontent.com/riscv/riscv-poky/master/meta/recipes-extended/at/at/0001-remove-glibc-assumption.patch";
|
||||
sha256 = "1rk4hskp0c1jqkanzdxf873i6jgki3xhrm609fsam8an8sl1njnm";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ bison flex perl /* for `prove` (tests) */ ];
|
||||
|
||||
buildInputs = [ pam ];
|
||||
|
||||
preConfigure =
|
||||
''
|
||||
export SENDMAIL=${sendmailPath}
|
||||
# Purity: force atd.pid to be placed in /var/run regardless of
|
||||
# whether it exists now.
|
||||
substituteInPlace ./configure --replace "test -d /var/run" "true"
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
"--with-etcdir=/etc/at"
|
||||
"--with-jobdir=/var/spool/atjobs"
|
||||
"--with-atspool=/var/spool/atspool"
|
||||
"--with-daemon_username=atd"
|
||||
"--with-daemon_groupname=atd"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
# Ensure that "batch" can invoke the setuid "at" wrapper, if it exists, or
|
||||
# else we get permission errors (on NixOS). "batch" is a shell script, so
|
||||
# when the kernel executes it it drops setuid perms.
|
||||
postInstall = ''
|
||||
sed -i "6i test -x ${atWrapperPath} && exec ${atWrapperPath} -qb now # exec doesn't return" "$out/bin/batch"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "The classical Unix `at' job scheduling command";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
homepage = "https://packages.qa.debian.org/at";
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
54
pkgs/tools/system/at/install.patch
Normal file
54
pkgs/tools/system/at/install.patch
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
--- at-3.1.14/Makefile.in 2013-09-08 14:43:53.000000000 +0200
|
||||
+++ at-3.1.14/Makefile.in 2014-07-27 20:42:04.017703443 +0200
|
||||
@@ -91,35 +91,28 @@
|
||||
$(CC) -c $(CFLAGS) $(DEFS) $*.c
|
||||
|
||||
install: all
|
||||
- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(etcdir)
|
||||
- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(bindir)
|
||||
- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(sbindir)
|
||||
- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(docdir)
|
||||
- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(atdocdir)
|
||||
- $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 755 -d $(IROOT)$(ATSPOOL_DIR) $(IROOT)$(ATJOB_DIR)
|
||||
- chmod 1770 $(IROOT)$(ATSPOOL_DIR) $(IROOT)$(ATJOB_DIR)
|
||||
- touch $(IROOT)$(LFILE)
|
||||
- chmod 600 $(IROOT)$(LFILE)
|
||||
- chown $(DAEMON_USERNAME):$(DAEMON_GROUPNAME) $(IROOT)$(LFILE)
|
||||
- test -f $(IROOT)$(etcdir)/at.allow || test -f $(IROOT)$(etcdir)/at.deny || $(INSTALL) -o root -g $(DAEMON_GROUPNAME) -m 640 at.deny $(IROOT)$(etcdir)/
|
||||
- $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 6755 at $(IROOT)$(bindir)
|
||||
+ $(INSTALL) -m 755 -d $(IROOT)$(bindir)
|
||||
+ $(INSTALL) -m 755 -d $(IROOT)$(sbindir)
|
||||
+ $(INSTALL) -m 755 -d $(IROOT)$(docdir)
|
||||
+ $(INSTALL) -m 755 -d $(IROOT)$(atdocdir)
|
||||
+ $(INSTALL) -m 0755 at $(IROOT)$(bindir)
|
||||
$(LN_S) -f at $(IROOT)$(bindir)/atq
|
||||
$(LN_S) -f at $(IROOT)$(bindir)/atrm
|
||||
- $(INSTALL) -g root -o root -m 755 batch $(IROOT)$(bindir)
|
||||
- $(INSTALL) -d -o root -g root -m 755 $(IROOT)$(man1dir)
|
||||
- $(INSTALL) -d -o root -g root -m 755 $(IROOT)$(man5dir)
|
||||
- $(INSTALL) -d -o root -g root -m 755 $(IROOT)$(man8dir)
|
||||
- $(INSTALL) -g root -o root -m 755 atd $(IROOT)$(sbindir)
|
||||
- $(INSTALL) -g root -o root -m 755 atrun $(IROOT)$(sbindir)
|
||||
- $(INSTALL) -g root -o root -m 644 at.1 $(IROOT)$(man1dir)/
|
||||
+ $(INSTALL) -m 755 batch $(IROOT)$(bindir)
|
||||
+ $(INSTALL) -d -m 755 $(IROOT)$(man1dir)
|
||||
+ $(INSTALL) -d -m 755 $(IROOT)$(man5dir)
|
||||
+ $(INSTALL) -d -m 755 $(IROOT)$(man8dir)
|
||||
+ $(INSTALL) -m 755 atd $(IROOT)$(sbindir)
|
||||
+ $(INSTALL) -m 755 atrun $(IROOT)$(sbindir)
|
||||
+ $(INSTALL) -m 644 at.1 $(IROOT)$(man1dir)/
|
||||
cd $(IROOT)$(man1dir) && $(LN_S) -f at.1 atq.1 && $(LN_S) -f at.1 batch.1 && $(LN_S) -f at.1 atrm.1
|
||||
- $(INSTALL) -g root -o root -m 644 atd.8 $(IROOT)$(man8dir)/
|
||||
+ $(INSTALL) -m 644 atd.8 $(IROOT)$(man8dir)/
|
||||
sed "s,\$${exec_prefix},$(exec_prefix),g" <atrun.8>tmpman
|
||||
- $(INSTALL) -g root -o root -m 644 tmpman $(IROOT)$(man8dir)/atrun.8
|
||||
+ $(INSTALL) -m 644 tmpman $(IROOT)$(man8dir)/atrun.8
|
||||
rm -f tmpman
|
||||
- $(INSTALL) -g root -o root -m 644 at.allow.5 $(IROOT)$(man5dir)/
|
||||
+ $(INSTALL) -m 644 at.allow.5 $(IROOT)$(man5dir)/
|
||||
cd $(IROOT)$(man5dir) && $(LN_S) -f at.allow.5 at.deny.5
|
||||
- $(INSTALL) -g root -o root -m 644 $(DOCS) $(IROOT)$(atdocdir)
|
||||
+ $(INSTALL) -m 644 $(DOCS) $(IROOT)$(atdocdir)
|
||||
rm -f $(IROOT)$(mandir)/cat1/at.1* $(IROOT)$(mandir)/cat1/batch.1* \
|
||||
$(IROOT)$(mandir)/cat1/atq.1*
|
||||
rm -f $(IROOT)$(mandir)/cat1/atd.8*
|
||||
21
pkgs/tools/system/augeas/default.nix
Normal file
21
pkgs/tools/system/augeas/default.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ lib, stdenv, fetchurl, pkg-config, readline, libxml2 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "augeas";
|
||||
version = "1.12.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://download.augeas.net/${pname}-${version}.tar.gz";
|
||||
sha256 = "11ybhb13wkkilsn7b416a1dn61m1xrq0lbdpkhp5w61jrk4l469j";
|
||||
};
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ readline libxml2 ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Configuration editing tool";
|
||||
license = licenses.lgpl2;
|
||||
homepage = "http://augeas.net/";
|
||||
maintainers = with maintainers; [ offline ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
47
pkgs/tools/system/auto-cpufreq/default.nix
Normal file
47
pkgs/tools/system/auto-cpufreq/default.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{ lib, python3Packages, fetchFromGitHub, substituteAll }:
|
||||
|
||||
python3Packages.buildPythonPackage rec {
|
||||
pname = "auto-cpufreq";
|
||||
version = "1.7.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "AdnanHodzic";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1r27ydv258c6pc82za0wq8q8fj0j3r50c8wxc6r7dwr6wx8q3asx";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [ click distro psutil ];
|
||||
|
||||
doCheck = false;
|
||||
pythonImportsCheck = [ "auto_cpufreq" ];
|
||||
|
||||
patches = [
|
||||
# hardcodes version output
|
||||
(substituteAll {
|
||||
src = ./fix-version-output.patch;
|
||||
inherit version;
|
||||
})
|
||||
|
||||
# patch to prevent script copying and to disable install
|
||||
./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 ];
|
||||
};
|
||||
}
|
||||
37
pkgs/tools/system/auto-cpufreq/fix-version-output.patch
Normal file
37
pkgs/tools/system/auto-cpufreq/fix-version-output.patch
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
--- a/auto_cpufreq/core.py
|
||||
+++ b/auto_cpufreq/core.py
|
||||
@@ -68,32 +68,8 @@ dist_name = distro.id()
|
||||
|
||||
# display running version of auto-cpufreq
|
||||
def app_version():
|
||||
-
|
||||
- print("auto-cpufreq version:")
|
||||
-
|
||||
- # snap package
|
||||
- if os.getenv("PKG_MARKER") == "SNAP":
|
||||
- print(getoutput("echo Snap: $SNAP_VERSION"))
|
||||
- # aur package
|
||||
- elif dist_name in ["arch", "manjaro", "garuda"]:
|
||||
- aur_pkg_check = call("pacman -Qs auto-cpufreq > /dev/null", shell=True)
|
||||
- if aur_pkg_check == 1:
|
||||
- print(
|
||||
- "Git commit:",
|
||||
- check_output(["git", "describe", "--always"]).strip().decode(),
|
||||
- )
|
||||
- else:
|
||||
- print(getoutput("pacman -Qi auto-cpufreq | grep Version"))
|
||||
- else:
|
||||
- # source code (auto-cpufreq-installer)
|
||||
- try:
|
||||
- print(
|
||||
- "Git commit:",
|
||||
- check_output(["git", "describe", "--always"]).strip().decode(),
|
||||
- )
|
||||
- except Exception as e:
|
||||
- print(repr(e))
|
||||
- pass
|
||||
+ print("auto-cpufreq version: @version@")
|
||||
+ print("Git commit: v@version@")
|
||||
|
||||
|
||||
def app_res_use():
|
||||
168
pkgs/tools/system/auto-cpufreq/prevent-install-and-copy.patch
Normal file
168
pkgs/tools/system/auto-cpufreq/prevent-install-and-copy.patch
Normal file
|
|
@ -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
|
||||
62
pkgs/tools/system/awstats/default.nix
Normal file
62
pkgs/tools/system/awstats/default.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
{ lib, fetchurl, perlPackages, jdk }:
|
||||
|
||||
perlPackages.buildPerlPackage rec {
|
||||
pname = "awstats";
|
||||
version = "7.8";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/awstats/${pname}-${version}.tar.gz";
|
||||
sha256 = "1f6l0hd01jmz7hpg0py8qixxiq50n8gl37iypayskxmy05z8craa";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace wwwroot/cgi-bin/awstats.pl \
|
||||
--replace /usr/share/awstats/ "$out/wwwroot/cgi-bin/"
|
||||
'';
|
||||
|
||||
outputs = [ "bin" "out" "doc" ]; # bin just links the user-run executable
|
||||
propagatedBuildOutputs = [ ]; # otherwise out propagates bin -> cycle
|
||||
|
||||
buildInputs = with perlPackages; [ ]; # plugins will need some
|
||||
|
||||
preConfigure = ''
|
||||
touch Makefile.PL
|
||||
patchShebangs .
|
||||
'';
|
||||
|
||||
# build our own JAR
|
||||
preBuild = ''
|
||||
(
|
||||
cd wwwroot/classes/src
|
||||
rm ../*.jar
|
||||
PATH="${jdk}/bin" "$(type -P perl)" Makefile.pl
|
||||
test -f ../*.jar
|
||||
)
|
||||
'';
|
||||
|
||||
doCheck = false;
|
||||
|
||||
installPhase = ''
|
||||
mkdir "$out"
|
||||
mv wwwroot "$out/wwwroot"
|
||||
rm -r "$out/wwwroot/classes/src/"
|
||||
|
||||
mkdir -p "$out/share/awstats"
|
||||
mv tools "$out/share/awstats/tools"
|
||||
|
||||
mkdir -p "$bin/bin"
|
||||
ln -s "$out/wwwroot/cgi-bin/awstats.pl" "$bin/bin/awstats"
|
||||
|
||||
mkdir -p "$doc/share/doc"
|
||||
mv README.md docs/
|
||||
mv docs "$doc/share/doc/awstats"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Real-time logfile analyzer to get advanced statistics";
|
||||
homepage = "https://awstats.org";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
||||
19
pkgs/tools/system/bar/default.nix
Normal file
19
pkgs/tools/system/bar/default.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bar";
|
||||
version = "1.11.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/project/clpbar/clpbar/bar-${version}/bar_${version}.tar.gz";
|
||||
sha256 = "00v5cb6vzizyyhflgr62d3k8dqc0rg6wdgfyyk11c0s0r32mw3zs";
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Console progress bar";
|
||||
homepage = "http://clpbar.sourceforge.net/";
|
||||
license = lib.licenses.gpl2;
|
||||
maintainers = [ lib.maintainers.rdnetto ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
35
pkgs/tools/system/bfs/default.nix
Normal file
35
pkgs/tools/system/bfs/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ lib, stdenv, fetchFromGitHub, libcap, acl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bfs";
|
||||
version = "2.3.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "bfs";
|
||||
owner = "tavianator";
|
||||
rev = version;
|
||||
sha256 = "sha256-V82UdCG0J04sZP3FTVQqANrez/LCwOLQY6zzFOoIeNo=";
|
||||
};
|
||||
|
||||
buildInputs = lib.optionals stdenv.isLinux [ libcap acl ];
|
||||
|
||||
# Disable LTO on darwin. See https://github.com/NixOS/nixpkgs/issues/19098
|
||||
preConfigure = lib.optionalString stdenv.isDarwin ''
|
||||
substituteInPlace Makefile --replace "-flto -DNDEBUG" "-DNDEBUG"
|
||||
'';
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
buildFlags = [ "release" ]; # "release" enables compiler optimizations
|
||||
|
||||
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
|
||||
depth-first. It is otherwise intended to be compatible with many versions of find.
|
||||
'';
|
||||
homepage = "https://github.com/tavianator/bfs";
|
||||
license = licenses.bsd0;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ yesbox ];
|
||||
};
|
||||
}
|
||||
52
pkgs/tools/system/bottom/default.nix
Normal file
52
pkgs/tools/system/bottom/default.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, rustPlatform
|
||||
, DiskArbitration
|
||||
, Foundation
|
||||
, IOKit
|
||||
, installShellFiles
|
||||
, libiconv
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "bottom";
|
||||
version = "0.6.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ClementTsang";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-zmiYVLaXKHH+MObO75wOiGkDetKy4bVLe7IAqiO2ER8=";
|
||||
};
|
||||
|
||||
prePatch = ''
|
||||
rm .cargo/config.toml
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
DiskArbitration
|
||||
Foundation
|
||||
IOKit
|
||||
libiconv
|
||||
];
|
||||
|
||||
cargoSha256 = "sha256-GMG6YBm/jA5D7wxC2gczMn/6Lkqiq/toSPNf86kgOys=";
|
||||
|
||||
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";
|
||||
};
|
||||
}
|
||||
52
pkgs/tools/system/bpytop/default.nix
Normal file
52
pkgs/tools/system/bpytop/default.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, python3Packages
|
||||
, fetchFromGitHub
|
||||
, makeWrapper
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bpytop";
|
||||
version = "1.0.68";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aristocratos";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-NHfaWWwNpGhqu/ALcW4p4X6sktEyLbKQuNHpAUUw4LY=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [ python psutil ];
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
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
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,libexec,share/bpytop}/
|
||||
cp -r ./themes $out/share/bpytop/
|
||||
cp ./bpytop.py $out/libexec/
|
||||
|
||||
makeWrapper ${python3Packages.python.interpreter} $out/bin/bpytop \
|
||||
--add-flags "$out/libexec/bpytop.py" \
|
||||
--prefix PYTHONPATH : "$PYTHONPATH"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A resource monitor; python port of bashtop";
|
||||
homepage = src.meta.homepage;
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ aw ];
|
||||
platforms = with platforms; linux ++ freebsd ++ darwin;
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/pull/94625#issuecomment-668509399
|
||||
broken = stdenv.isDarwin && stdenv.isx86_64;
|
||||
};
|
||||
}
|
||||
55
pkgs/tools/system/btop/default.nix
Normal file
55
pkgs/tools/system/btop/default.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, runCommand
|
||||
, darwin
|
||||
, removeReferencesTo
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "btop";
|
||||
version = "1.2.6";
|
||||
hash = "sha256-q1Dpdw7bVSG10xtoUpelRgMrWe71vCWajjsAHjAZzQ4=";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aristocratos";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = hash;
|
||||
};
|
||||
|
||||
hardeningDisable = lib.optionals (stdenv.isAarch64 && stdenv.isDarwin) [ "stackprotector" ];
|
||||
|
||||
ADDFLAGS = with darwin.apple_sdk.frameworks;
|
||||
lib.optional stdenv.isDarwin
|
||||
"-F${IOKit}/Library/Frameworks/";
|
||||
|
||||
buildInputs = with darwin.apple_sdk;
|
||||
lib.optionals stdenv.isDarwin [
|
||||
frameworks.CoreFoundation
|
||||
frameworks.IOKit
|
||||
] ++ lib.optional (stdenv.isDarwin && stdenv.isx86_64) (
|
||||
# Found this explanation for needing to create a header directory for libproc.h alone.
|
||||
# https://github.com/NixOS/nixpkgs/blob/049e5e93af9bbbe06b4c40fd001a4e138ce1d677/pkgs/development/libraries/webkitgtk/default.nix#L154
|
||||
# TL;DR, the other headers in the include path for the macOS SDK is not compatible with the C++ stdlib and causes issues, so we copy
|
||||
# this to avoid those issues
|
||||
runCommand "${pname}_headers" { } ''
|
||||
install -Dm444 "${lib.getDev sdk}"/include/libproc.h "$out"/include/libproc.h
|
||||
''
|
||||
);
|
||||
|
||||
installFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
postInstall = ''
|
||||
${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc.cc} $(readlink -f $out/bin/btop)
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A monitor of resources";
|
||||
homepage = "https://github.com/aristocratos/btop";
|
||||
changelog = "https://github.com/aristocratos/btop/blob/v${version}/CHANGELOG.md";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
maintainers = with maintainers; [ rmcgibbo ];
|
||||
};
|
||||
}
|
||||
28
pkgs/tools/system/chase/default.nix
Normal file
28
pkgs/tools/system/chase/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, stdenv, fetchurl ,pkg-config, libatomic_ops , boehmgc }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "chase";
|
||||
version = "0.5.2";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ libatomic_ops boehmgc ] ;
|
||||
src = fetchurl {
|
||||
url = "mirror://debian/pool/main/c/chase/chase_${version}.orig.tar.gz";
|
||||
sha256 = "68d95c2d4dc45553b75790fcea4413b7204a2618dff148116ca9bdb0310d737f";
|
||||
};
|
||||
|
||||
doCheck = true;
|
||||
makeFlags = [ "-e" ];
|
||||
makeFlagsArray="LIBS=-lgc";
|
||||
|
||||
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
|
||||
'';
|
||||
homepage = "https://qa.debian.org/developer.php?login=rotty%40debian.org";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = [ maintainers.polyrod ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
30
pkgs/tools/system/clinfo/default.nix
Normal file
30
pkgs/tools/system/clinfo/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, stdenv, fetchFromGitHub, ocl-icd, opencl-headers, OpenCL }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "clinfo";
|
||||
version = "3.0.21.02.21";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Oblomov";
|
||||
repo = "clinfo";
|
||||
rev = version;
|
||||
sha256 = "sha256-0ijfbfv1F6mnt1uFH/A4yOADJoAFrPMa3yAOFJW53ek=";
|
||||
};
|
||||
|
||||
buildInputs = lib.optionals (!stdenv.isDarwin) [
|
||||
ocl-icd
|
||||
opencl-headers
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
OpenCL
|
||||
];
|
||||
|
||||
makeFlags = [ "PREFIX=${placeholder "out"}" ];
|
||||
|
||||
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;
|
||||
maintainers = with maintainers; [ athas r-burns ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
59
pkgs/tools/system/cm-rgb/default.nix
Normal file
59
pkgs/tools/system/cm-rgb/default.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{ lib
|
||||
, buildPythonApplication
|
||||
, fetchFromGitHub
|
||||
, atk
|
||||
, gobject-introspection
|
||||
, wrapGAppsHook
|
||||
, click
|
||||
, hidapi
|
||||
, psutil
|
||||
, pygobject3
|
||||
}:
|
||||
|
||||
buildPythonApplication rec {
|
||||
pname = "cm-rgb";
|
||||
version = "0.3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gfduszynski";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-m0ZAjSLRzcjzygLEbvCiDd7krc1gRqTg1ZV4H/o2c68=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
atk
|
||||
|
||||
# Populate GI_TYPELIB_PATH
|
||||
gobject-introspection
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
click
|
||||
hidapi
|
||||
psutil
|
||||
pygobject3
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
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 lib; {
|
||||
description = "Control AMD Wraith Prism RGB LEDs";
|
||||
longDescription = ''
|
||||
cm-rgb controls AMD Wraith Prism RGB LEDS.
|
||||
|
||||
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>.
|
||||
'';
|
||||
homepage = "https://github.com/gfduszynski/cm-rgb";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
||||
14
pkgs/tools/system/collectd/data.nix
Normal file
14
pkgs/tools/system/collectd/data.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ stdenv, collectd }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "collectd-data";
|
||||
inherit (collectd) meta src version;
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
dontFixup = true;
|
||||
|
||||
installPhase = ''
|
||||
install -Dm444 -t $out/share/collectd/ src/*.{db,conf}
|
||||
'';
|
||||
}
|
||||
66
pkgs/tools/system/collectd/default.nix
Normal file
66
pkgs/tools/system/collectd/default.nix
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
{ lib, stdenv, fetchurl, fetchpatch, darwin, callPackage
|
||||
, autoreconfHook
|
||||
, pkg-config
|
||||
, libtool
|
||||
, nixosTests
|
||||
, ...
|
||||
}@args:
|
||||
let
|
||||
plugins = callPackage ./plugins.nix args;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
version = "5.12.0";
|
||||
pname = "collectd";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://collectd.org/files/${pname}-${version}.tar.bz2";
|
||||
sha256 = "1mh97afgq6qgmpvpr84zngh58m0sl1b4wimqgvvk376188q09bjv";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# fix -t never printing syntax errors
|
||||
# should be included in next release
|
||||
(fetchpatch {
|
||||
url = "https://github.com/collectd/collectd/commit/3f575419e7ccb37a3b10ecc82adb2e83ff2826e1.patch";
|
||||
sha256 = "0jwjdlfl0dp7mlbwygp6h0rsbaqfbgfm5z07lr5l26z6hhng2h2y";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkg-config autoreconfHook ];
|
||||
buildInputs = [
|
||||
libtool
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
darwin.apple_sdk.frameworks.ApplicationServices
|
||||
] ++ plugins.buildInputs;
|
||||
|
||||
configureFlags = [
|
||||
"--localstatedir=/var"
|
||||
"--disable-werror"
|
||||
] ++ plugins.configureFlags
|
||||
++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "--with-fp-layout=nothing" ];
|
||||
|
||||
# do not create directories in /var during installPhase
|
||||
postConfigure = ''
|
||||
substituteInPlace Makefile --replace '$(mkinstalldirs) $(DESTDIR)$(localstatedir)/' '#'
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
if [ -d $out/share/collectd/java ]; then
|
||||
mv $out/share/collectd/java $out/share/
|
||||
fi
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru.tests = {
|
||||
inherit (nixosTests) collectd;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Daemon which collects system performance statistics periodically";
|
||||
homepage = "https://collectd.org";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ bjornfor fpletz ];
|
||||
};
|
||||
}
|
||||
143
pkgs/tools/system/collectd/plugins.nix
Normal file
143
pkgs/tools/system/collectd/plugins.nix
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
{ lib, stdenv
|
||||
, curl
|
||||
, darwin
|
||||
, hiredis
|
||||
, iptables
|
||||
, jdk
|
||||
, libatasmart
|
||||
, libdbi
|
||||
, libesmtp
|
||||
, libgcrypt
|
||||
, libmemcached, cyrus_sasl
|
||||
, libmodbus
|
||||
, libmicrohttpd
|
||||
, libmnl
|
||||
, libmysqlclient
|
||||
, libnotify, gdk-pixbuf
|
||||
, liboping
|
||||
, libpcap
|
||||
, libsigrok
|
||||
, libvirt
|
||||
, libxml2
|
||||
, libapparmor, libcap_ng, numactl
|
||||
, lua
|
||||
, lvm2
|
||||
, lm_sensors
|
||||
, mongoc
|
||||
, mosquitto
|
||||
, net-snmp
|
||||
, openldap
|
||||
, openipmi
|
||||
, perl
|
||||
, postgresql
|
||||
, protobufc
|
||||
, python2
|
||||
, rabbitmq-c
|
||||
, rdkafka
|
||||
, riemann_c_client
|
||||
, rrdtool
|
||||
, udev
|
||||
, varnish
|
||||
, xen
|
||||
, yajl
|
||||
, IOKit
|
||||
# Defaults to `null` for all supported plugins (except xen, which is marked as
|
||||
# insecure), otherwise a list of plugin names for a custom build
|
||||
, enabledPlugins ? null
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
# Plugins that have dependencies.
|
||||
# Please help to extend these!
|
||||
plugins = {
|
||||
amqp.buildInputs = [
|
||||
yajl
|
||||
] ++ lib.optionals stdenv.isLinux [ rabbitmq-c ];
|
||||
apache.buildInputs = [ curl ];
|
||||
ascent.buildInputs = [ curl libxml2 ];
|
||||
battery.buildInputs = lib.optionals stdenv.isDarwin [
|
||||
IOKit
|
||||
];
|
||||
bind.buildInputs = [ curl libxml2 ];
|
||||
ceph.buildInputs = [ yajl ];
|
||||
curl.buildInputs = [ curl ];
|
||||
curl_json.buildInputs = [ curl yajl ];
|
||||
curl_xml.buildInputs = [ curl libxml2 ];
|
||||
dbi.buildInputs = [ libdbi ];
|
||||
disk.buildInputs = lib.optionals stdenv.isLinux [
|
||||
udev
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
IOKit
|
||||
];
|
||||
dns.buildInputs = [ libpcap ];
|
||||
ipmi.buildInputs = [ openipmi ];
|
||||
iptables.buildInputs = [
|
||||
libpcap
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
iptables libmnl
|
||||
];
|
||||
java.buildInputs = [ jdk libgcrypt libxml2 ];
|
||||
log_logstash.buildInputs = [ yajl ];
|
||||
lua.buildInputs = [ lua ];
|
||||
memcachec.buildInputs = [ libmemcached cyrus_sasl ];
|
||||
modbus.buildInputs = lib.optionals stdenv.isLinux [ libmodbus ];
|
||||
mqtt.buildInputs = [ mosquitto ];
|
||||
mysql.buildInputs = lib.optionals (libmysqlclient != null) [
|
||||
libmysqlclient
|
||||
];
|
||||
netlink.buildInputs = [
|
||||
libpcap
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
libmnl
|
||||
];
|
||||
network.buildInputs = [ libgcrypt ];
|
||||
nginx.buildInputs = [ curl ];
|
||||
notify_desktop.buildInputs = [ libnotify gdk-pixbuf ];
|
||||
notify_email.buildInputs = [ libesmtp ];
|
||||
openldap.buildInputs = [ openldap ];
|
||||
ovs_events.buildInputs = [ yajl ];
|
||||
ovs_stats.buildInputs = [ yajl ];
|
||||
perl.buildInputs = [ perl ];
|
||||
pinba.buildInputs = [ protobufc ];
|
||||
ping.buildInputs = [ liboping ];
|
||||
postgresql.buildInputs = [ postgresql ];
|
||||
python.buildInputs = [ python2 ];
|
||||
redis.buildInputs = [ hiredis ];
|
||||
rrdcached.buildInputs = [ rrdtool libxml2 ];
|
||||
rrdtool.buildInputs = [ rrdtool libxml2 ];
|
||||
sensors.buildInputs = lib.optionals stdenv.isLinux [ lm_sensors ];
|
||||
sigrok.buildInputs = lib.optionals stdenv.isLinux [ libsigrok udev ];
|
||||
smart.buildInputs = lib.optionals stdenv.isLinux [ libatasmart udev ];
|
||||
snmp.buildInputs = lib.optionals stdenv.isLinux [ net-snmp ];
|
||||
snmp_agent.buildInputs = lib.optionals stdenv.isLinux [ net-snmp ];
|
||||
varnish.buildInputs = [ curl varnish ];
|
||||
virt.buildInputs = [
|
||||
libvirt libxml2 yajl
|
||||
] ++ lib.optionals stdenv.isLinux [ lvm2 udev ];
|
||||
write_http.buildInputs = [ curl yajl ];
|
||||
write_kafka.buildInputs = [ yajl rdkafka ];
|
||||
write_log.buildInputs = [ yajl ];
|
||||
write_mongodb.buildInputs = [ mongoc ];
|
||||
write_prometheus.buildInputs = [ protobufc libmicrohttpd ];
|
||||
write_redis.buildInputs = [ hiredis ];
|
||||
write_riemann.buildInputs = [ protobufc riemann_c_client ];
|
||||
xencpu.buildInputs = [ xen ];
|
||||
};
|
||||
|
||||
configureFlags = lib.optionals (enabledPlugins != null) (
|
||||
[ "--disable-all-plugins" ]
|
||||
++ (map (plugin: "--enable-${plugin}") enabledPlugins));
|
||||
|
||||
pluginBuildInputs = plugin:
|
||||
lib.optionals (plugins ? ${plugin} && plugins.${plugin} ? buildInputs)
|
||||
plugins.${plugin}.buildInputs;
|
||||
|
||||
buildInputs =
|
||||
if enabledPlugins == null
|
||||
then builtins.concatMap pluginBuildInputs
|
||||
(builtins.attrNames (builtins.removeAttrs plugins ["xencpu"]))
|
||||
else builtins.concatMap pluginBuildInputs enabledPlugins;
|
||||
in {
|
||||
inherit configureFlags buildInputs;
|
||||
}
|
||||
2
pkgs/tools/system/colorls/Gemfile
Normal file
2
pkgs/tools/system/colorls/Gemfile
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
source 'https://rubygems.org'
|
||||
gem 'colorls'
|
||||
23
pkgs/tools/system/colorls/Gemfile.lock
Normal file
23
pkgs/tools/system/colorls/Gemfile.lock
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
clocale (0.0.4)
|
||||
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
|
||||
|
||||
DEPENDENCIES
|
||||
colorls
|
||||
|
||||
BUNDLED WITH
|
||||
2.1.4
|
||||
18
pkgs/tools/system/colorls/default.nix
Normal file
18
pkgs/tools/system/colorls/default.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ lib, bundlerApp, ruby, bundlerUpdateScript }:
|
||||
|
||||
bundlerApp {
|
||||
pname = "colorls";
|
||||
|
||||
gemdir = ./.;
|
||||
exes = [ "colorls" ];
|
||||
|
||||
passthru.updateScript = bundlerUpdateScript "colorls";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Prettified LS";
|
||||
homepage = "https://github.com/athityakumar/colorls";
|
||||
license = with licenses; mit;
|
||||
maintainers = with maintainers; [ lukebfox nicknovitski cbley ];
|
||||
platforms = ruby.meta.platforms;
|
||||
};
|
||||
}
|
||||
63
pkgs/tools/system/colorls/gemset.nix
Normal file
63
pkgs/tools/system/colorls/gemset.nix
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
clocale = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "065pb7hzmd6zndbln4ag94bjpw3hsm71jagsgiqskpxhgrbq03jz";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.0.4";
|
||||
};
|
||||
colorls = {
|
||||
dependencies = ["clocale" "filesize" "manpages" "rainbow" "unicode-display_width"];
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1w9d99qzgxw8wwa4z1vkdnr70fppx2g9shma6dz3ihjhajj2xvmq";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.4.3";
|
||||
};
|
||||
filesize = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "17p7rf1x7h3ivaznb4n4kmxnnzj25zaviryqgn2n12v2kmibhp8g";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.2.0";
|
||||
};
|
||||
manpages = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "11p6ilnfda6af15ks3xiz2pr0hkvdvadnk1xm4ahqlf84dld3fnd";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.6.1";
|
||||
};
|
||||
rainbow = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0bb2fpjspydr6x0s8pn1pqkzmxszvkfapv0p4627mywl7ky4zkhk";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.0.0";
|
||||
};
|
||||
unicode-display_width = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "06i3id27s60141x6fdnjn5rar1cywdwy64ilc59cz937303q3mna";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.7.0";
|
||||
};
|
||||
}
|
||||
24
pkgs/tools/system/confd/default.nix
Normal file
24
pkgs/tools/system/confd/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ lib, buildGoPackage, fetchFromGitHub }:
|
||||
|
||||
buildGoPackage rec {
|
||||
pname = "confd";
|
||||
version = "0.16.0";
|
||||
rev = "v${version}";
|
||||
|
||||
goPackagePath = "github.com/kelseyhightower/confd";
|
||||
subPackages = [ "./" ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
inherit rev;
|
||||
owner = "kelseyhightower";
|
||||
repo = "confd";
|
||||
sha256 = "0q7r6dkgirnmqi3rhqdaai88jqzw52l6jdrrwsf2qq0hva09961p";
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Manage local application configuration files using templates and data from etcd or consul";
|
||||
homepage = "https://github.com/kelseyhightower/confd";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [ lib.maintainers.zimbatm ];
|
||||
};
|
||||
}
|
||||
27
pkgs/tools/system/consul-template/default.nix
Normal file
27
pkgs/tools/system/consul-template/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "consul-template";
|
||||
version = "0.29.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hashicorp";
|
||||
repo = "consul-template";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-HxzniR4z3YzvFww3KqhtelaqMQJBsSw83pfz+jHxvKQ=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-wRNfxJVX45dfIBZ0sy48qbPkAsD0CIB1PDTiGs8Fjhs=";
|
||||
|
||||
# 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; [ cpcloud pradeepchhetri ];
|
||||
};
|
||||
}
|
||||
49
pkgs/tools/system/cron/default.nix
Normal file
49
pkgs/tools/system/cron/default.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{lib, stdenv, fetchurl, vim, sendmailPath ? "/usr/sbin/sendmail"}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cron";
|
||||
version = "4.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "ftp://ftp.isc.org/isc/cron/cron_${version}.shar";
|
||||
sha256 = "16n3dras4b1jh7g958nz1k54pl9pg5fwb3fvjln8z67varvq6if4";
|
||||
};
|
||||
|
||||
unpackCmd = "(mkdir cron && cd cron && sh $curSrc)";
|
||||
|
||||
hardeningEnable = [ "pie" ];
|
||||
|
||||
preBuild = ''
|
||||
# do not set sticky bit in /nix/store
|
||||
substituteInPlace Makefile --replace ' -o root' ' ' --replace 111 755 --replace 4755 0755
|
||||
# do not strip during install, broken on cross and we'll do ourselves as needed
|
||||
substituteInPlace Makefile --replace ' -s cron' ' cron'
|
||||
makeFlags="DESTROOT=$out CC=$CC"
|
||||
|
||||
# We want to ignore the $glibc/include/paths.h definition of
|
||||
# sendmail path.
|
||||
# Also set a usable default PATH (#16518).
|
||||
cat >> pathnames.h <<__EOT__
|
||||
#undef _PATH_SENDMAIL
|
||||
#define _PATH_SENDMAIL "${sendmailPath}"
|
||||
|
||||
#undef _PATH_VI
|
||||
#define _PATH_VI "${vim}/bin/vim"
|
||||
|
||||
#undef _PATH_DEFPATH
|
||||
#define _PATH_DEFPATH "/run/wrappers/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/usr/bin:/bin"
|
||||
__EOT__
|
||||
|
||||
# Implicit saved uids do not work here due to way NixOS uses setuid wrappers
|
||||
# (#16518).
|
||||
echo "#undef HAVE_SAVED_UIDS" >> externs.h
|
||||
'';
|
||||
|
||||
preInstall = "mkdir -p $out/bin $out/sbin $out/share/man/man1 $out/share/man/man5 $out/share/man/man8";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Daemon for running commands at specific times (Vixie Cron)";
|
||||
license = licenses.bsd0;
|
||||
platforms = with platforms; linux ++ darwin;
|
||||
};
|
||||
}
|
||||
24
pkgs/tools/system/ctop/default.nix
Normal file
24
pkgs/tools/system/ctop/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "ctop";
|
||||
version = "0.7.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bcicen";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-tojSzgpoGQg6MwV/MVpQpCA5w6bZO+9IOvfkw0Ydr6c=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-UAja7XuoLqJFNcK1PgHGcuf/HbvSrWyRvW2D3T7Hg0g=";
|
||||
|
||||
ldflags = [ "-s" "-w" "-X main.version=${version}" "-X main.build=v${version}" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Top-like interface for container metrics";
|
||||
homepage = "https://ctop.sh/";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ apeyroux marsam SuperSandro2000 ];
|
||||
};
|
||||
}
|
||||
32
pkgs/tools/system/daemon/default.nix
Normal file
32
pkgs/tools/system/daemon/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib, stdenv, fetchurl, perl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "daemon";
|
||||
version = "0.8";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://libslack.org/daemon/download/daemon-${version}.tar.gz";
|
||||
sha256 = "sha256-dPEubUs8hWMkib0IQx09mXvBcmS/V7cgI4Ty6AnP9ZY=";
|
||||
};
|
||||
|
||||
makeFlags = [
|
||||
"PREFIX=$(out)"
|
||||
"CC=${stdenv.cc.targetPrefix}cc"
|
||||
];
|
||||
|
||||
buildInputs = [ perl ];
|
||||
|
||||
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.
|
||||
Daemon performs these tasks for other processes. This is useful for
|
||||
writing daemons in languages other than C, C++ or Perl (e.g. /bin/sh,
|
||||
Java).
|
||||
'';
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = [ maintainers.sander ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
20
pkgs/tools/system/daemonize/default.nix
Normal file
20
pkgs/tools/system/daemonize/default.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "daemonize";
|
||||
version = "1.7.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bmc";
|
||||
repo = "daemonize";
|
||||
rev = "release-${version}";
|
||||
sha256 = "1e6LZXf/lK7sB2CbXwOg7LOi0Q8IBQNAa4d7rX0Ej3A=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Runs a command as a Unix daemon";
|
||||
homepage = "http://software.clapper.org/daemonize/";
|
||||
license = licenses.bsd3;
|
||||
platforms = with platforms; linux ++ freebsd ++ darwin;
|
||||
};
|
||||
}
|
||||
34
pkgs/tools/system/das_watchdog/default.nix
Normal file
34
pkgs/tools/system/das_watchdog/default.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ lib, stdenv, fetchFromGitHub, libgtop, xmessage, which, pkg-config }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "das_watchdog";
|
||||
version = "unstable-2015-09-12";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kmatheussen";
|
||||
repo = "das_watchdog";
|
||||
rev = "5ac0db0b98e5b4e690aca0aa7fb6ec60ceddcb06";
|
||||
sha256 = "sha256-eacUn/gYCEHtHdQf3lBPYvY3kfN3Bik7AolAPpbbwQs=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ libgtop xmessage which ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin/
|
||||
cp das_watchdog $out/bin/
|
||||
cp test_rt $out/bin/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/kmatheussen/das_watchdog";
|
||||
description = "A general watchdog for the linux operating system";
|
||||
longDescription = ''
|
||||
It should run in the background at all times to ensure a realtime process
|
||||
won't hang the machine.";
|
||||
'';
|
||||
license = licenses.free;
|
||||
maintainers = [ maintainers.magnetophon ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
44
pkgs/tools/system/datefudge/default.nix
Normal file
44
pkgs/tools/system/datefudge/default.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{ stdenv, lib, fetchgit, fetchpatch, makeWrapper, coreutils }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "datefudge";
|
||||
version = "1.24";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://salsa.debian.org/debian/${pname}.git";
|
||||
rev = "debian/${version}";
|
||||
sha256 = "1nh433yx4y4djp0bs6aawqbwk7miq7fsbs9wpjlyh2k9dvil2lrm";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
buildInputs = [ coreutils ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace "/usr" "/" \
|
||||
--replace "-o root -g root" ""
|
||||
substituteInPlace datefudge.sh \
|
||||
--replace "@LIBDIR@" "$out/lib/"
|
||||
'';
|
||||
|
||||
installFlags = [ "DESTDIR=$(out)" ];
|
||||
|
||||
postInstall = ''
|
||||
chmod +x $out/lib/datefudge/datefudge.so
|
||||
wrapProgram $out/bin/datefudge --prefix PATH : ${coreutils}/bin
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Fake the system date";
|
||||
longDescription = ''
|
||||
datefudge is a small utility that pretends that the system time is
|
||||
different by pre-loading a small library which modifies the time,
|
||||
gettimeofday and clock_gettime system calls.
|
||||
'';
|
||||
homepage = "https://packages.qa.debian.org/d/datefudge.html";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ leenaars ];
|
||||
};
|
||||
}
|
||||
24
pkgs/tools/system/dcfldd/default.nix
Normal file
24
pkgs/tools/system/dcfldd/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dcfldd";
|
||||
version = "1.3.4-1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/dcfldd/dcfldd-${version}.tar.gz";
|
||||
sha256 = "1y6mwsvm75f5jzxsjjk0yhf8xnpmz6y8qvcxfandavx59lc3l57m";
|
||||
};
|
||||
|
||||
buildInputs = [ ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "An enhanced version of GNU dd";
|
||||
|
||||
homepage = "http://dcfldd.sourceforge.net/";
|
||||
|
||||
license = licenses.gpl2;
|
||||
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ qknight ];
|
||||
};
|
||||
}
|
||||
40
pkgs/tools/system/dd_rescue/default.nix
Normal file
40
pkgs/tools/system/dd_rescue/default.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ lib, stdenv, fetchurl, autoconf }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.99.8";
|
||||
pname = "dd_rescue";
|
||||
|
||||
src = fetchurl {
|
||||
sha256 = "1gbxm8gr9sx5g1q9dycs21hkxikcy97q09lp1lvs59pnd9qpdnwh";
|
||||
url="http://www.garloff.de/kurt/linux/ddrescue/${pname}-${version}.tar.bz2";
|
||||
};
|
||||
|
||||
dd_rhelp_src = fetchurl {
|
||||
url = "http://www.kalysto.org/pkg/dd_rhelp-0.3.0.tar.gz";
|
||||
sha256 = "0br6fs23ybmic3i5s1w4k4l8c2ph85ax94gfp2lzjpxbvl73cz1g";
|
||||
};
|
||||
|
||||
buildInputs = [ autoconf ];
|
||||
|
||||
preBuild = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace "\$(DESTDIR)/usr" "$out" \
|
||||
--replace "-o root" "" \
|
||||
--replace "-g root" ""
|
||||
'';
|
||||
makeFlags = [ "LIBDIR=$out" ];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p "$out/share/dd_rescue" "$out/bin"
|
||||
tar xf "${dd_rhelp_src}" -C "$out/share/dd_rescue"
|
||||
cp "$out/share/dd_rescue"/dd_rhelp*/dd_rhelp "$out/bin"
|
||||
'';
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
52
pkgs/tools/system/ddrescue/default.nix
Normal file
52
pkgs/tools/system/ddrescue/default.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{ lib, stdenv
|
||||
, fetchurl, lzip
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ddrescue";
|
||||
version = "1.26";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/ddrescue/ddrescue-${version}.tar.lz";
|
||||
sha256 = "sha256-5RPNOpDZgQ392RGX1AqkD23wFZe/tez9+yBd4RJ8VR8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ lzip ];
|
||||
|
||||
doCheck = true; # not cross;
|
||||
configureFlags = [ "CXX=${stdenv.cc.targetPrefix}c++" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "GNU ddrescue, a data recovery tool";
|
||||
|
||||
longDescription =
|
||||
'' GNU ddrescue is a data recovery tool. It copies data from one file
|
||||
or block device (hard disc, cdrom, etc) to another, trying hard to
|
||||
rescue data in case of read errors.
|
||||
|
||||
The basic operation of ddrescue is fully automatic. That is, you
|
||||
don't have to wait for an error, stop the program, read the log, run
|
||||
it in reverse mode, etc.
|
||||
|
||||
If you use the logfile feature of ddrescue, the data is rescued very
|
||||
efficiently (only the needed blocks are read). Also you can
|
||||
interrupt the rescue at any time and resume it later at the same
|
||||
point.
|
||||
|
||||
Automatic merging of backups: If you have two or more damaged copies
|
||||
of a file, cdrom, etc, and run ddrescue on all of them, one at a
|
||||
time, with the same output file, you will probably obtain a complete
|
||||
and error-free file. This is so because the probability of having
|
||||
damaged areas at the same places on different input files is very
|
||||
low. Using the logfile, only the needed blocks are read from the
|
||||
second and successive copies.
|
||||
'';
|
||||
|
||||
homepage = "https://www.gnu.org/software/ddrescue/ddrescue.html";
|
||||
|
||||
license = licenses.gpl3Plus;
|
||||
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ domenkozar fpletz ];
|
||||
};
|
||||
}
|
||||
41
pkgs/tools/system/ddrescueview/default.nix
Normal file
41
pkgs/tools/system/ddrescueview/default.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{ stdenv, lib, fetchurl, fpc, lazarus, atk, cairo, gdk-pixbuf, glib, gtk2, libX11, pango }:
|
||||
|
||||
let
|
||||
versionBase = "0.4";
|
||||
versionSuffix = "alpha4";
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "ddrescueview";
|
||||
version = "${versionBase}${versionSuffix}";
|
||||
|
||||
src = fetchurl {
|
||||
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 ];
|
||||
|
||||
NIX_LDFLAGS = "--as-needed -rpath ${lib.makeLibraryPath buildInputs}";
|
||||
|
||||
buildPhase = ''
|
||||
lazbuild --lazarusdir=${lazarus}/share/lazarus ddrescueview.lpi
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -Dt $out/bin ddrescueview
|
||||
cd ../resources/linux
|
||||
mkdir -p "$out/share"
|
||||
cp -ar applications icons man $out/share
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A tool to graphically examine ddrescue mapfiles";
|
||||
homepage = "https://sourceforge.net/projects/ddrescueview/";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ orivej ];
|
||||
};
|
||||
}
|
||||
30
pkgs/tools/system/ddrutility/default.nix
Normal file
30
pkgs/tools/system/ddrutility/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ddrutility";
|
||||
version = "2.8";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/ddrutility/${pname}-${version}.tar.gz";
|
||||
sha256 = "023g7f2sfv5cqk3iyss4awrw3b913sy5423mn5zvlyrri5hi2cac";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace makefile --replace /usr/local ""
|
||||
'';
|
||||
|
||||
# Workaround build failure on -fno-common toolchains like upstream
|
||||
# gcc-10. Otherwise build fails as:
|
||||
# ld: /build/ccltHly5.o:(.bss+0x119f8): multiple definition of `start_time'; /build/cc9evx3L.o:(.bss+0x10978): first defined here
|
||||
NIX_CFLAGS_COMPILE = "-fcommon";
|
||||
|
||||
makeFlags = [ "DESTDIR=$(out)" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A set of utilities for hard drive data rescue";
|
||||
homepage = "https://sourceforge.net/projects/ddrutility/";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ orivej ];
|
||||
};
|
||||
}
|
||||
21
pkgs/tools/system/dfc/default.nix
Normal file
21
pkgs/tools/system/dfc/default.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{lib, stdenv, fetchurl, cmake, gettext}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dfc";
|
||||
version = "3.1.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://projects.gw-computing.net/attachments/download/615/${pname}-${version}.tar.gz";
|
||||
sha256 = "0m1fd7l85ckb7bq4c5c3g257bkjglm8gq7x42pkmpp87fkknc94n";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake gettext ];
|
||||
|
||||
meta = {
|
||||
homepage = "https://projects.gw-computing.net/projects/dfc";
|
||||
description = "Displays file system space usage using graphs and colors";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [qknight];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
21
pkgs/tools/system/di/default.nix
Normal file
21
pkgs/tools/system/di/default.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "di";
|
||||
version = "4.48.0.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://gentoo.com/${pname}/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-YFCFRDGeq2h/UXKme/NnnCuFdtw2Vim6Y3SbytaItGc=";
|
||||
};
|
||||
|
||||
makeFlags = [ "INSTALL_DIR=$(out)" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Disk information utility; displays everything 'df' does and more";
|
||||
homepage = "https://gentoo.com/di/";
|
||||
license = licenses.zlib;
|
||||
maintainers = with maintainers; [ manveru ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
38
pkgs/tools/system/disk-filltest/default.nix
Normal file
38
pkgs/tools/system/disk-filltest/default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "disk-filltest";
|
||||
version = "0.8.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bingmann";
|
||||
repo = "disk-filltest";
|
||||
rev = "v${version}";
|
||||
sha256 = "0qmcf5k5j7946wsbxrw4rqfj48mwl3r6kb4l3gppl97k7iyni6kj";
|
||||
};
|
||||
|
||||
preBuild = ''
|
||||
substituteInPlace Makefile --replace 'prefix = /usr/local' 'prefix = $(out)'
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
install -D -m0644 -t $out/share/doc COPYING README
|
||||
mkdir -p $out/share/man; mv $out/man1 $out/share/man
|
||||
'';
|
||||
|
||||
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
|
||||
failures by write files with pseudo-random data to the current
|
||||
directory until the disk is full, read the files again
|
||||
and verify the sequence written. It also can measure
|
||||
read/write speed while filling the disk.
|
||||
'';
|
||||
homepage = "https://panthema.net/2013/disk-filltest";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ caadar ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
|
||||
}
|
||||
31
pkgs/tools/system/dog/default.nix
Normal file
31
pkgs/tools/system/dog/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{lib, stdenv, fetchurl}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dog";
|
||||
version = "1.7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://archive.debian.org/debian/pool/main/d/dog/dog_${version}.orig.tar.gz";
|
||||
sha256 = "3ef25907ec5d1dfb0df94c9388c020b593fbe162d7aaa9bd08f35d2a125af056";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace "gcc" "cc"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
mkdir -p $out/man/man1
|
||||
cp dog.1 $out/man/man1
|
||||
cp dog $out/bin
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://lwn.net/Articles/421072/";
|
||||
description = "cat replacement";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ qknight ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
37
pkgs/tools/system/efibootmgr/default.nix
Normal file
37
pkgs/tools/system/efibootmgr/default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config, efivar, popt }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "efibootmgr";
|
||||
version = "17";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [ efivar popt ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rhboot";
|
||||
repo = "efibootmgr";
|
||||
rev = version;
|
||||
sha256 = "1niicijxg59rsmiw3rsjwy4bvi1n42dynvm01lnp9haixdzdpq03";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "remove-extra-decl.patch";
|
||||
url = "https://github.com/rhboot/efibootmgr/commit/99b578501643377e0b1994b2a068b790d189d5ad.patch";
|
||||
sha256 = "1sbijvlpv4khkix3vix9mbhzffj8lp8zpnbxm9gnzjz8yssz9p5h";
|
||||
})
|
||||
];
|
||||
|
||||
makeFlags = [ "EFIDIR=nixos" "PKG_CONFIG=${stdenv.cc.targetPrefix}pkg-config" ];
|
||||
|
||||
installFlags = [ "prefix=$(out)" ];
|
||||
|
||||
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;
|
||||
maintainers = with maintainers; [ ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
67
pkgs/tools/system/efivar/default.nix
Normal file
67
pkgs/tools/system/efivar/default.nix
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
{ lib, stdenv, buildPackages, fetchFromGitHub, fetchurl, pkg-config, popt }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "efivar";
|
||||
version = "37";
|
||||
|
||||
outputs = [ "bin" "out" "dev" "man" ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rhinstaller";
|
||||
repo = "efivar";
|
||||
rev = version;
|
||||
sha256 = "1z2dw5x74wgvqgd8jvibfff0qhwkc53kxg54v12pzymyibagwf09";
|
||||
};
|
||||
patches = [
|
||||
(fetchurl {
|
||||
name = "r13y.patch";
|
||||
url = "https://patch-diff.githubusercontent.com/raw/rhboot/efivar/pull/133.patch";
|
||||
sha256 = "038cwldb8sqnal5l6mhys92cqv8x7j8rgsl8i4fiv9ih9znw26i6";
|
||||
})
|
||||
(fetchurl {
|
||||
name = "fix-misaligned-pointer.patch";
|
||||
url = "https://github.com/rhboot/efivar/commit/b98ba8921010d03f46704a476c69861515deb1ca.patch";
|
||||
sha256 = "0ni9mz7y40a2wf1d1q5n9y5dhcbydxvfdhqic7zsmgnaxs3a0p27";
|
||||
})
|
||||
(fetchurl {
|
||||
name = "fix-gcc9-error.patch";
|
||||
url = "https://github.com/rhboot/efivar/commit/c3c553db85ff10890209d0fe48fb4856ad68e4e0.patch";
|
||||
sha256 = "0lc38npydp069nlcga25wzzm204ww9l6mpjfn6wmhdfhn0pgjwky";
|
||||
})
|
||||
(fetchurl {
|
||||
name = "remove_unused_variable.patch";
|
||||
url = "https://github.com/rhboot/efivar/commit/fdb803402fb32fa6d020bac57a40c7efe4aabb7d.patch";
|
||||
sha256 = "1xhy8v8ff9lyxb830n9hci2fbh7rfps6rwsqrjh4lw7316gwllsd";
|
||||
})
|
||||
(fetchurl {
|
||||
name = "check_string_termination.patch";
|
||||
url = "https://github.com/rhboot/efivar/commit/4e04afc2df9bbc26e5ab524b53a6f4f1e61d7c9e.patch";
|
||||
sha256 = "1ajj11wwsvamfspq4naanvw08h63gr0g71q0dfbrrywrhc0jlmdw";
|
||||
})
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = [
|
||||
"-Wno-error=stringop-truncation"
|
||||
"-flto-partition=none"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ popt ];
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
|
||||
makeFlags = [
|
||||
"prefix=$(out)"
|
||||
"libdir=$(out)/lib"
|
||||
"bindir=$(bin)/bin"
|
||||
"mandir=$(man)/share/man"
|
||||
"includedir=$(dev)/include"
|
||||
"PCDIR=$(dev)/lib/pkgconfig"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
inherit (src.meta) homepage;
|
||||
description = "Tools and library to manipulate EFI variables";
|
||||
platforms = platforms.linux;
|
||||
license = licenses.lgpl21;
|
||||
};
|
||||
}
|
||||
29
pkgs/tools/system/envconsul/default.nix
Normal file
29
pkgs/tools/system/envconsul/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "envconsul";
|
||||
version = "0.12.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hashicorp";
|
||||
repo = "envconsul";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-oV+dGenyNYdVLFn43p+J9TgIbliYOppAKr1ePlMF0d4=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-kal1HR9zRVhQKR/ql63hju7XIHU1KRNDTAlOEqzYR4o=";
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X github.com/hashicorp/envconsul/version.Name=envconsul"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/hashicorp/envconsul/";
|
||||
description = "Read and set environmental variables for processes from Consul";
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
license = licenses.mpl20;
|
||||
maintainers = with maintainers; [ pradeepchhetri ];
|
||||
};
|
||||
}
|
||||
30
pkgs/tools/system/evemu/default.nix
Normal file
30
pkgs/tools/system/evemu/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, stdenv, fetchgit, autoreconfHook, pkg-config, python3Packages
|
||||
, libevdev
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "evemu";
|
||||
version = "2.7.0";
|
||||
|
||||
# We could have downloaded a release tarball from cgit, but it changes hash
|
||||
# each time it is downloaded :/
|
||||
src = fetchgit {
|
||||
url = "git://git.freedesktop.org/git/evemu";
|
||||
rev = "refs/tags/v${version}";
|
||||
sha256 = "sha256-SQDaARuqBMBVlUz+Nw6mjdxaZfVOukmzTlIqy8U2rus=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config autoreconfHook python3Packages.python ];
|
||||
|
||||
buildInputs = [ python3Packages.evdev libevdev ];
|
||||
|
||||
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/";
|
||||
license = with licenses; [ lgpl3Only gpl3Only ];
|
||||
maintainers = [ maintainers.amorsillo ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
34
pkgs/tools/system/facter/default.nix
Normal file
34
pkgs/tools/system/facter/default.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ lib, stdenv, fetchFromGitHub, boost, cmake, cpp-hocon, curl, leatherman, libwhereami, libyamlcpp, openssl, ruby, util-linux }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "facter";
|
||||
version = "3.14.17";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
sha256 = "sha256-RvsUt1DyN8Xr+Xtz84mbKlDwxLewgK6qklYVdQHu6q0=";
|
||||
rev = version;
|
||||
repo = pname;
|
||||
owner = "puppetlabs";
|
||||
};
|
||||
|
||||
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}"
|
||||
"-DRUBY_LIB_INSTALL=${placeholder "out"}/lib/ruby"
|
||||
];
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-Wno-error";
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ boost cpp-hocon curl leatherman libwhereami libyamlcpp openssl ruby util-linux ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/puppetlabs/facter";
|
||||
description = "A system inventory tool";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.womfoo ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
62
pkgs/tools/system/fakechroot/default.nix
Normal file
62
pkgs/tools/system/fakechroot/default.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, nixosTests, perl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fakechroot";
|
||||
version = "2.20.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dex4er";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "0xgnwazrmrg4gm30xjxdn6sx3lhqvxahrh6gmy3yfswxc30pmg86";
|
||||
};
|
||||
|
||||
# Use patch from https://github.com/dex4er/fakechroot/pull/46 , remove once merged!
|
||||
# Courtesy of one of our own, @copumpkin!
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://github.com/dex4er/fakechroot/pull/46/commits/dcc0cfe3941e328538f9e62b2c0b15430d393ec1.patch";
|
||||
sha256 = "1mk8j2njd94s7vf2wggi08xxxzx8dxrvdricl9cbspvkyp715w2m";
|
||||
# Don't bother trying to reconcile conflicts for NEWS entries, as they will continue to occur
|
||||
# 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 ];
|
||||
|
||||
passthru = {
|
||||
tests = {
|
||||
# A lightweight *unit* test that exercises fakeroot and fakechroot together:
|
||||
nixos-etc = nixosTests.etc.test-etc-fakeroot;
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/dex4er/fakechroot";
|
||||
description = "Give a fake chroot environment through LD_PRELOAD";
|
||||
license = licenses.lgpl21;
|
||||
maintainers = with maintainers; [offline];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
|
||||
}
|
||||
51
pkgs/tools/system/fakeroot/default.nix
Normal file
51
pkgs/tools/system/fakeroot/default.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, fetchpatch
|
||||
, getopt
|
||||
, libcap
|
||||
, gnused
|
||||
, nixosTests
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.27";
|
||||
pname = "fakeroot";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://http.debian.net/debian/pool/main/f/fakeroot/fakeroot_${version}.orig.tar.gz";
|
||||
sha256 = "1p5d3jq6l1pzk96agkf05dck7dbgvldx5sg2d4h7d8h230nyni9w";
|
||||
};
|
||||
|
||||
patches = lib.optionals stdenv.isLinux [
|
||||
./einval.patch
|
||||
(fetchpatch {
|
||||
name = "also-wrap-stat-library-call.patch";
|
||||
url = "https://sources.debian.org/data/main/f/fakeroot/1.27-1/debian/patches/also-wrap-stat-library-call.patch";
|
||||
sha256 = "0p7lq6m31k3rqsnjbi06a8ykdqa3cp4y5ngsjyk3q1269gx59x8b";
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = [ getopt gnused ]
|
||||
++ 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
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
tests = {
|
||||
# A lightweight *unit* test that exercises fakeroot and fakechroot together:
|
||||
nixos-etc = nixosTests.etc.test-etc-fakeroot;
|
||||
};
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = "https://salsa.debian.org/clint/fakeroot";
|
||||
description = "Give a fake root environment through LD_PRELOAD";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
maintainers = with lib.maintainers; [viric];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
47
pkgs/tools/system/fakeroot/einval.patch
Normal file
47
pkgs/tools/system/fakeroot/einval.patch
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
Ignore EINVAL errors. This matters within user namespaces.
|
||||
|
||||
See:
|
||||
https://github.com/NixOS/nixpkgs/issues/25901
|
||||
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802612
|
||||
https://github.com/NixOS/nixpkgs/issues/10496
|
||||
|
||||
diff --git a/libfakeroot.c b/libfakeroot.c
|
||||
index 68a95fb..70da8bc 100644
|
||||
--- a/libfakeroot.c
|
||||
+++ b/libfakeroot.c
|
||||
@@ -792,7 +792,7 @@ int chown(const char *path, uid_t owner, gid_t group){
|
||||
r=next_lchown(path,owner,group);
|
||||
else
|
||||
r=0;
|
||||
- if(r&&(errno==EPERM))
|
||||
+ if(r&&(errno==EPERM||errno==EINVAL))
|
||||
r=0;
|
||||
|
||||
return r;
|
||||
@@ -819,7 +819,7 @@ int lchown(const char *path, uid_t owner, gid_t group){
|
||||
r=next_lchown(path,owner,group);
|
||||
else
|
||||
r=0;
|
||||
- if(r&&(errno==EPERM))
|
||||
+ if(r&&(errno==EPERM||errno==EINVAL))
|
||||
r=0;
|
||||
|
||||
return r;
|
||||
@@ -843,7 +843,7 @@ int fchown(int fd, uid_t owner, gid_t group){
|
||||
else
|
||||
r=0;
|
||||
|
||||
- if(r&&(errno==EPERM))
|
||||
+ if(r&&(errno==EPERM||errno==EINVAL))
|
||||
r=0;
|
||||
|
||||
return r;
|
||||
@@ -870,7 +870,7 @@ int fchownat(int dir_fd, const char *path, uid_t owner, gid_t group, int flags)
|
||||
else
|
||||
r=0;
|
||||
|
||||
- if(r&&(errno==EPERM))
|
||||
+ if(r&&(errno==EPERM||errno==EINVAL))
|
||||
r=0;
|
||||
|
||||
return r;
|
||||
47
pkgs/tools/system/fancy-motd/default.nix
Normal file
47
pkgs/tools/system/fancy-motd/default.nix
Normal file
|
|
@ -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";
|
||||
};
|
||||
}
|
||||
61
pkgs/tools/system/fcron/default.nix
Normal file
61
pkgs/tools/system/fcron/default.nix
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
# restart using 'killall -TERM fcron; fcron -b
|
||||
# use convert-fcrontab to update fcrontab files
|
||||
|
||||
{ lib, stdenv, fetchurl, perl, busybox, vim }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fcron";
|
||||
version = "3.3.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://fcron.free.fr/archives/${pname}-${version}.src.tar.gz";
|
||||
sha256 = "sha256-81naoIpj3ft/4vlkuz9cUiRMJao2+SJaPMVNNvRoEQY=";
|
||||
};
|
||||
|
||||
buildInputs = [ perl ];
|
||||
|
||||
patches = [ ./relative-fcronsighup.patch ];
|
||||
|
||||
configureFlags =
|
||||
[ "--with-sendmail=${busybox}/sbin/sendmail"
|
||||
"--with-editor=${vim}/bin/vi" # TODO customizable
|
||||
"--with-bootinstall=no"
|
||||
"--localstatedir=/var"
|
||||
"--sysconfdir=/etc"
|
||||
"--with-rootname=root"
|
||||
"--with-rootgroup=root"
|
||||
"--disable-checks"
|
||||
];
|
||||
|
||||
installTargets = [ "install-staged" ]; # install does also try to change permissions of /etc/* files
|
||||
|
||||
# fcron tries to install pid into system directory on install
|
||||
installFlags = [
|
||||
"ETC=."
|
||||
"PIDDIR=."
|
||||
"PIDFILE=fcron.pid"
|
||||
"REBOOT_LOCK=fcron.reboot"
|
||||
"FIFODIR=."
|
||||
"FIFOFILE=fcron.fifo"
|
||||
"FCRONTABS=."
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
sed -i 's@/usr/bin/env perl@${perl}/bin/perl@g' configure script/*
|
||||
# Don't let fcron create the group fcron, nix(os) should do this
|
||||
sed -i '2s@.*@exit 0@' script/user-group
|
||||
|
||||
# --with-bootinstall=no shoud do this, didn't work. So just exit the script before doing anything
|
||||
sed -i '2s@.*@exit 0@' script/boot-install
|
||||
|
||||
# also don't use chown or chgrp for documentation (or whatever) when installing
|
||||
find -type f | xargs sed -i -e 's@^\(\s\)*chown@\1:@' -e 's@^\(\s\)*chgrp@\1:@'
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description="A command scheduler with extended capabilities over cron and anacron";
|
||||
homepage = "http://fcron.free.fr";
|
||||
license = licenses.gpl2;
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
16
pkgs/tools/system/fcron/relative-fcronsighup.patch
Normal file
16
pkgs/tools/system/fcron/relative-fcronsighup.patch
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
Use relative fcronsighup to prefer setuid executable over package binary.
|
||||
--- fcron-3.2.1.orig/fcrontab.c 2016-06-26 17:02:48.000000000 +0200
|
||||
+++ fcron-3.2.1/fcrontab.c 2017-03-05 21:54:24.676871335 +0100
|
||||
@@ -154,10 +154,10 @@
|
||||
fcrontab_gid);
|
||||
exit(ERR);
|
||||
}
|
||||
- execl(BINDIREX "/fcronsighup", BINDIREX "/fcronsighup", fcronconf,
|
||||
+ execlp("fcronsighup", "fcronsighup", fcronconf,
|
||||
NULL);
|
||||
|
||||
- error_e("Could not exec " BINDIREX " fcronsighup");
|
||||
+ error_e("Could not exec fcronsighup");
|
||||
exit(ERR);
|
||||
break;
|
||||
|
||||
30
pkgs/tools/system/fdisk/default.nix
Normal file
30
pkgs/tools/system/fdisk/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ fetchurl, lib, stdenv, parted, libuuid, gettext, guile }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gnufdisk";
|
||||
version = "2.0.0a"; # .0a1 seems broken, see https://lists.gnu.org/archive/html/bug-fdisk/2012-09/msg00000.html
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/fdisk/gnufdisk-${version}.tar.gz";
|
||||
sha256 = "04nd7civ561x2lwcmxhsqbprml3178jfc58fy1v7hzqg5k4nbhy3";
|
||||
};
|
||||
|
||||
buildInputs = [ parted libuuid gettext guile ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
description = "A command-line disk partitioning tool";
|
||||
|
||||
longDescription = ''
|
||||
GNU fdisk provides alternatives to util-linux fdisk and util-linux
|
||||
cfdisk. It uses GNU Parted.
|
||||
'';
|
||||
|
||||
license = lib.licenses.gpl3Plus;
|
||||
|
||||
homepage = "https://www.gnu.org/software/fdisk/";
|
||||
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
48
pkgs/tools/system/fio/default.nix
Normal file
48
pkgs/tools/system/fio/default.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{ lib, stdenv, fetchFromGitHub, makeWrapper
|
||||
, libaio, python3, zlib
|
||||
, withGnuplot ? false, gnuplot ? null }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fio";
|
||||
version = "3.30";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "axboe";
|
||||
repo = "fio";
|
||||
rev = "fio-${version}";
|
||||
sha256 = "sha256-X2B8xlCLSHDgTaH55TUJq4WcaObZy/fvfkQ0j3J9Kzo=";
|
||||
};
|
||||
|
||||
buildInputs = [ python3 zlib ]
|
||||
++ lib.optional (!stdenv.isDarwin) libaio;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper python3.pkgs.wrapPython ];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace "mandir = /usr/share/man" "mandir = \$(prefix)/man" \
|
||||
--replace "sharedir = /usr/share/fio" "sharedir = \$(prefix)/share/fio"
|
||||
substituteInPlace tools/plot/fio2gnuplot --replace /usr/share/fio $out/share/fio
|
||||
'';
|
||||
|
||||
pythonPath = [ python3.pkgs.six ];
|
||||
|
||||
makeWrapperArgs = lib.optional withGnuplot [
|
||||
"--prefix PATH : ${lib.makeBinPath [ gnuplot ]}"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
wrapPythonProgramsIn "$out/bin" "$out $pythonPath"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Flexible IO Tester - an IO benchmark tool";
|
||||
homepage = "https://git.kernel.dk/cgit/fio/";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
3
pkgs/tools/system/foreman/Gemfile
Normal file
3
pkgs/tools/system/foreman/Gemfile
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
source "https://rubygems.org"
|
||||
|
||||
gem "foreman"
|
||||
17
pkgs/tools/system/foreman/Gemfile.lock
Normal file
17
pkgs/tools/system/foreman/Gemfile.lock
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
foreman (0.87.2)
|
||||
|
||||
PLATFORMS
|
||||
aarch64-darwin
|
||||
aarch64-linux
|
||||
ruby
|
||||
x86_64-darwin
|
||||
x86_64-linux
|
||||
|
||||
DEPENDENCIES
|
||||
foreman
|
||||
|
||||
BUNDLED WITH
|
||||
2.2.20
|
||||
15
pkgs/tools/system/foreman/default.nix
Normal file
15
pkgs/tools/system/foreman/default.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ bundlerEnv, lib, ruby }:
|
||||
|
||||
bundlerEnv {
|
||||
inherit ruby;
|
||||
pname = "foreman";
|
||||
gemdir = ./.;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Process manager for applications with multiple components";
|
||||
homepage = "https://github.com/ddollar/foreman";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ zimbatm ];
|
||||
platforms = ruby.meta.platforms;
|
||||
};
|
||||
}
|
||||
12
pkgs/tools/system/foreman/gemset.nix
Normal file
12
pkgs/tools/system/foreman/gemset.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
foreman = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0szgxvnzwkzrfbq5dkwa98mig78aqglfy6irdsvq1gq045pbq9r7";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.87.2";
|
||||
};
|
||||
}
|
||||
44
pkgs/tools/system/foremost/default.nix
Normal file
44
pkgs/tools/system/foremost/default.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "foremost";
|
||||
version = "1.5.7";
|
||||
|
||||
src = fetchurl {
|
||||
sha256 = "0d2zxw0ijg8cd3ksgm8cf8jg128zr5x7z779jar90g9f47pm882h";
|
||||
url = "http://foremost.sourceforge.net/pkg/${pname}-${version}.tar.gz";
|
||||
};
|
||||
|
||||
patches = [ ./makefile.patch ];
|
||||
|
||||
# -fcommon: Workaround build failure on -fno-common toolchains like upstream
|
||||
# gcc-10. Otherwise build fails as:
|
||||
# ld: api.o:(.bss+0xbdba0): multiple definition of `wildcard'; main.o:(.bss+0xbd760): first defined here
|
||||
NIX_CFLAGS_COMPILE = "-fcommon";
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p $out/{bin,share/man/man8}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Recover files based on their contents";
|
||||
longDescription = ''
|
||||
Foremost is a console program to recover files based on their headers,
|
||||
footers, and internal data structures. Foremost can work on image files, such
|
||||
as those generated by dd, Safeback, Encase, etc, or directly on a drive.
|
||||
The headers and footers can be specified by a configuration file or you can
|
||||
use command line switches to specify built-in file types. These built-in types
|
||||
look at the data structures of a given file format allowing for a more
|
||||
reliable and faster recovery.
|
||||
'';
|
||||
homepage = "http://foremost.sourceforge.net/";
|
||||
license = licenses.publicDomain;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
23
pkgs/tools/system/foremost/makefile.patch
Normal file
23
pkgs/tools/system/foremost/makefile.patch
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
--- a/Makefile 2015-04-21 00:40:46.949266581 +0200
|
||||
+++ b/Makefile 2015-04-21 00:41:38.637165883 +0200
|
||||
@@ -24,9 +24,9 @@
|
||||
RAW_FLAGS += -DVERSION=\"$(VERSION)\"
|
||||
|
||||
# Where we get installed
|
||||
-BIN = /usr/local/bin
|
||||
-MAN = /usr/share/man/man8
|
||||
-CONF= /usr/local/etc
|
||||
+BIN = $(PREFIX)/bin
|
||||
+MAN = $(PREFIX)/share/man/man8
|
||||
+CONF= $(PREFIX)/etc
|
||||
# Setup for compiling and cross-compiling for Windows
|
||||
# The CR_ prefix refers to cross compiling from OSX to Windows
|
||||
CR_CC = $(CR_BASE)/gcc
|
||||
@@ -120,7 +120,6 @@
|
||||
install: goals
|
||||
install -m 755 $(NAME) $(BIN)
|
||||
install -m 444 $(MAN_PAGES) $(MAN)
|
||||
- install -m 444 foremost.conf $(CONF)
|
||||
macinstall: BIN = /usr/local/bin/
|
||||
macinstall: MAN = /usr/share/man/man1/
|
||||
macinstall: CONF = /usr/local/etc/
|
||||
46
pkgs/tools/system/freeipmi/default.nix
Normal file
46
pkgs/tools/system/freeipmi/default.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{ buildPackages, fetchurl, lib, stdenv, libgcrypt, readline, libgpg-error }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.6.9";
|
||||
pname = "freeipmi";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/freeipmi/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-8l4cNfPQ8bWpnMMezCNTyoPtRqFRY4QvuocBJ9ycggY=";
|
||||
};
|
||||
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
|
||||
buildInputs = [ libgcrypt readline libgpg-error ];
|
||||
|
||||
configureFlags = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform)
|
||||
[ "ac_cv_file__dev_urandom=true" "ac_cv_file__dev_random=true" ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
description = "Implementation of the Intelligent Platform Management Interface";
|
||||
|
||||
longDescription =
|
||||
'' GNU FreeIPMI provides in-band and out-of-band IPMI software based on
|
||||
the IPMI v1.5/2.0 specification. The IPMI specification defines a
|
||||
set of interfaces for platform management and is implemented by a
|
||||
number vendors for system management. The features of IPMI that
|
||||
most users will be interested in are sensor monitoring, system event
|
||||
monitoring, power control, and serial-over-LAN (SOL). The FreeIPMI
|
||||
tools and libraries listed below should provide users with the
|
||||
ability to access and utilize these and many other features. A
|
||||
number of useful features for large HPC or cluster environments have
|
||||
also been implemented into FreeIPMI. See the README or FAQ for more
|
||||
info.
|
||||
'';
|
||||
|
||||
homepage = "https://www.gnu.org/software/freeipmi/";
|
||||
downloadPage = "https://www.gnu.org/software/freeipmi/download.html";
|
||||
|
||||
license = lib.licenses.gpl3Plus;
|
||||
|
||||
maintainers = with lib.maintainers; [ raskin ];
|
||||
platforms = lib.platforms.gnu ++ lib.platforms.linux; # arbitrary choice
|
||||
};
|
||||
}
|
||||
28
pkgs/tools/system/gdmap/default.nix
Normal file
28
pkgs/tools/system/gdmap/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ lib, stdenv, fetchurl, gtk2, pkg-config, libxml2, intltool, gettext }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gdmap";
|
||||
version = "0.8.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/gdmap/gdmap-${version}.tar.gz";
|
||||
sha256 = "0nr8l88cg19zj585hczj8v73yh21k7j13xivhlzl8jdk0j0cj052";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ gtk2 libxml2 intltool gettext ];
|
||||
|
||||
patches = [ ./get_sensitive.patch ./set_flags.patch ];
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
NIX_LDFLAGS = "-lm";
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://gdmap.sourceforge.net";
|
||||
description = "Recursive rectangle map of disk usage";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.bjornfor ];
|
||||
};
|
||||
}
|
||||
34
pkgs/tools/system/gdmap/get_sensitive.patch
Normal file
34
pkgs/tools/system/gdmap/get_sensitive.patch
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
From 166de50914191303b232ec123cfbaadad521560c Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Myltsev <avm@altlinux.ru>
|
||||
Date: Wed, 21 Apr 2010 22:43:14 +0400
|
||||
Subject: [PATCH] GTK_WIDGET_SENSITIVE -> gtk_widget_get_sensitive
|
||||
|
||||
---
|
||||
gdmap/src/gui_support.c | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/gui_support.c b/src/gui_support.c
|
||||
index 3027e29..45272d3 100644
|
||||
--- a/src/gui_support.c
|
||||
+++ b/src/gui_support.c
|
||||
@@ -85,7 +85,7 @@ on_ebox_enter(GtkWidget* box, GdkEventCrossing* event, GtkLabel* label) {
|
||||
const char* text;
|
||||
|
||||
(void)event;
|
||||
- if (GTK_WIDGET_SENSITIVE(label)) {
|
||||
+ if (gtk_widget_get_sensitive(GTK_WIDGET(label))) {
|
||||
char* temp;
|
||||
|
||||
text = g_object_get_data(G_OBJECT(label), "label");
|
||||
@@ -129,7 +129,7 @@ static void on_clear_label(GtkWidget* widget) {
|
||||
void ui_event_label_set_sensitive(GtkWidget* ebox, gboolean set) {
|
||||
gpointer callback = g_object_get_data(G_OBJECT(ebox), "callback");
|
||||
GtkWidget* child = GTK_BIN(ebox)->child;
|
||||
- if (GTK_WIDGET_SENSITIVE(child) == set) return;
|
||||
+ if (gtk_widget_get_sensitive(child) == set) return;
|
||||
|
||||
if (set && !callback) return;
|
||||
gtk_widget_set_sensitive(child, set);
|
||||
--
|
||||
1.7.3.3
|
||||
|
||||
25
pkgs/tools/system/gdmap/set_flags.patch
Normal file
25
pkgs/tools/system/gdmap/set_flags.patch
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
From 9a5537d2b0aba18438dd77a45354ac2e73eae23d Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Myltsev <avm@altlinux.ru>
|
||||
Date: Mon, 13 Dec 2010 23:24:30 +0300
|
||||
Subject: [PATCH] GTK_WIDGET_SET_FLAGS -> gtk_widget_set_can_focus
|
||||
|
||||
---
|
||||
gdmap/src/gui_support.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/gui_support.c b/src/gui_support.c
|
||||
index 45272d3..ca02d72 100644
|
||||
--- a/src/gui_support.c
|
||||
+++ b/src/gui_support.c
|
||||
@@ -164,7 +164,7 @@ GtkWidget* ui_create_event_label(const char* text, GCallback callback,
|
||||
// GDK_FOCUS_CHANGE_MASK |
|
||||
GDK_ENTER_NOTIFY_MASK |
|
||||
GDK_LEAVE_NOTIFY_MASK);
|
||||
- GTK_WIDGET_SET_FLAGS(ebox, GTK_CAN_FOCUS);
|
||||
+ gtk_widget_set_can_focus(ebox, TRUE);
|
||||
|
||||
gtk_widget_show(ebox);
|
||||
|
||||
--
|
||||
1.7.3.3
|
||||
|
||||
51
pkgs/tools/system/gdu/default.nix
Normal file
51
pkgs/tools/system/gdu/default.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, buildGoModule
|
||||
, fetchFromGitHub
|
||||
, installShellFiles
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "gdu";
|
||||
version = "5.14.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dundee";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-a0H/OqIHgutuW1egqlhMy5mX2FMYxmAwCbhecCrXuOU=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-9+Zez33oET0nx/Xm3fXh1WFoQduMBodvml1oGO6jUYc=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
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 maintainers.zowoq ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
86
pkgs/tools/system/gkraken/default.nix
Normal file
86
pkgs/tools/system/gkraken/default.nix
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
{ python3Packages
|
||||
, lib
|
||||
, fetchFromGitLab
|
||||
, meson
|
||||
, pkg-config
|
||||
, glib
|
||||
, ninja
|
||||
, desktop-file-utils
|
||||
, gobject-introspection
|
||||
, gtk3
|
||||
, libnotify
|
||||
, dbus
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "gkraken";
|
||||
version = "1.2.0";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "leinardi";
|
||||
repo = "gkraken";
|
||||
rev = version;
|
||||
sha256 = "0hxlh0319rl28iba02917z3n6d5cq2qcgpj2ng31bkjjhlvvfm2g";
|
||||
};
|
||||
|
||||
format = "other";
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs scripts/meson_post_install.py
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
pkg-config
|
||||
glib
|
||||
ninja
|
||||
gtk3
|
||||
desktop-file-utils
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gobject-introspection
|
||||
glib
|
||||
gtk3
|
||||
libnotify
|
||||
dbus
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
pygobject3
|
||||
peewee
|
||||
rx
|
||||
injector
|
||||
liquidctl
|
||||
pyxdg
|
||||
requests
|
||||
matplotlib
|
||||
dbus-python
|
||||
];
|
||||
|
||||
dontWrapGApps = true;
|
||||
|
||||
# Extract udev rules from python code
|
||||
postInstall = ''
|
||||
mkdir -p $out/lib/udev/rules.d
|
||||
sed -e '/\s*\(from\|@singleton\|@inject\)/d' $src/gkraken/interactor/udev_interactor.py > udev_interactor.py
|
||||
python -c 'from udev_interactor import _UDEV_RULE; print(_UDEV_RULE)' > $out/lib/udev/rules.d/60-gkraken.rules
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
makeWrapperArgs+=(
|
||||
"''${gappsWrapperArgs[@]}"
|
||||
)
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "GUI that allows to control the cooling (fan and/or pump profiles) of NZXT Kraken AIO liquid coolers from Linux";
|
||||
homepage = "https://gitlab.com/leinardi/gkraken";
|
||||
changelog = "https://gitlab.com/leinardi/gkraken/-/tags/${version}";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ OPNA2608 ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
29
pkgs/tools/system/go-audit/default.nix
Normal file
29
pkgs/tools/system/go-audit/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ buildGoModule
|
||||
, fetchFromGitHub
|
||||
, lib
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "go-audit";
|
||||
version = "1.1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "slackhq";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-iJm33IZ3kGWnGVDVbQCTvoo+dXBU5092YYXZG+Z7vi0=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-sQBnnBZm7kM8IAfsFhSIBLo2LLdTimVAQw1ogWo/a4Y=";
|
||||
|
||||
# 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;
|
||||
};
|
||||
}
|
||||
33
pkgs/tools/system/gohai/default.nix
Normal file
33
pkgs/tools/system/gohai/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "gohai";
|
||||
version = "unstable-2022-04-12";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "DataDog";
|
||||
repo = "gohai";
|
||||
rev = "c614f513e87f04d3d19b2d4ae853cc5703f3a9bc";
|
||||
sha256 = "sha256-vdzGGTg9SHYS0OQUn3VvrQGpKxzqxBRXDKOm0c7FvYY=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-aN1fwGbBm45e6qdRu+4wnv2ZI7SOsIPONB4vF9o2vlI=";
|
||||
|
||||
ldflags = [ "-s" "-w" ];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "System information collector";
|
||||
homepage = "https://github.com/DataDog/gohai";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ tazjin ];
|
||||
platforms = platforms.unix;
|
||||
|
||||
longDescription = ''
|
||||
Gohai is a tool which collects an inventory of system
|
||||
information. It is used by the Datadog agent to provide detailed
|
||||
system metrics.
|
||||
'';
|
||||
};
|
||||
}
|
||||
29
pkgs/tools/system/goreman/default.nix
Normal file
29
pkgs/tools/system/goreman/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "goreman";
|
||||
version = "0.3.11";
|
||||
rev = "6006c6e410ec5a5ba22b50e96227754a42f2834d";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mattn";
|
||||
repo = "goreman";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-TbJfeU94wakI2028kDqU+7dRRmqXuqpPeL4XBaA/HPo=";
|
||||
};
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X main.revision=${builtins.substring 0 7 rev}"
|
||||
];
|
||||
|
||||
vendorSha256 = "sha256-87aHBRWm5Odv6LeshZty5N31sC+vdSwGlTYhk3BZkPo=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "foreman clone written in go language";
|
||||
homepage = "https://github.com/mattn/goreman";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ zimbatm ];
|
||||
};
|
||||
}
|
||||
40
pkgs/tools/system/gotop/default.nix
Normal file
40
pkgs/tools/system/gotop/default.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "gotop";
|
||||
version = "4.1.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "xxxserxxx";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-oDM+dpAT1vDpp2NkD669hwbgw7HWJGFqhsql9PvbxSk=";
|
||||
};
|
||||
|
||||
proxyVendor = true;
|
||||
vendorSha256 = "sha256-WGLcpF1NqVQDiU3M9rQ555ZW3sDC3Szch+skTZgt0xg=";
|
||||
|
||||
ldflags = [ "-s" "-w" "-X main.Version=v${version}" ];
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
preCheck = ''
|
||||
export HOME=$(mktemp -d)
|
||||
'';
|
||||
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
postInstall = ''
|
||||
$out/bin/gotop --create-manpage > gotop.1
|
||||
installManPage gotop.1
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A terminal based graphical activity monitor inspired by gtop and vtop";
|
||||
homepage = "https://github.com/xxxserxxx/gotop";
|
||||
changelog = "https://github.com/xxxserxxx/gotop/raw/v${version}/CHANGELOG.md";
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.magnetophon ];
|
||||
broken = stdenv.isDarwin; # needs to update gopsutil to at least v3.21.3 to include https://github.com/shirou/gopsutil/pull/1042
|
||||
};
|
||||
}
|
||||
58
pkgs/tools/system/gptfdisk/default.nix
Normal file
58
pkgs/tools/system/gptfdisk/default.nix
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
{ fetchurl, lib, stdenv, libuuid, popt, icu, ncurses, nixosTests }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gptfdisk";
|
||||
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 = "sha256-ldGYVvAE2rxLjDQrJhLo0KnuvdUgBClxiDafFS6dxt8=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# fix build failure against ncurses-6.3 (pending upstream inclusion):
|
||||
# https://sourceforge.net/p/gptfdisk/mailman/message/37392412/
|
||||
./ncurses-6.3.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs gdisk_test.sh
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
substituteInPlace Makefile.mac --replace \
|
||||
"-mmacosx-version-min=10.4" "-mmacosx-version-min=10.6"
|
||||
substituteInPlace Makefile.mac --replace \
|
||||
" -arch i386" ""
|
||||
substituteInPlace Makefile.mac --replace \
|
||||
" -I/opt/local/include -I /usr/local/include -I/opt/local/include" ""
|
||||
substituteInPlace Makefile.mac --replace \
|
||||
"/opt/local/lib/libncurses.a" "${ncurses.out}/lib/libncurses.dylib"
|
||||
'';
|
||||
|
||||
buildPhase = lib.optionalString stdenv.isDarwin "make -f Makefile.mac";
|
||||
buildInputs = [ libuuid popt icu ncurses ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/sbin
|
||||
mkdir -p $out/share/man/man8
|
||||
for prog in gdisk sgdisk fixparts cgdisk
|
||||
do
|
||||
install -v -m755 $prog $out/sbin
|
||||
install -v -m644 $prog.8 $out/share/man/man8
|
||||
done
|
||||
'';
|
||||
|
||||
passthru.tests = lib.optionalAttrs stdenv.hostPlatform.isx86 {
|
||||
installer-simpleLabels = nixosTests.installer.simpleLabels;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
broken = stdenv.isDarwin;
|
||||
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 ];
|
||||
};
|
||||
}
|
||||
96
pkgs/tools/system/gptfdisk/ncurses-6.3.patch
Normal file
96
pkgs/tools/system/gptfdisk/ncurses-6.3.patch
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
From 9d5032d1487a8fe6ef7229d413418a27e32a28e5 Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Trofimovich <slyich@gmail.com>
|
||||
Date: Mon, 1 Nov 2021 07:51:10 +0000
|
||||
Subject: [PATCH:gptfdisk] gptcurses.cc: always use "%s"-style format for printf()-style
|
||||
functions
|
||||
|
||||
`ncuses-6.3` added printf-style function attributes and now makes
|
||||
it easier to catch cases when user input is used in palce of format
|
||||
string when built with CFLAGS=-Werror=format-security:
|
||||
|
||||
gptcurses.cc:274:10: error:
|
||||
format not a string literal and no format arguments [-Werror=format-security]
|
||||
274 | printw(theLine.c_str());
|
||||
| ~~~~~~^~~~~~~~~~~~~~~~~
|
||||
|
||||
Let's wrap all the missing places with "%s" format.
|
||||
---
|
||||
gptcurses.cc | 24 ++++++++++++------------
|
||||
1 file changed, 12 insertions(+), 12 deletions(-)
|
||||
|
||||
--- a/gptcurses.cc
|
||||
+++ b/gptcurses.cc
|
||||
@@ -239,22 +239,22 @@ Space* GPTDataCurses::ShowSpace(int spaceNum, int lineNum) {
|
||||
ClearLine(lineNum);
|
||||
if (space->partNum == -1) { // space is empty
|
||||
move(lineNum, 12);
|
||||
- printw(BytesToIeee((space->lastLBA - space->firstLBA + 1), blockSize).c_str());
|
||||
+ printw("%s", BytesToIeee((space->lastLBA - space->firstLBA + 1), blockSize).c_str());
|
||||
move(lineNum, 24);
|
||||
printw("free space");
|
||||
} else { // space holds a partition
|
||||
move(lineNum, 3);
|
||||
printw("%d", space->partNum + 1);
|
||||
move(lineNum, 12);
|
||||
- printw(BytesToIeee((space->lastLBA - space->firstLBA + 1), blockSize).c_str());
|
||||
+ printw("%s", BytesToIeee((space->lastLBA - space->firstLBA + 1), blockSize).c_str());
|
||||
move(lineNum, 24);
|
||||
- printw(space->origPart->GetTypeName().c_str());
|
||||
+ printw("%s", space->origPart->GetTypeName().c_str());
|
||||
move(lineNum, 50);
|
||||
#ifdef USE_UTF16
|
||||
space->origPart->GetDescription().extract(0, 39, temp, 39);
|
||||
- printw(temp);
|
||||
+ printw("%s", temp);
|
||||
#else
|
||||
- printw(space->origPart->GetDescription().c_str());
|
||||
+ printw("%s", space->origPart->GetDescription().c_str());
|
||||
#endif
|
||||
} // if/else
|
||||
} // if
|
||||
@@ -271,10 +271,10 @@ int GPTDataCurses::DisplayParts(int selected) {
|
||||
|
||||
move(lineNum++, 0);
|
||||
theLine = "Part. # Size Partition Type Partition Name";
|
||||
- printw(theLine.c_str());
|
||||
+ printw("%s", theLine.c_str());
|
||||
move(lineNum++, 0);
|
||||
theLine = "----------------------------------------------------------------";
|
||||
- printw(theLine.c_str());
|
||||
+ printw("%s", theLine.c_str());
|
||||
numToShow = LINES - RESERVED_TOP - RESERVED_BOTTOM;
|
||||
pageNum = selected / numToShow;
|
||||
for (i = pageNum * numToShow; i <= (pageNum + 1) * numToShow - 1; i++) {
|
||||
@@ -636,7 +636,7 @@ void GPTDataCurses::DisplayOptions(char selectedKey) {
|
||||
} // if/else
|
||||
} // for
|
||||
move(LINES - 1, (COLS - optionDesc.length()) / 2);
|
||||
- printw(optionDesc.c_str());
|
||||
+ printw("%s", optionDesc.c_str());
|
||||
currentKey = selectedKey;
|
||||
} // if
|
||||
} // GPTDataCurses::DisplayOptions()
|
||||
@@ -748,11 +748,11 @@ void GPTDataCurses::DrawMenu(void) {
|
||||
|
||||
clear();
|
||||
move(0, (COLS - title.length()) / 2);
|
||||
- printw(title.c_str());
|
||||
+ printw("%s", title.c_str());
|
||||
move(2, (COLS - drive.length()) / 2);
|
||||
- printw(drive.c_str());
|
||||
+ printw("%s", drive.c_str());
|
||||
move(3, (COLS - size.str().length()) / 2);
|
||||
- printw(size.str().c_str());
|
||||
+ printw("%s", size.str().c_str());
|
||||
DisplayParts(currentSpaceNum);
|
||||
} // DrawMenu
|
||||
|
||||
@@ -802,7 +802,7 @@ void PromptToContinue(void) {
|
||||
void Report(string theText) {
|
||||
clear();
|
||||
move(0, 0);
|
||||
- printw(theText.c_str());
|
||||
+ printw("%s", theText.c_str());
|
||||
move(LINES - 2, (COLS - 29) / 2);
|
||||
printw("Press any key to continue....");
|
||||
cbreak();
|
||||
24
pkgs/tools/system/gptman/default.nix
Normal file
24
pkgs/tools/system/gptman/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ lib, stdenv, fetchFromGitHub, rustPlatform, libiconv }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "gptman";
|
||||
version = "0.8.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cecton";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-hI3F1E1vdbNDEeJ4FrU0EvR0t64svzUIpI6zaf0CquM=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-3PRGPZGymccRo9dtQZgMMEL29x+GiUkTzgc8uAB/ocQ=";
|
||||
|
||||
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 ];
|
||||
};
|
||||
}
|
||||
27
pkgs/tools/system/gt5/default.nix
Normal file
27
pkgs/tools/system/gt5/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{lib, stdenv, fetchurl}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gt5";
|
||||
version = "1.4.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/gt5/gt5-${version}.tar.gz";
|
||||
sha256 = "0gm0gzyp4d9rxqddbaskbz5zvmlhyr4nyb5x9g7x4abyyxqjlnkq";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
sed 's/-o root -g root//' -i Makefile
|
||||
'';
|
||||
|
||||
preConfigure = ''
|
||||
makeFlags="$makeFlags PREFIX=$out"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A diff-capable 'du' browser";
|
||||
homepage = "http://gt5.sourceforge.net/";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
maintainers = with lib.maintainers; [viric];
|
||||
platforms = with lib.platforms; all;
|
||||
};
|
||||
}
|
||||
50
pkgs/tools/system/hardinfo/default.nix
Normal file
50
pkgs/tools/system/hardinfo/default.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{ lib, stdenv, fetchurl, which, pkg-config, gtk2, pcre, glib, libxml2
|
||||
, libsoup ? null
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "hardinfo";
|
||||
version = "0.5.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/project/hardinfo.berlios/hardinfo-${version}.tar.bz2";
|
||||
sha256 = "0yhvfc5icam3i4mphlz0m9d9d2irjw8mbsxq203x59wjgh6nrpx0";
|
||||
};
|
||||
|
||||
# Not adding 'hostname' command, the build shouldn't depend on what the build
|
||||
# host is called.
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ which gtk2 pcre glib libxml2 libsoup ];
|
||||
|
||||
# Fixes '#error You must compile this program without "-O"'
|
||||
hardeningDisable = [ "all" ];
|
||||
|
||||
# Ignore undefined references to a bunch of libsoup symbols
|
||||
NIX_LDFLAGS = "--unresolved-symbol=ignore-all";
|
||||
|
||||
preConfigure = ''
|
||||
patchShebangs configure
|
||||
|
||||
# -std=gnu89 fixes build error, copied from
|
||||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=757525
|
||||
sed -i -e "s/^CFLAGS = \(.*\)/CFLAGS = \1 -std=gnu89/" Makefile.in
|
||||
|
||||
substituteInPlace ./arch/linux/common/modules.h --replace /sbin/modinfo modinfo
|
||||
substituteInPlace ./arch/linux/common/os.h --replace /lib/libc.so.6 ${stdenv.cc.libc}/lib/libc.so
|
||||
'';
|
||||
|
||||
# Makefile supports DESTDIR but not PREFIX (it hardcodes $DESTDIR/usr/).
|
||||
installFlags = [ "DESTDIR=$(out)" ];
|
||||
postInstall = ''
|
||||
mv "$out/usr/"* "$out"
|
||||
rmdir "$out/usr"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://hardinfo.org/";
|
||||
description = "Display information about your hardware and operating system";
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ bjornfor ];
|
||||
platforms = [ "x86_64-linux" "i686-linux" ]; # ARMv7 and AArch64 are unsupported
|
||||
};
|
||||
}
|
||||
32
pkgs/tools/system/hardlink/default.nix
Normal file
32
pkgs/tools/system/hardlink/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib, stdenv, fetchurl, pcre2 }:
|
||||
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "hardlink";
|
||||
version = "1.3-4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://src.fedoraproject.org/cgit/rpms/hardlink.git/snapshot/hardlink-aa6325ac4e8100b8ac7d38c7f0bc2708e69bd855.tar.xz";
|
||||
sha256 = "0g4hyrnd9hpykbf06qvvp3s4yyk7flbd95gilkf7r3w9vqiagvs2";
|
||||
};
|
||||
|
||||
buildInputs = [ pcre2 ];
|
||||
NIX_CFLAGS_LINK = "-lpcre2-8";
|
||||
|
||||
buildPhase = ''
|
||||
$CC -O2 hardlink.c -o hardlink $NIX_CFLAGS_LINK
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/share/man/man1
|
||||
cp -f hardlink $out/bin/hardlink
|
||||
cp -f hardlink.1 $out/share/man/man1/hardlink.1
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Consolidate duplicate files via hardlinks";
|
||||
homepage = "https://pagure.io/hardlink";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
3
pkgs/tools/system/hiera-eyaml/Gemfile
Normal file
3
pkgs/tools/system/hiera-eyaml/Gemfile
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
source 'https://rubygems.org'
|
||||
|
||||
gem 'hiera-eyaml'
|
||||
17
pkgs/tools/system/hiera-eyaml/Gemfile.lock
Normal file
17
pkgs/tools/system/hiera-eyaml/Gemfile.lock
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
hiera-eyaml (3.0.0)
|
||||
highline (~> 1.6.19)
|
||||
optimist
|
||||
highline (1.6.21)
|
||||
optimist (3.0.0)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
hiera-eyaml
|
||||
|
||||
BUNDLED WITH
|
||||
2.1.4
|
||||
17
pkgs/tools/system/hiera-eyaml/default.nix
Normal file
17
pkgs/tools/system/hiera-eyaml/default.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ lib, bundlerEnv, ruby, bundlerUpdateScript }:
|
||||
|
||||
bundlerEnv {
|
||||
inherit ruby;
|
||||
pname = "hiera-eyaml";
|
||||
gemdir = ./.;
|
||||
|
||||
passthru.updateScript = bundlerUpdateScript "hiera-eyaml";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Per-value asymmetric encryption of sensitive data for Hiera";
|
||||
homepage = "https://github.com/TomPoulton/hiera-eyaml";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ benley nicknovitski ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
31
pkgs/tools/system/hiera-eyaml/gemset.nix
Normal file
31
pkgs/tools/system/hiera-eyaml/gemset.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
hiera-eyaml = {
|
||||
dependencies = ["highline" "optimist"];
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "049rxnwyivqgyjl0sjg7cb2q44ic0wsml288caspd1ps8v31gl18";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.0.0";
|
||||
};
|
||||
highline = {
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "06bml1fjsnrhd956wqq5k3w8cyd09rv1vixdpa3zzkl6xs72jdn1";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.6.21";
|
||||
};
|
||||
optimist = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "05jxrp3nbn5iilc1k7ir90mfnwc5abc9h78s5rpm3qafwqxvcj4j";
|
||||
type = "gem";
|
||||
};
|
||||
version = "3.0.0";
|
||||
};
|
||||
}
|
||||
40
pkgs/tools/system/honcho/default.nix
Normal file
40
pkgs/tools/system/honcho/default.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ lib, fetchFromGitHub, python3Packages }:
|
||||
|
||||
let
|
||||
inherit (python3Packages) python;
|
||||
pname = "honcho";
|
||||
|
||||
in
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
name = "${pname}-${version}";
|
||||
version = "1.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nickstenning";
|
||||
repo = "honcho";
|
||||
rev = "v${version}";
|
||||
sha256 = "1y0r8dw4pqcq7r4n58ixjdg1iy60lp0gxsd7d2jmhals16ij71rj";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ python3Packages.setuptools ];
|
||||
|
||||
checkInputs = with python3Packages; [ jinja2 pytest mock coverage ];
|
||||
|
||||
# missing plugins
|
||||
doCheck = false;
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
PATH=$out/bin:$PATH coverage run -m pytest
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
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";
|
||||
maintainers = with maintainers; [ benley ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
46
pkgs/tools/system/hostctl/default.nix
Normal file
46
pkgs/tools/system/hostctl/default.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{ lib
|
||||
, buildGoModule
|
||||
, fetchFromGitHub
|
||||
, installShellFiles
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "hostctl";
|
||||
version = "1.1.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "guumaster";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-rvUm31WRSLusM9VGsIHKGTH6Vs8LWPtzPDs3azA710w=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-rGDWrivIdl5FTu/kNR8nAfE2+1hE4cm3uDg7oBobE9M=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
installShellFiles
|
||||
];
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X github.com/guumaster/hostctl/cmd/hostctl/actions.version=${version}"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd hostctl \
|
||||
--bash <($out/bin/hostctl completion bash) \
|
||||
--zsh <($out/bin/hostctl completion zsh)
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "CLI tool to manage the /etc/hosts file";
|
||||
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 ];
|
||||
};
|
||||
}
|
||||
50
pkgs/tools/system/htop/default.nix
Normal file
50
pkgs/tools/system/htop/default.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{ lib, fetchFromGitHub, stdenv, autoreconfHook
|
||||
, ncurses
|
||||
, IOKit
|
||||
, sensorsSupport ? stdenv.isLinux, lm_sensors
|
||||
, systemdSupport ? stdenv.isLinux, systemd
|
||||
}:
|
||||
|
||||
assert systemdSupport -> stdenv.isLinux;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "htop";
|
||||
version = "3.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "htop-dev";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-MwtsvdPHcUdegsYj9NGyded5XJQxXri1IM1j4gef1Xk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
|
||||
buildInputs = [ ncurses ]
|
||||
++ lib.optional stdenv.isDarwin IOKit
|
||||
++ lib.optional sensorsSupport lm_sensors
|
||||
++ lib.optional systemdSupport systemd
|
||||
;
|
||||
|
||||
configureFlags = [ "--enable-unicode" "--sysconfdir=/etc" ]
|
||||
++ lib.optional sensorsSupport "--with-sensors"
|
||||
;
|
||||
|
||||
postFixup =
|
||||
let
|
||||
optionalPatch = pred: so: lib.optionalString pred "patchelf --add-needed ${so} $out/bin/htop";
|
||||
in
|
||||
''
|
||||
${optionalPatch sensorsSupport "${lm_sensors}/lib/libsensors.so"}
|
||||
${optionalPatch systemdSupport "${systemd}/lib/libsystemd.so"}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "An interactive process viewer";
|
||||
homepage = "https://htop.dev";
|
||||
license = licenses.gpl2Only;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ rob relrod SuperSandro2000 ];
|
||||
changelog = "https://github.com/htop-dev/htop/blob/${version}/ChangeLog";
|
||||
};
|
||||
}
|
||||
21
pkgs/tools/system/htop/htop-vim.nix
Normal file
21
pkgs/tools/system/htop/htop-vim.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ lib, htop, fetchFromGitHub }:
|
||||
|
||||
htop.overrideAttrs (oldAttrs: rec {
|
||||
pname = "htop-vim";
|
||||
version = "unstable-2022-05-24";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "KoffeinFlummi";
|
||||
repo = pname;
|
||||
rev = "830ef7144940875d9d9716e33aff8651d164026e";
|
||||
sha256 = "sha256-ojStkpWvhb+W3dWyRev0VwjtCVL/I9L8FhtXcQ+ODLA=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
inherit (htop.meta) platforms license;
|
||||
description = "An interactive process viewer for Linux, with vim-style keybindings";
|
||||
homepage = "https://github.com/KoffeinFlummi/htop-vim";
|
||||
maintainers = with maintainers; [ thiagokokada ];
|
||||
mainProgram = "htop";
|
||||
};
|
||||
})
|
||||
57
pkgs/tools/system/hwinfo/default.nix
Normal file
57
pkgs/tools/system/hwinfo/default.nix
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, flex
|
||||
, libuuid
|
||||
, libx86emu
|
||||
, perl
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "hwinfo";
|
||||
version = "21.80";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "opensuse";
|
||||
repo = "hwinfo";
|
||||
rev = version;
|
||||
sha256 = "sha256-T4ny1tq3IMtmeZRgcAOvu2O23XEiLeKRoqOxhuVGBRw=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
flex
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libuuid
|
||||
libx86emu
|
||||
perl
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# VERSION and changelog are usually generated using Git
|
||||
# unless HWINFO_VERSION is defined (see Makefile)
|
||||
export HWINFO_VERSION="${version}"
|
||||
sed -i 's|^\(TARGETS\s*=.*\)\<changelog\>\(.*\)$|\1\2|g' Makefile
|
||||
|
||||
substituteInPlace Makefile --replace "/sbin" "/bin" --replace "/usr/" "/"
|
||||
substituteInPlace src/isdn/cdb/Makefile --replace "lex isdn_cdb.lex" "flex isdn_cdb.lex"
|
||||
substituteInPlace hwinfo.pc.in --replace "prefix=/usr" "prefix=$out"
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"LIBDIR=/lib"
|
||||
];
|
||||
|
||||
installFlags = [
|
||||
"DESTDIR=$(out)"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Hardware detection tool from openSUSE";
|
||||
license = licenses.gpl2Only;
|
||||
homepage = "https://github.com/openSUSE/hwinfo";
|
||||
maintainers = with maintainers; [ bobvanderlinden ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
23
pkgs/tools/system/idle3tools/default.nix
Normal file
23
pkgs/tools/system/idle3tools/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{lib, stdenv, fetchurl}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "idle3-tools";
|
||||
version = "0.9.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/idle3-tools/idle3-tools-${version}.tgz";
|
||||
sha256 = "00ia7xq9yldxyl9gz0mr4xa568nav14p0fnv82f2rbbkg060cy4p";
|
||||
};
|
||||
|
||||
preInstall = ''
|
||||
installFlags=DESTDIR=$out
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "http://idle3-tools.sourceforge.net/";
|
||||
description = "Tool to get/set the infamous idle3 timer in WD HDDs";
|
||||
license = lib.licenses.gpl3;
|
||||
maintainers = with lib.maintainers; [viric];
|
||||
platforms = with lib.platforms; linux;
|
||||
};
|
||||
}
|
||||
42
pkgs/tools/system/illum/default.nix
Normal file
42
pkgs/tools/system/illum/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{ lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config, ninja, libevdev, libev, udev }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "illum";
|
||||
version = "0.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jmesmon";
|
||||
repo = "illum";
|
||||
rev = "v${version}";
|
||||
sha256 = "S4lUBeRnZlRUpIxFdN/bh979xvdS7roF6/6Dk0ZUrnM=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "prevent-unplug-segfault"; # See https://github.com/jmesmon/illum/issues/19
|
||||
url = "https://github.com/jmesmon/illum/commit/47b7cd60ee892379e5d854f79db343a54ae5a3cc.patch";
|
||||
sha256 = "sha256-hIBBCIJXAt8wnZuyKye1RiEfOCelP3+4kcGrM43vFOE=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ ninja libevdev libev udev ];
|
||||
|
||||
configurePhase = ''
|
||||
bash ./configure
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
mv illum-d $out/bin
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/jmesmon/illum";
|
||||
description = "Daemon that wires button presses to screen backlight level";
|
||||
platforms = lib.platforms.linux;
|
||||
maintainers = [ lib.maintainers.dancek ];
|
||||
license = lib.licenses.agpl3;
|
||||
};
|
||||
}
|
||||
37
pkgs/tools/system/incron/default.nix
Normal file
37
pkgs/tools/system/incron/default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ lib, stdenv, fetchFromGitHub, bash }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "incron";
|
||||
version = "0.5.12";
|
||||
src = fetchFromGitHub {
|
||||
owner = "ar-";
|
||||
repo = "incron";
|
||||
rev = "${pname}-${version}";
|
||||
sha256 = "11d5f98cjafiv9h9zzzrw2s06s2fvdg8gp64km7mdprd2xmy6dih";
|
||||
};
|
||||
|
||||
patches = [ ./default_path.patch ];
|
||||
|
||||
prePatch = ''
|
||||
sed -i "s|/bin/bash|${bash}/bin/bash|g" usertable.cpp
|
||||
'';
|
||||
|
||||
installFlags = [ "PREFIX=$(out)" ];
|
||||
installTargets = [ "install-man" ];
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p $out/bin
|
||||
|
||||
# make install doesn't work because setuid and permissions
|
||||
# just manually install the binaries instead
|
||||
cp incrond incrontab $out/bin/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A cron-like daemon which handles filesystem events";
|
||||
homepage = "https://github.com/ar-/incron";
|
||||
license = licenses.gpl2;
|
||||
maintainers = [ maintainers.aanderse ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
36
pkgs/tools/system/incron/default_path.patch
Normal file
36
pkgs/tools/system/incron/default_path.patch
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
diff --git usertable.cpp usertable.cpp
|
||||
index 11fd04b..a8681bd 100644
|
||||
--- a/usertable.cpp
|
||||
+++ b/usertable.cpp
|
||||
@@ -43,9 +43,6 @@
|
||||
#define DONT_FOLLOW(mask) (false)
|
||||
#endif // IN_DONT_FOLLOW
|
||||
|
||||
-// this is not enough, but...
|
||||
-#define DEFAULT_PATH "/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin"
|
||||
-
|
||||
|
||||
PROC_MAP UserTable::s_procMap;
|
||||
|
||||
@@ -597,12 +594,20 @@ void UserTable::RunAsUser(std::string cmd) const
|
||||
if (clearenv() != 0)
|
||||
goto failed;
|
||||
|
||||
+ // try to recreate the user path as best as possible
|
||||
+ std::string DEFAULT_PATH;
|
||||
+ DEFAULT_PATH += "/run/wrappers/bin:";
|
||||
+ DEFAULT_PATH += pwd->pw_dir;
|
||||
+ DEFAULT_PATH += "/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/etc/profiles/per-user/";
|
||||
+ DEFAULT_PATH += pwd->pw_name;
|
||||
+ DEFAULT_PATH += "/bin";
|
||||
+
|
||||
if ( setenv("LOGNAME", pwd->pw_name, 1) != 0
|
||||
|| setenv("USER", pwd->pw_name, 1) != 0
|
||||
|| setenv("USERNAME", pwd->pw_name, 1) != 0
|
||||
|| setenv("HOME", pwd->pw_dir, 1) != 0
|
||||
|| setenv("SHELL", pwd->pw_shell, 1) != 0
|
||||
- || setenv("PATH", DEFAULT_PATH, 1) != 0)
|
||||
+ || setenv("PATH", DEFAULT_PATH.c_str(), 1) != 0)
|
||||
{
|
||||
goto failed;
|
||||
}
|
||||
62
pkgs/tools/system/inxi/default.nix
Normal file
62
pkgs/tools/system/inxi/default.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
{ 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, 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 ':' '${lib.makeBinPath programs}'";
|
||||
recommendedSystemPrograms = lib.optionals withRecommendedSystemPrograms [
|
||||
util-linuxMinimal dmidecode file hddtemp iproute2 ipmitool usbutils kmod
|
||||
lm_sensors smartmontools binutils tree upower pciutils
|
||||
];
|
||||
recommendedDisplayInformationPrograms = lib.optionals
|
||||
withRecommendedDisplayInformationPrograms
|
||||
([ glxinfo ] ++ (with xorg; [ xdpyinfo xprop xrandr ]));
|
||||
programs = [ ps dnsutils ] # Core programs
|
||||
++ recommendedSystemPrograms
|
||||
++ recommendedDisplayInformationPrograms;
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "inxi";
|
||||
version = "3.3.04-1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "smxi";
|
||||
repo = "inxi";
|
||||
rev = version;
|
||||
sha256 = "sha256-/EutIHQGLiRcRD/r8LJYG7oJBb7EAhR5cn6QiC7zMOc=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [ perl ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp inxi $out/bin/
|
||||
wrapProgram $out/bin/inxi \
|
||||
--set PERL5LIB "${perlPackages.makePerlPath (with perlPackages; [ CpanelJSONXS ])}" \
|
||||
${prefixPath programs}
|
||||
mkdir -p $out/share/man/man1
|
||||
cp inxi.1 $out/share/man/man1/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A full featured CLI system information tool";
|
||||
longDescription = ''
|
||||
inxi is a command line system information script built for console and
|
||||
IRC. It is also used a debugging tool for forum technical support to
|
||||
quickly ascertain users' system configurations and hardware. inxi shows
|
||||
system hardware, CPU, drivers, Xorg, Desktop, Kernel, gcc version(s),
|
||||
Processes, RAM usage, and a wide variety of other useful information.
|
||||
'';
|
||||
homepage = "https://smxi.org/docs/inxi.htm";
|
||||
changelog = "https://github.com/smxi/inxi/blob/${version}/inxi.changelog";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
}
|
||||
31
pkgs/tools/system/ioping/default.nix
Normal file
31
pkgs/tools/system/ioping/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenv, fetchFromGitHub, fetchpatch }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ioping";
|
||||
version = "1.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "koct9i";
|
||||
repo = "ioping";
|
||||
rev = "v${version}";
|
||||
sha256 = "10bv36bqga8sdifxzywzzpjil7vmy62psirz7jbvlsq1bw71aiid";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# add netdata support: https://github.com/koct9i/ioping/pull/41
|
||||
(fetchpatch {
|
||||
url = "https://github.com/koct9i/ioping/commit/e7b818457ddb952cbcc13ae732ba0328f6eb73b3.patch";
|
||||
sha256 = "122ivp4rqsnjszjfn33z8li6glcjhy7689bgipi8cgs5q55j99gf";
|
||||
})
|
||||
];
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Disk I/O latency measuring tool";
|
||||
maintainers = with maintainers; [ raskin ];
|
||||
platforms = platforms.unix;
|
||||
license = licenses.gpl3Plus;
|
||||
homepage = "https://github.com/koct9i/ioping";
|
||||
};
|
||||
}
|
||||
26
pkgs/tools/system/ior/default.nix
Normal file
26
pkgs/tools/system/ior/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, stdenv, fetchFromGitHub, mpi, perl, autoreconfHook }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ior";
|
||||
version = "3.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hpc";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-pSjptDfiPlaToXe1yHyk9MQMC9PqcVSjqAmWLD11iOM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
buildInputs = [ mpi perl ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://ior.readthedocs.io/en/latest/";
|
||||
description = "Parallel file system I/O performance test";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ bzizou ];
|
||||
};
|
||||
}
|
||||
59
pkgs/tools/system/ipmitool/default.nix
Normal file
59
pkgs/tools/system/ipmitool/default.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{ stdenv, lib, fetchurl, openssl, fetchpatch, static ? stdenv.hostPlatform.isStatic }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ipmitool";
|
||||
version = "1.8.18";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
|
||||
sha256 = "0kfh8ny35rvwxwah4yv91a05qwpx74b5slq2lhrh71wz572va93m";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://sources.debian.org/data/main/i/ipmitool/1.8.18-6/debian/patches/0120-openssl1.1.patch";
|
||||
sha256 = "1xvsjxb782lzy72bnqqnsk3r5h4zl3na95s4pqn2qg7cic2mnbfk";
|
||||
})
|
||||
# Fix build on non-linux systems
|
||||
(fetchpatch {
|
||||
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=";
|
||||
})
|
||||
# Pull upstream patch to support upstream gcc-10:
|
||||
# https://github.com/ipmitool/ipmitool/pull/180
|
||||
(fetchpatch {
|
||||
name = "fno-common.patch";
|
||||
url = "https://github.com/ipmitool/ipmitool/commit/51c7e0822f531469cf860dfa5d010c87b284b747.patch";
|
||||
sha256 = "sha256-5UszUdVw3s2S5RCm5Exq4mqDqiYcN62in1O5+TZu9YA=";
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = [ openssl ];
|
||||
|
||||
configureFlags = [
|
||||
"--infodir=${placeholder "out"}/share/info"
|
||||
"--mandir=${placeholder "out"}/share/man"
|
||||
] ++ lib.optionals static [
|
||||
"LDFLAGS=-static"
|
||||
"--enable-static"
|
||||
"--disable-shared"
|
||||
] ++ lib.optionals (!static) [
|
||||
"--enable-shared"
|
||||
];
|
||||
|
||||
makeFlags = lib.optional static "AM_LDFLAGS=-all-static";
|
||||
dontDisableStatic = static;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Command-line interface to IPMI-enabled devices";
|
||||
license = licenses.bsd3;
|
||||
homepage = "https://sourceforge.net/projects/ipmitool/";
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ fpletz ];
|
||||
};
|
||||
}
|
||||
30
pkgs/tools/system/ipmiutil/default.nix
Normal file
30
pkgs/tools/system/ipmiutil/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, stdenv, fetchurl, openssl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ipmiutil";
|
||||
version = "3.1.6";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/project/ipmiutil/pmiutil-${version}.tar.gz";
|
||||
sha256 = "0jlfb4firph3hc0854n7cw7yjwlax3wdxn37r2jl0l94dj684548";
|
||||
};
|
||||
|
||||
buildInputs = [ openssl ];
|
||||
|
||||
preBuild = ''
|
||||
sed -e "s@/usr@$out@g" -i Makefile */Makefile */*/Makefile
|
||||
sed -e "s@/etc@$out/etc@g" -i Makefile */Makefile */*/Makefile
|
||||
sed -e "s@/var@$out/var@g" -i Makefile */Makefile */*/Makefile
|
||||
'';
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-fno-stack-protector";
|
||||
|
||||
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/";
|
||||
};
|
||||
}
|
||||
50
pkgs/tools/system/java-service-wrapper/default.nix
Normal file
50
pkgs/tools/system/java-service-wrapper/default.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{ lib, stdenv, fetchurl
|
||||
, jdk
|
||||
, ant, cunit, ncurses
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "java-service-wrapper";
|
||||
version = "3.5.49";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://wrapper.tanukisoftware.com/download/${version}/wrapper_${version}_src.tar.gz";
|
||||
hash = "sha256-gcScF5LIqWVBv8erI3hG5tt5BZPO2XlhFACz1Y60+v4=";
|
||||
};
|
||||
|
||||
buildInputs = [ jdk ];
|
||||
nativeBuildInputs = [ ant cunit ncurses ];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
export ANT_HOME=${ant}
|
||||
export JAVA_HOME=${jdk}/lib/openjdk/jre/
|
||||
export JAVA_TOOL_OPTIONS=-Djava.home=$JAVA_HOME
|
||||
export CLASSPATH=${jdk}/lib/openjdk/lib/tools.jar
|
||||
|
||||
${if stdenv.isi686 then "./build32.sh" else "./build64.sh"}
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/{bin,lib}
|
||||
cp bin/wrapper $out/bin/wrapper
|
||||
cp lib/wrapper.jar $out/lib/wrapper.jar
|
||||
cp lib/libwrapper.so $out/lib/libwrapper.so
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Enables a Java Application to be run as a Windows Service or Unix Daemon";
|
||||
homepage = "https://wrapper.tanukisoftware.com/";
|
||||
changelog = "https://wrapper.tanukisoftware.com/doc/english/release-notes.html#${version}";
|
||||
license = licenses.gpl2Only;
|
||||
platforms = [ "x86_64-linux" "i686-linux" ];
|
||||
maintainers = [ maintainers.suhr ];
|
||||
};
|
||||
}
|
||||
39
pkgs/tools/system/journalwatch/default.nix
Normal file
39
pkgs/tools/system/journalwatch/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder, systemd, pytest }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "journalwatch";
|
||||
version = "1.1.0";
|
||||
disabled = pythonOlder "3.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "The-Compiler";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha512 = "11g2f1w9lfqw6zxxyg7qrqpb914s6w71j0gnpw7qr7cak2l5jlf2l39dlg30y55rw7jgmf0yg77wwzd0c430mq1n6q1v8w86g1rwkzb";
|
||||
};
|
||||
|
||||
# can be removed post 1.1.0
|
||||
postPatch = ''
|
||||
substituteInPlace test_journalwatch.py \
|
||||
--replace "U Thu Jan 1 00:00:00 1970 prio foo [1337]" "U Thu Jan 1 00:00:00 1970 pprio foo [1337]"
|
||||
'';
|
||||
|
||||
|
||||
doCheck = true;
|
||||
checkInputs = [ pytest ];
|
||||
checkPhase = ''
|
||||
pytest
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
systemd
|
||||
];
|
||||
|
||||
|
||||
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;
|
||||
maintainers = with maintainers; [ florianjacob ];
|
||||
};
|
||||
}
|
||||
40
pkgs/tools/system/jsvc/default.nix
Normal file
40
pkgs/tools/system/jsvc/default.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ lib, stdenv, fetchurl, commonsDaemon, jdk, makeWrapper, jre }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "jsvc";
|
||||
version = "1.3.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://downloads.apache.org//commons/daemon/source/commons-daemon-${version}-src.tar.gz";
|
||||
sha256 = "sha256-UzzXb+MRPVNTE8HYsB/yPK9rq8zGmbGmi0RGk3zER0s=";
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
41
pkgs/tools/system/jump/default.nix
Normal file
41
pkgs/tools/system/jump/default.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{ buildGoModule, fetchFromGitHub, lib }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "jump";
|
||||
version = "0.41.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gsamokovarov";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-nI4n1WxgdGGP822APBOLZ5lNkjwL1KfP5bKUxfvXdnE=";
|
||||
};
|
||||
|
||||
vendorSha256 = null;
|
||||
|
||||
doCheck = false;
|
||||
|
||||
outputs = [ "out" "man"];
|
||||
postInstall = ''
|
||||
install -D --mode=444 man/j.1 man/jump.1 -t $man/man/man1/
|
||||
|
||||
# generate completion scripts for jump
|
||||
export HOME="$NIX_BUILD_TOP"
|
||||
mkdir -p $out/share/{bash-completion/completions,fish/vendor_completions.d,zsh/site-functions}
|
||||
$out/bin/jump shell bash > "$out/share/bash-completion/completions/jump"
|
||||
$out/bin/jump shell fish > $out/share/fish/vendor_completions.d/jump.fish
|
||||
$out/bin/jump shell zsh > $out/share/zsh/site-functions/_jump
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
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
|
||||
strives to give you the best directory for the shortest search term.
|
||||
'';
|
||||
homepage = "https://github.com/gsamokovarov/jump";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ sondr3 ];
|
||||
};
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue