Add OPA to Nixpkgs.
svn path=/nixpkgs/trunk/; revision=30578
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
{stdenv, fetchurl, ocaml, findlib }:
|
||||
|
||||
let
|
||||
ocaml_version = (builtins.parseDrvName ocaml.name).version;
|
||||
version = "1.8.1";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "ocamlgraph-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://ocamlgraph.lri.fr/download/ocamlgraph-${version}.tar.gz";
|
||||
sha256 = "0hrba69wvw9b42irkvjf6q7zzw12v5nyyc33yaq3jlf1qbzqhqxs";
|
||||
};
|
||||
|
||||
buildInputs = [ ocaml findlib ];
|
||||
|
||||
patches = ./destdir.patch;
|
||||
|
||||
postPatch = ''
|
||||
sed -i 's@$(DESTDIR)$(OCAMLLIB)/ocamlgraph@$(DESTDIR)/lib/ocaml/${ocaml_version}/site-lib/ocamlgraph@' Makefile.in
|
||||
'';
|
||||
|
||||
createFindlibDestdir = true;
|
||||
|
||||
buildPhase = ''
|
||||
make all
|
||||
make install-findlib
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://ocamlgraph.lri.fr/;
|
||||
description = "ocamlgraph is a graph library for Objective Caml.";
|
||||
license = "GNU Library General Public License version 2, with the special exception on linking described in file LICENSE";
|
||||
platforms = ocaml.meta.platforms;
|
||||
maintainers = [
|
||||
stdenv.lib.maintainers.kkallio
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
diff -Naur -x '*~' ocamlgraph-1.8.1/Makefile.in ocamlgraph-1.8.1-new//Makefile.in
|
||||
--- ocamlgraph-1.8.1/Makefile.in 2011-10-17 09:57:03.000000000 -0430
|
||||
+++ ocamlgraph-1.8.1-new//Makefile.in 2011-11-24 13:01:22.626004819 -0430
|
||||
@@ -16,8 +16,8 @@
|
||||
##########################################################################
|
||||
|
||||
# Where to install the binaries
|
||||
-DESTDIR =
|
||||
prefix =@prefix@
|
||||
+DESTDIR=$(prefix)
|
||||
exec_prefix=@exec_prefix@
|
||||
datarootdir=@datarootdir@
|
||||
BINDIR =$(DESTDIR)@bindir@
|
||||
Reference in New Issue
Block a user