Merge remote-tracking branch 'origin/master' into staging-next

Conflicts:
  pkgs/applications/graphics/emulsion/default.nix
  pkgs/development/tools/misc/texlab/default.nix
  pkgs/development/tools/rust/bindgen/default.nix
  pkgs/development/tools/rust/cargo-udeps/default.nix
  pkgs/misc/emulators/ruffle/default.nix
  pkgs/tools/misc/code-minimap/default.nix
This commit is contained in:
Jonathan Ringer
2021-05-18 08:57:04 -07:00
264 changed files with 3781 additions and 1606 deletions

View File

@@ -6,13 +6,13 @@
stdenv.mkDerivation rec {
pname = "android-udev-rules";
version = "20210425";
version = "20210501";
src = fetchFromGitHub {
owner = "M0Rf30";
repo = "android-udev-rules";
rev = version;
sha256 = "sha256-crNK6mZCCqD/Lm3rNtfH/4F48RuQCqHWP+qsTNVLOGY=";
sha256 = "sha256-rlTulWclPqMl9LdHdcAtLARXGItiSeF3RX+neZrjgV4=";
};
installPhase = ''

View File

@@ -0,0 +1,10 @@
--- a/atop.service
+++ b/atop.service
@@ -9,5 +9,6 @@
Environment=LOGPATH=/var/log/atop
-EnvironmentFile=/etc/default/atop
+EnvironmentFile=-/etc/default/atop
ExecStartPre=/bin/sh -c 'test -n "$LOGINTERVAL" -a "$LOGINTERVAL" -eq "$LOGINTERVAL"'
ExecStartPre=/bin/sh -c 'test -n "$LOGGENERATIONS" -a "$LOGGENERATIONS" -eq "$LOGGENERATIONS"'
+ExecStartPre=/bin/sh -c 'mkdir -p "${LOGPATH}"'
ExecStart=/bin/sh -c 'exec @out@/bin/atop ${LOGOPTS} -w "${LOGPATH}/atop_$(date +%%Y%%m%%d)" ${LOGINTERVAL}'

View File

@@ -0,0 +1,7 @@
--- a/atopacct.service
+++ b/atopacct.service
@@ -9,3 +9,3 @@
Type=forking
-PIDFile=/var/run/atopacctd.pid
+PIDFile=/run/atopacctd.pid
ExecStart=@out@/bin/atopacctd

View File

@@ -1,4 +1,14 @@
{lib, stdenv, fetchurl, zlib, ncurses}:
{ lib
, stdenv
, fetchurl
, zlib
, ncurses
, findutils
, systemd
, python3
# makes the package unfree via pynvml
, withAtopgpu ? false
}:
stdenv.mkDerivation rec {
pname = "atop";
@@ -9,31 +19,52 @@ stdenv.mkDerivation rec {
sha256 = "nsLKOlcWkvfvqglfmaUQZDK8txzCLNbElZfvBIEFj3I=";
};
buildInputs = [zlib ncurses];
nativeBuildInputs = lib.optionals withAtopgpu [ python3.pkgs.wrapPython ];
buildInputs = [ zlib ncurses ] ++ lib.optionals withAtopgpu [ python3 ];
pythonPath = lib.optionals withAtopgpu [ python3.pkgs.pynvml ];
makeFlags = [
"SCRPATH=$out/etc/atop"
"LOGPATH=/var/log/atop"
"INIPATH=$out/etc/rc.d/init.d"
"SYSDPATH=$out/lib/systemd/system"
"CRNPATH=$out/etc/cron.d"
"DEFPATH=$out/etc/default"
"ROTPATH=$out/etc/logrotate.d"
"DESTDIR=$(out)"
"BINPATH=/bin"
"SBINPATH=/bin"
"MAN1PATH=/share/man/man1"
"MAN5PATH=/share/man/man5"
"MAN8PATH=/share/man/man8"
"SYSDPATH=/lib/systemd/system"
"PMPATHD=/lib/systemd/system-sleep"
];
patches = [
# Fix paths in atop.service, atop-rotate.service, atopgpu.service, atopacct.service,
# and atop-pm.sh
./fix-paths.patch
# Don't fail on missing /etc/default/atop, make sure /var/log/atop exists pre-start
./atop.service.patch
# Specify PIDFile in /run, not /var/run to silence systemd warning
./atopacct.service.patch
];
preConfigure = ''
sed -e "s@/usr/@$out/@g" -i $(find . -type f )
sed -e "/mkdir.*LOGPATH/s@mkdir@echo missing dir @" -i Makefile
sed -e "/touch.*LOGPATH/s@touch@echo should have created @" -i Makefile
sed -e 's/chown/true/g' -i Makefile
sed -e '/chkconfig/d' -i Makefile
sed -e 's/chmod 04711/chmod 0711/g' -i Makefile
for f in *.{sh,service}; do
findutils=${findutils} systemd=${systemd} substituteAllInPlace "$f"
done
substituteInPlace Makefile --replace 'chown' 'true'
substituteInPlace Makefile --replace 'chmod 04711' 'chmod 0711'
'';
installTargets = [ "systemdinstall" ];
preInstall = ''
mkdir -p "$out"/{bin,sbin}
mkdir -p $out/bin
'';
postInstall = ''
# remove extra files we don't need
rm -r $out/{var,etc} $out/bin/atop{sar,}-${version}
'' + (if withAtopgpu then ''
wrapPythonPrograms
'' else ''
rm $out/lib/systemd/system/atopgpu.service $out/bin/atopgpud $out/share/man/man8/atopgpud.8
'');
meta = with lib; {
platforms = platforms.linux;

View File

@@ -0,0 +1,48 @@
--- a/atop.service
+++ b/atop.service
@@ -12,4 +12,4 @@
ExecStartPre=/bin/sh -c 'test -n "$LOGGENERATIONS" -a "$LOGGENERATIONS" -eq "$LOGGENERATIONS"'
-ExecStart=/bin/sh -c 'exec /usr/bin/atop ${LOGOPTS} -w "${LOGPATH}/atop_$(date +%%Y%%m%%d)" ${LOGINTERVAL}'
-ExecStartPost=/usr/bin/find "${LOGPATH}" -name "atop_*" -mtime +${LOGGENERATIONS} -exec rm -v {} \;
+ExecStart=/bin/sh -c 'exec @out@/bin/atop ${LOGOPTS} -w "${LOGPATH}/atop_$(date +%%Y%%m%%d)" ${LOGINTERVAL}'
+ExecStartPost=@findutils@/bin/find "${LOGPATH}" -name "atop_*" -mtime +${LOGGENERATIONS} -exec rm -v {} \;
KillSignal=SIGUSR2
--- a/atop-rotate.service
+++ b/atop-rotate.service
@@ -4,3 +4,3 @@
[Service]
Type=oneshot
-ExecStart=/usr/bin/systemctl try-restart atop.service
+ExecStart=@systemd@/bin/systemctl try-restart atop.service
--- a/atopgpu.service
+++ b/atopgpu.service
@@ -6,5 +6,5 @@
[Service]
-ExecStart=/usr/sbin/atopgpud
+ExecStart=@out@/bin/atopgpud
Type=oneshot
RemainAfterExit=yes
--- a/atopacct.service
+++ b/atopacct.service
@@ -10,3 +10,3 @@
PIDFile=/var/run/atopacctd.pid
-ExecStart=/usr/sbin/atopacctd
+ExecStart=@out@/bin/atopacctd
--- a/atop-pm.sh
+++ b/atop-pm.sh
@@ -2,8 +2,8 @@
case "$1" in
- pre) /usr/bin/systemctl stop atop
+ pre) @systemd@/bin/systemctl stop atop
exit 0
;;
- post) /usr/bin/systemctl start atop
+ post) @systemd@/bin/systemctl start atop
exit 0
;;

View File

@@ -6,13 +6,13 @@
stdenv.mkDerivation rec {
pname = "bpftrace";
version = "0.12.0";
version = "0.12.1";
src = fetchFromGitHub {
owner = "iovisor";
repo = "bpftrace";
rev = "v${version}";
sha256 = "0njbixkrpdl9gjnkzg0ybmqsva0ydfda5vms66v8ij7xida2qy07";
sha256 = "sha256-DZO47AH506DBVH/AuvOF3JfpRxv/D/lmzVg8WOH9Dqo=";
};
buildInputs = with llvmPackages;

View File

@@ -5,11 +5,11 @@
stdenv.mkDerivation rec {
pname = "gradm";
version = "3.1-202012071814";
version = "3.1-202102241600";
src = fetchurl {
url = "http://grsecurity.net/stable/${pname}-${version}.tar.gz";
sha256 = "sha256-ghl9P2IYsSHcJsVxJbFwfFS1CTZ2xLxdvyhdk/1OZG4=";
url = "https://grsecurity.net/stable/${pname}-${version}.tar.gz";
sha256 = "02ni34hpggv00140p9gvh0lqi173zdddd2qhfi96hyr1axd5pl50";
};
nativeBuildInputs = [ bison flex ];
@@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "grsecurity RBAC administration and policy analysis utility";
homepage = "https://grsecurity.net";
license = licenses.gpl2;
license = licenses.gpl2Only;
platforms = platforms.linux;
maintainers = with maintainers; [ thoughtpolice joachifm ];
};

View File

@@ -1,11 +1,11 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation {
name = "lsscsi-0.31";
name = "lsscsi-0.32";
src = fetchurl {
url = "http://sg.danny.cz/scsi/lsscsi-0.31.tgz";
sha256 = "1jpk15y9vqjb1lcj4pdzygpg0jf0lja7azjldpywc0s805rikgqj";
url = "http://sg.danny.cz/scsi/lsscsi-0.32.tgz";
sha256 = "sha256-CoAOnpTcoqtwLWXXJ3eujK4Hjj100Ly+1kughJ6AKaE=";
};
preConfigure = ''

View File

@@ -2,12 +2,12 @@
stdenv.mkDerivation {
pname = "mmc-utils";
version = "2019-10-04";
version = "2021-05-11";
src = fetchgit {
url = "git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git";
rev = "73d6c59af8d1bcedf5de4aa1f5d5b7f765f545f5";
sha256 = "18a7qm86gavg15gv4h6xfnapgq24v4dyvhwfp53lkssxyhjbli0z";
rev = "43282e80e174cc73b09b81a4d17cb3a7b4dc5cfc";
sha256 = "0l06ahmprqshh75pkdpagb8fgnp2bwn8q8hwp1yl3laww2ghm8i5";
};
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];

View File

@@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, kernel, zlib }:
{ lib, stdenv, fetchurl, kernel, kmod, zlib }:
let
version = "3.1";
@@ -12,10 +12,16 @@ stdenv.mkDerivation {
sha256 = "0qjw8glfdmngfvbn1w63q128vxdz2jlabw13y140ga9i5ibl6vvk";
};
buildInputs = [ zlib ];
buildInputs = [ kmod zlib ];
hardeningDisable = [ "pic" ];
patches = [
# fix paths in netatop.service
./fix-paths.patch
# Specify PIDFile in /run, not /var/run to silence systemd warning
./netatop.service.patch
];
preConfigure = ''
patchShebangs mkversion
sed -i -e 's,^KERNDIR.*,KERNDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build,' \
@@ -24,12 +30,14 @@ stdenv.mkDerivation {
-e s,/usr,$out, \
-e /init.d/d \
-e /depmod/d \
-e /netatop.service/d \
-e s,/lib/systemd,$out/lib/systemd, \
Makefile
kmod=${kmod} substituteAllInPlace netatop.service
'';
preInstall = ''
mkdir -p $out/bin $out/sbin $out/share/man/man{4,8}
mkdir -p $out/lib/systemd/system $out/bin $out/sbin $out/share/man/man{4,8}
mkdir -p $out/lib/modules/${kernel.modDirVersion}/extra
'';
@@ -38,6 +46,6 @@ stdenv.mkDerivation {
homepage = "https://www.atoptool.nl/downloadnetatop.php";
license = lib.licenses.gpl2;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [viric];
maintainers = with lib.maintainers; [ viric ];
};
}

View File

@@ -0,0 +1,11 @@
--- a/netatop.service
+++ b/netatop.service
@@ -8,5 +8,5 @@
Type=oneshot
-ExecStartPre=/sbin/modprobe netatop
-ExecStart=/usr/sbin/netatopd
-ExecStopPost=/sbin/rmmod netatop
+ExecStartPre=@kmod@/bin/modprobe netatop
+ExecStart=@out@/bin/netatopd
+ExecStopPost=@kmod@/bin/rmmod netatop
PIDFile=/var/run/netatop.pid

View File

@@ -0,0 +1,7 @@
--- a/netatop.service
+++ b/netatop.service
@@ -11,3 +11,3 @@
ExecStopPost=@kmod@/bin/rmmod netatop
-PIDFile=/var/run/netatop.pid
+PIDFile=/run/netatop.pid
RemainAfterExit=yes