about summary refs log tree commit diff
path: root/nixpkgs/pkgs/os-specific/linux/powerstat
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/os-specific/linux/powerstat')
-rw-r--r--nixpkgs/pkgs/os-specific/linux/powerstat/default.nix26
1 files changed, 26 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/os-specific/linux/powerstat/default.nix b/nixpkgs/pkgs/os-specific/linux/powerstat/default.nix
new file mode 100644
index 000000000000..f5b54769f003
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/powerstat/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, lib, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "powerstat";
+  version = "0.02.22";
+  
+  src = fetchurl {
+    url = "https://kernel.ubuntu.com/~cking/tarballs/${pname}/${pname}-${version}.tar.gz";
+    sha256 = "0r355b9syqa2nhfy8ksvxyy5d58v0isf983842js091s6liy0x7g";
+  };
+  
+  installFlags = [ "DESTDIR=${placeholder "out"}" ];
+  
+  postInstall = ''
+    mv $out/usr/* $out
+    rm -r $out/usr
+  '';
+  
+  meta = with lib; {
+    description = "Laptop power measuring tool";
+    homepage = "https://kernel.ubuntu.com/~cking/powerstat/";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ womfoo ];
+  };
+}