From 34e714c32d38bb3b7843388e416c34bdb3651072 Mon Sep 17 00:00:00 2001 From: taku0 Date: Fri, 21 Nov 2014 22:15:40 +0900 Subject: [PATCH] add udunits: a C library for units of physical quantities --- .../libraries/udunits/configure.patch | 12 ++++++++++++ .../development/libraries/udunits/default.nix | 19 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 33 insertions(+) create mode 100644 pkgs/development/libraries/udunits/configure.patch create mode 100644 pkgs/development/libraries/udunits/default.nix diff --git a/pkgs/development/libraries/udunits/configure.patch b/pkgs/development/libraries/udunits/configure.patch new file mode 100644 index 000000000000..36a0efb8590e --- /dev/null +++ b/pkgs/development/libraries/udunits/configure.patch @@ -0,0 +1,12 @@ +diff -ru -x '*~' udunits-2.1.24_orig/configure udunits-2.1.24/configure +--- udunits-2.1.24_orig/configure 2011-09-13 05:58:39.000000000 +0900 ++++ udunits-2.1.24/configure 2014-11-21 21:59:30.308180814 +0900 +@@ -7033,7 +7033,7 @@ + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then +- case `/usr/bin/file conftest.o` in ++ case `$MAGIC_CMD conftest.o` in + *32-bit*) + case $host in + x86_64-*kfreebsd*-gnu) diff --git a/pkgs/development/libraries/udunits/default.nix b/pkgs/development/libraries/udunits/default.nix new file mode 100644 index 000000000000..608900c85ade --- /dev/null +++ b/pkgs/development/libraries/udunits/default.nix @@ -0,0 +1,19 @@ +{ stdenv, fetchurl, + bison, flex, expat, file +}: + +stdenv.mkDerivation rec { + name = "udunits-2.1.24"; + src = fetchurl { + url = "ftp://ftp.unidata.ucar.edu/pub/udunits/${name}.tar.gz"; + sha256 = "1l0fdsl55374w7fjyd1wdx474f3p265b6rw1lq269cii61ca8prf"; + }; + + buildInputs = [ + bison flex expat file + ]; + + patches = [ ./configure.patch ]; + + MAGIC_CMD="${file}/bin/file"; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4c3d75ea4897..e3b9f1c05ada 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2671,6 +2671,8 @@ let ttmkfdir = callPackage ../tools/misc/ttmkfdir { }; + udunits = callPackage ../development/libraries/udunits { }; + uim = callPackage ../tools/inputmethods/uim { inherit (pkgs.kde4) kdelibs; };