summary refs log tree commit diff
path: root/pkgs/development/libraries/libf2c/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/libf2c/default.nix')
-rw-r--r--pkgs/development/libraries/libf2c/default.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libf2c/default.nix b/pkgs/development/libraries/libf2c/default.nix
new file mode 100644
index 000000000000..b14809d47bf8
--- /dev/null
+++ b/pkgs/development/libraries/libf2c/default.nix
@@ -0,0 +1,32 @@
+{stdenv, fetchurl, unzip}:
+
+stdenv.mkDerivation rec {
+  name = "libf2c";
+  
+  src = fetchurl {
+    url = http://www.netlib.org/f2c/libf2c.zip;
+    sha256 = "14py0zdwzj5gqjzi0z2hlcy3czpzx1fav55akdj143qgav8h6dav";
+  };
+
+  unpackPhase = ''
+    mkdir build
+    cd build
+    unzip ${src}
+  '';
+
+  makeFlags = "-f makefile.u";
+
+  installPhase = ''
+    ensureDir $out/include $out/lib
+    cp libf2c.a $out/lib
+    cp f2c.h $out/include
+  '';
+
+  buildInputs = [ unzip ];
+
+  meta = {
+    description = "F2c converts Fortran 77 source code to C";
+    homepage = http://www.netlib.org/f2c/;
+    license = "BSD";
+  };
+}