summary refs log tree commit diff
path: root/pkgs/os-specific/linux/cpufrequtils
diff options
context:
space:
mode:
authorAlexander Kjeldaas <ak@formalprivacy.com>2013-10-01 13:14:14 +0200
committerAlexander Kjeldaas <ak@formalprivacy.com>2014-04-05 09:08:05 +0200
commit4aeb10b09a02a64f9839c61d02875e75531845cc (patch)
treeaac03b45883ffe215d0f63ce3112b945fe42e2a2 /pkgs/os-specific/linux/cpufrequtils
parent8b5c6172378fdd447fb89acf4dbf2e1d5ed0f416 (diff)
downloadnixpkgs-4aeb10b09a02a64f9839c61d02875e75531845cc.tar
nixpkgs-4aeb10b09a02a64f9839c61d02875e75531845cc.tar.gz
nixpkgs-4aeb10b09a02a64f9839c61d02875e75531845cc.tar.bz2
nixpkgs-4aeb10b09a02a64f9839c61d02875e75531845cc.tar.lz
nixpkgs-4aeb10b09a02a64f9839c61d02875e75531845cc.tar.xz
nixpkgs-4aeb10b09a02a64f9839c61d02875e75531845cc.tar.zst
nixpkgs-4aeb10b09a02a64f9839c61d02875e75531845cc.zip
Make cpufrequtils compilation pure.
Diffstat (limited to 'pkgs/os-specific/linux/cpufrequtils')
-rw-r--r--pkgs/os-specific/linux/cpufrequtils/default.nix5
-rw-r--r--pkgs/os-specific/linux/cpufrequtils/remove-pot-creation-date.patch24
2 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/cpufrequtils/default.nix b/pkgs/os-specific/linux/cpufrequtils/default.nix
index c94e22adb38..d056e60f2da 100644
--- a/pkgs/os-specific/linux/cpufrequtils/default.nix
+++ b/pkgs/os-specific/linux/cpufrequtils/default.nix
@@ -10,6 +10,11 @@ stdenv.mkDerivation rec {
     sha256 = "127i38d4w1hv2dzdy756gmbhq25q3k34nqb2s0xlhsfhhdqs0lq0";
   };
 
+  patches = [
+    # I am not 100% sure that this is ok, but it breaks repeatable builds.
+    ./remove-pot-creation-date.patch
+  ];
+
   patchPhase = ''
     sed -e "s@= /usr/bin/@= @g" \
       -e "s@/usr/@$out/@" \
diff --git a/pkgs/os-specific/linux/cpufrequtils/remove-pot-creation-date.patch b/pkgs/os-specific/linux/cpufrequtils/remove-pot-creation-date.patch
new file mode 100644
index 00000000000..0116ed9eab0
--- /dev/null
+++ b/pkgs/os-specific/linux/cpufrequtils/remove-pot-creation-date.patch
@@ -0,0 +1,24 @@
+diff -u cpufrequtils-008/Makefile cpufrequtils-008.new/Makefile
+--- cpufrequtils-008/Makefile	2012-05-06 01:17:18.000000000 +0200
++++ cpufrequtils-008.new/Makefile	2013-08-16 20:52:29.961086536 +0200
+@@ -205,7 +205,8 @@
+ 	@xgettext --default-domain=$(PACKAGE) --add-comments \
+ 		--keyword=_ --keyword=N_ $(UTIL_SRC) && \
+ 	test -f $(PACKAGE).po && \
+-	mv -f $(PACKAGE).po po/$(PACKAGE).pot
++	mv -f $(PACKAGE).po po/$(PACKAGE).pot && \
++        sed -i -e'/POT-Creation/d' po/*.pot
+ 
+ update-gmo: po/$(PACKAGE).pot
+ 	 @for HLANG in $(LANGUAGES); do \
+@@ -217,6 +218,7 @@
+ 			echo "msgmerge for $$HLANG failed!"; \
+ 			rm -f po/$$HLANG.new.po; \
+ 		fi; \
++		sed -i -e'/POT-Creation/d' po/*.po; \
+ 		msgfmt --statistics -o po/$$HLANG.gmo po/$$HLANG.po; \
+ 	done;
+ 
+Common subdirectories: cpufrequtils-008/man and cpufrequtils-008.new/man
+Common subdirectories: cpufrequtils-008/po and cpufrequtils-008.new/po
+Common subdirectories: cpufrequtils-008/utils and cpufrequtils-008.new/utils