summary refs log tree commit diff
path: root/pkgs/tools/misc/tlp
diff options
context:
space:
mode:
authorBernardo Meurer <bernardo@meurer.org>2021-10-15 22:43:10 -0700
committerBernardo Meurer <bernardo@meurer.org>2021-10-15 22:43:10 -0700
commit07c44a2d31e3becd566b6380d1873852262f11a2 (patch)
treecfb28e7263418b60fd84d47b83e0a53f0d6f9dcd /pkgs/tools/misc/tlp
parentbdefa8be2eafd48b25399fc572e908ac7ad3c104 (diff)
downloadnixpkgs-07c44a2d31e3becd566b6380d1873852262f11a2.tar
nixpkgs-07c44a2d31e3becd566b6380d1873852262f11a2.tar.gz
nixpkgs-07c44a2d31e3becd566b6380d1873852262f11a2.tar.bz2
nixpkgs-07c44a2d31e3becd566b6380d1873852262f11a2.tar.lz
nixpkgs-07c44a2d31e3becd566b6380d1873852262f11a2.tar.xz
nixpkgs-07c44a2d31e3becd566b6380d1873852262f11a2.tar.zst
nixpkgs-07c44a2d31e3becd566b6380d1873852262f11a2.zip
Revert "Merge pull request #141782 from fufexan/tlp"
This reverts commit b0f2a75402e1c32026241a6df6652f2eb7239f74, reversing
changes made to 15f14d50a2bddd12b3684a93e207e26f1cb770ba.
Diffstat (limited to 'pkgs/tools/misc/tlp')
-rw-r--r--pkgs/tools/misc/tlp/default.nix4
-rw-r--r--pkgs/tools/misc/tlp/patches/fix-makefile-sed.patch17
-rw-r--r--pkgs/tools/misc/tlp/patches/tlp-sleep-service.patch25
3 files changed, 24 insertions, 22 deletions
diff --git a/pkgs/tools/misc/tlp/default.nix b/pkgs/tools/misc/tlp/default.nix
index 0b481382ee7..a615330a4a8 100644
--- a/pkgs/tools/misc/tlp/default.nix
+++ b/pkgs/tools/misc/tlp/default.nix
@@ -23,13 +23,13 @@
 , networkmanager
 }: stdenv.mkDerivation rec {
   pname = "tlp";
-  version = "1.4.0";
+  version = "1.3.1";
 
   src = fetchFromGitHub {
     owner = "linrunner";
     repo = "TLP";
     rev = version;
-    sha256 = "sha256-Blwj4cqrrYXohnGyJYe+1NYifxqfS4DoVUHmxFf62i4=";
+    sha256 = "14fcnaz9pw534v4d8dddqq4wcvpf1kghr8zlrk62r5lrl46sp1p5";
   };
 
   # XXX: See patch files for relevant explanations.
diff --git a/pkgs/tools/misc/tlp/patches/fix-makefile-sed.patch b/pkgs/tools/misc/tlp/patches/fix-makefile-sed.patch
index 31639c02f4c..942c9a579f6 100644
--- a/pkgs/tools/misc/tlp/patches/fix-makefile-sed.patch
+++ b/pkgs/tools/misc/tlp/patches/fix-makefile-sed.patch
@@ -1,23 +1,26 @@
+commit c44347b3b813e209fff537b4d46d23430727a5e2
+Author: Bernardo Meurer <meurerbernardo@gmail.com>
+Date:   Tue Feb 25 21:27:39 2020 -0800
 
     makefile: correctly sed paths
-
+    
     The default Makefile for tlp makes a mess with catenating `DESTDIR` to
     everything, but then not actualy using the catenated (_ prefixed)
     variables to sed it's `.in` files.
-
+    
     This patch makes sure that it correctly sets the paths, taking `DESTDIR`
     in account where it makes sense (e.g. /bin where we want $out/bin) but
     not where it doesn't (/etc/tlp.conf should be just that).
-
+    
     The reason DESTDIR is used at all, as opposed to the more appropriate
     PREFIX, is covered in the nix formula, and is (also) due to the Makefile
     being a bit "different."
 
 diff --git a/Makefile b/Makefile
-index e9bbab4..6b66651 100644
+index b5af74e..95122df 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -51,19 +51,19 @@ _TPACPIBAT = $(DESTDIR)$(TPACPIBAT)
+@@ -47,17 +47,17 @@ _TPACPIBAT = $(DESTDIR)$(TPACPIBAT)
  
  SED = sed \
  	-e "s|@TLPVER@|$(TLPVER)|g" \
@@ -25,18 +28,14 @@ index e9bbab4..6b66651 100644
 -	-e "s|@TLP_TLIB@|$(TLP_TLIB)|g" \
 -	-e "s|@TLP_FLIB@|$(TLP_FLIB)|g" \
 -	-e "s|@TLP_ULIB@|$(TLP_ULIB)|g" \
--	-e "s|@TLP_BATD@|$(TLP_BATD)|g" \
 +	-e "s|@TLP_SBIN@|$(_SBIN)|g" \
 +	-e "s|@TLP_TLIB@|$(_TLIB)|g" \
 +	-e "s|@TLP_FLIB@|$(_FLIB)|g" \
 +	-e "s|@TLP_ULIB@|$(_ULIB)|g" \
-+	-e "s|@TLP_BATD@|$(_BATD)|g" \
  	-e "s|@TLP_CONFUSR@|$(TLP_CONFUSR)|g" \
  	-e "s|@TLP_CONFDIR@|$(TLP_CONFDIR)|g" \
 -	-e "s|@TLP_CONFDEF@|$(TLP_CONFDEF)|g" \
--	-e "s|@TLP_CONFREN@|$(TLP_CONFREN)|g" \
 +	-e "s|@TLP_CONFDEF@|$(_CONFDEF)|g" \
-+	-e "s|@TLP_CONFREN@|$(_CONFREN)|g" \
  	-e "s|@TLP_CONF@|$(TLP_CONF)|g" \
  	-e "s|@TLP_RUN@|$(TLP_RUN)|g"   \
  	-e "s|@TLP_VAR@|$(TLP_VAR)|g"   \
diff --git a/pkgs/tools/misc/tlp/patches/tlp-sleep-service.patch b/pkgs/tools/misc/tlp/patches/tlp-sleep-service.patch
index 3b04f2fb061..b37c7280e38 100644
--- a/pkgs/tools/misc/tlp/patches/tlp-sleep-service.patch
+++ b/pkgs/tools/misc/tlp/patches/tlp-sleep-service.patch
@@ -1,20 +1,23 @@
+commit ca94cd56210067e2a55c1f413bd7713f7d338f9f
+Author: Bernardo Meurer <meurerbernardo@gmail.com>
+Date:   Wed Feb 26 10:46:23 2020 -0800
 
     tlp-sleep.service: reintroduce
-
+    
     This patch reintroduces tlp-sleep as a systemd unit as opposed to a
     systemd system-sleep hook script. This is due to the recommendation by
     systemd itself to not use the hook scripts. As per the manual:
-
+    
     > Note that scripts or binaries dropped in /usr/lib/systemd/system-sleep/
     > are intended for local use only and should be considered hacks. If
     > applications want to react to system suspend/hibernation and resume,
     > they should rather use the Inhibitor interface[1].
 
 diff --git a/Makefile b/Makefile
-index e9bbab4..7d71e02 100644
+index 95122df..0e9230a 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -76,6 +76,7 @@ INFILES = \
+@@ -70,6 +70,7 @@ INFILES = \
  	tlp.rules \
  	tlp-readconfs \
  	tlp-run-on \
@@ -22,7 +25,7 @@ index e9bbab4..7d71e02 100644
  	tlp.service \
  	tlp-stat \
  	tlp.upstart \
-@@ -106,7 +107,6 @@ SHFILES = \
+@@ -99,7 +100,6 @@ SHFILES = \
  	tlp-rdw-udev.in \
  	tlp-rf.in \
  	tlp-run-on.in \
@@ -30,27 +33,27 @@ index e9bbab4..7d71e02 100644
  	tlp-sleep.elogind \
  	tlp-stat.in \
  	tlp-usb-udev.in
-@@ -159,7 +159,7 @@ ifneq ($(TLP_NO_INIT),1)
+@@ -147,7 +147,7 @@ ifneq ($(TLP_NO_INIT),1)
  endif
  ifneq ($(TLP_WITH_SYSTEMD),0)
  	install -D -m 644 tlp.service $(_SYSD)/tlp.service
 -	install -D -m 755 tlp-sleep $(_SDSL)/tlp
-+	install -D -m 644 tlp-sleep.service $(_SDSL)/tlp-sleep.service
++	install -D -m 644 tlp-sleep.service $(_SYSD)/tlp-sleep.service
  endif
  ifneq ($(TLP_WITH_ELOGIND),0)
  	install -D -m 755 tlp-sleep.elogind $(_ELOD)/49-tlp-sleep
-@@ -216,7 +216,7 @@ uninstall-tlp:
+@@ -204,7 +204,7 @@ uninstall-tlp:
  	rm $(_ULIB)/rules.d/85-tlp.rules
  	rm -f $(_SYSV)/tlp
  	rm -f $(_SYSD)/tlp.service
 -	rm -f $(_SDSL)/tlp-sleep
-+	rm -f $(_SDSL)/tlp-sleep.service
++	rm -f $(_SYSD)/tlp-sleep.service
  	rm -f $(_ELOD)/49-tlp-sleep
  	rm -f $(_SHCPL)/tlp-stat
  	rm -f $(_SHCPL)/bluetooth
 diff --git a/tlp-sleep b/tlp-sleep
 deleted file mode 100644
-index e548d55..0000000
+index 3de85ce..0000000
 --- a/tlp-sleep
 +++ /dev/null
 @@ -1,11 +0,0 @@
@@ -58,7 +61,7 @@ index e548d55..0000000
 -
 -# tlp - systemd suspend/resume hook
 -#
--# Copyright (c) 2021 Thomas Koch <linrunner at gmx.net> and others.
+-# Copyright (c) 2020 Thomas Koch <linrunner at gmx.net> and others.
 -# This software is licensed under the GPL v2 or later.
 -
 -case $1 in