summary refs log tree commit diff
path: root/pkgs/os-specific/linux
diff options
context:
space:
mode:
authorlethalman <lucabru@src.gnome.org>2014-12-19 10:21:32 +0100
committerlethalman <lucabru@src.gnome.org>2014-12-19 10:21:32 +0100
commit5ff1f172487461e0bbae2b92d94c94d7154a093f (patch)
tree49468152c9c586d5db52844c407ff68abe9deb24 /pkgs/os-specific/linux
parentaa16d75e0121ead3effbb8806357a88393e06f17 (diff)
parentb62a2b07f44a5d1a54c00840dd13a778ed9a12cf (diff)
downloadnixpkgs-5ff1f172487461e0bbae2b92d94c94d7154a093f.tar
nixpkgs-5ff1f172487461e0bbae2b92d94c94d7154a093f.tar.gz
nixpkgs-5ff1f172487461e0bbae2b92d94c94d7154a093f.tar.bz2
nixpkgs-5ff1f172487461e0bbae2b92d94c94d7154a093f.tar.lz
nixpkgs-5ff1f172487461e0bbae2b92d94c94d7154a093f.tar.xz
nixpkgs-5ff1f172487461e0bbae2b92d94c94d7154a093f.tar.zst
nixpkgs-5ff1f172487461e0bbae2b92d94c94d7154a093f.zip
Merge pull request #5393 from abbradar/ocz-toolbox
ocz-toolbox: new package
Diffstat (limited to 'pkgs/os-specific/linux')
-rw-r--r--pkgs/os-specific/linux/ocz-toolbox/default.nix37
1 files changed, 37 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/ocz-toolbox/default.nix b/pkgs/os-specific/linux/ocz-toolbox/default.nix
new file mode 100644
index 00000000000..b41fc34be3e
--- /dev/null
+++ b/pkgs/os-specific/linux/ocz-toolbox/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchurl, libXrender, fontconfig, freetype, libXext, libX11 }:
+
+let arch = if stdenv.system == "x86_64-linux" then "64"
+           else if stdenv.system == "i686-linux" then "32"
+           else abort "OCZ Toolbox only support {x86-64,i686}-linux targets";
+in stdenv.mkDerivation rec {
+  version = "4.9.0.634";
+  name = "ocz-toolbox-${version}";
+
+  src = fetchurl {
+    url = "http://ocz.com/consumer/download/firmware/OCZToolbox_v${version}_linux.tar.gz";
+    sha256 = "0h51p5bg9h2smxxy1r4xkzzjjavhgql7yy12qmjk0vbh13flgx3y";
+  };
+
+  prePatch = ''
+    cd linux${arch}
+  '';
+
+  libPath = stdenv.lib.makeLibraryPath [ stdenv.gcc.gcc libXrender fontconfig freetype libXext libX11 ];
+
+  installPhase = ''
+    install -Dm755 OCZToolbox $out/bin/OCZToolbox
+    patchelf \
+      --interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \
+      --set-rpath "$libPath" \
+      $out/bin/OCZToolbox
+  '';
+
+  dontStrip = true;
+
+  meta = with stdenv.lib; {
+    description = "Update firmware and BIOS, secure erase, view SMART attributes, and view drive details of your OCZ SSD";
+    homepage = "http://ocz.com/consumer/download/firmware";
+    license = licenses.unfree;
+    maintainers = with maintainers; [ abbradar ];
+  };
+}