Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: df5329e12758
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3c320fe7b103
Choose a head ref
  • 2 commits
  • 4 files changed
  • 2 contributors

Commits on Dec 15, 2016

  1. irods: init at 4.2.0

    bzizou committed Dec 15, 2016
    Copy the full SHA
    146985e View commit details

Commits on May 6, 2017

  1. Merge pull request #19898 from bzizou/irods4.2

    irods: init at 4.2.0
    joachifm authored May 6, 2017
    Copy the full SHA
    3c320fe View commit details
Showing with 160 additions and 0 deletions.
  1. +57 −0 pkgs/tools/filesystems/irods/common.nix
  2. +84 −0 pkgs/tools/filesystems/irods/default.nix
  3. +11 −0 pkgs/tools/filesystems/irods/irods_root_path.patch
  4. +8 −0 pkgs/top-level/all-packages.nix
57 changes: 57 additions & 0 deletions pkgs/tools/filesystems/irods/common.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{ stdenv, bzip2, zlib, autoconf, automake, cmake, gnumake, help2man , texinfo, libtool , cppzmq , libarchive, avro-cpp, boost, jansson, zeromq, openssl, pam, libiodbc, kerberos, gcc, libcxx, which }:

# Common attributes of irods packages

with stdenv;

{
enableParallelBuilding = true;

buildInputs = [ bzip2 zlib autoconf automake cmake gnumake help2man texinfo libtool cppzmq libarchive avro-cpp jansson zeromq openssl pam libiodbc kerberos gcc boost libcxx which ];

propagateBuildInputs = [ boost ];

cmakeFlags = [
"-DIRODS_EXTERNALS_FULLPATH_CLANG=${stdenv.cc}"
"-DIRODS_EXTERNALS_FULLPATH_CLANG_RUNTIME=${stdenv.cc}"
"-DIRODS_EXTERNALS_FULLPATH_ARCHIVE=${libarchive.lib}"
"-DIRODS_EXTERNALS_FULLPATH_AVRO=${avro-cpp}"
"-DIRODS_EXTERNALS_FULLPATH_BOOST=${boost}"
"-DIRODS_EXTERNALS_FULLPATH_JANSSON=${jansson}"
"-DIRODS_EXTERNALS_FULLPATH_ZMQ=${zeromq}"
"-DIRODS_EXTERNALS_FULLPATH_CPPZMQ=${cppzmq}"
"-DIRODS_LINUX_DISTRIBUTION_NAME=nix"
"-DIRODS_LINUX_DISTRIBUTION_VERSION_MAJOR=${builtins.nixVersion}"
"-DCPACK_GENERATOR=TGZ"
"-DCMAKE_CXX_FLAGS=-I${libcxx}/include/c++/v1"
];

preConfigure = ''
patchShebangs ./packaging
patchShebangs ./scripts
substituteInPlace CMakeLists.txt --replace "DESTINATION usr/bin" "DESTINATION bin"
substituteInPlace CMakeLists.txt --replace "INCLUDE_DIRS usr/include/" "INCLUDE_DIRS include/"
substituteInPlace CMakeLists.txt --replace "DESTINATION usr/lib/" "DESTINATION lib/"
export cmakeFlags="$cmakeFlags
-DCMAKE_INSTALL_PREFIX=$out
"
'';

meta = {
description = "Integrated Rule-Oriented Data System (iRODS)";
longDescription = ''
The Integrated Rule-Oriented Data System (iRODS) is open source data management
software used by research organizations and government agencies worldwide.
iRODS is released as a production-level distribution aimed at deployment in mission
critical environments. It virtualizes data storage resources, so users can take
control of their data, regardless of where and on what device the data is stored.
As data volumes grow and data services become more complex, iRODS is increasingly
important in data management. The development infrastructure supports exhaustive
testing on supported platforms; plug-in support for microservices, storage resources,
drivers, and databases; and extensive documentation, training and support services.'';
homepage = http://irods.org;
license = stdenv.lib.licenses.bsd3;
maintainers = [ stdenv.lib.maintainers.bzizou ];
platforms = stdenv.lib.platforms.all;
};
}
84 changes: 84 additions & 0 deletions pkgs/tools/filesystems/irods/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{ stdenv, fetchurl, python, bzip2, zlib, autoconf, automake, cmake, gnumake, help2man , texinfo, libtool , cppzmq , libarchive, avro-cpp, boost, jansson, zeromq, openssl , pam, libiodbc, kerberos, gcc, libcxx, which }:

with stdenv;

let
common = import ./common.nix {
inherit stdenv bzip2 zlib autoconf automake cmake gnumake
help2man texinfo libtool cppzmq libarchive jansson
zeromq openssl pam libiodbc kerberos gcc libcxx
boost avro-cpp which;
};
in rec {

# irods: libs and server package
irods = stdenv.mkDerivation (common // rec {
version = "4.2.0";
prefix = "irods";
name = "${prefix}-${version}";

src = fetchurl {
url = "https://github.com/irods/irods/releases/download/${version}/irods-${version}.tar.gz";
sha256 = "b5c0d7209219629da139058ce462a237ecc22ad4dae613413a428961e4ff9d3e";
};

# Patches:
# irods_root_path.patch : the root path is obtained by stripping 3 items of the path,
# but we don't use /usr with nix, so remove only 2 items.
patches = [ ./irods_root_path.patch ];

preConfigure = common.preConfigure + ''
patchShebangs ./test
substituteInPlace plugins/database/CMakeLists.txt --replace "COMMAND cpp" "COMMAND ${gcc.cc}/bin/cpp"
substituteInPlace cmake/server.cmake --replace "DESTINATION usr/sbin" "DESTINATION sbin"
substituteInPlace cmake/server.cmake --replace "IRODS_DOC_DIR usr/share" "IRODS_DOC_DIR share"
substituteInPlace cmake/runtime_library.cmake --replace "DESTINATION usr/lib" "DESTINATION lib"
substituteInPlace cmake/development_library.cmake --replace "DESTINATION usr/lib" "DESTINATION lib"
substituteInPlace cmake/development_library.cmake --replace "DESTINATION usr/include" "DESTINATION include"
export cmakeFlags="$cmakeFlags
-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,$out/lib
-DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath,$out/lib
-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-rpath,$out/lib
"
'';

meta = common.meta // {
longDescription = common.meta.longDescription + ''
This package provides the servers and libraries.'';
};
});


# icommands (CLI) package, depends on the irods package
irods-icommands = stdenv.mkDerivation (common // rec {
version = "4.2.0";
name = "irods-icommands-${version}";
src = fetchurl {
url = "http://github.com/irods/irods_client_icommands/archive/${version}.tar.gz";
sha256 = "b581067c8139b5ef7897f15fc1fc79f69d2e784a0f36d96e8fa3cb260b6378ce";
};

buildInputs = common.buildInputs ++ [ irods ];

propagateBuildInputs = [ boost ];

preConfigure = common.preConfigure + ''
patchShebangs ./bin
'';

cmakeFlags = common.cmakeFlags ++ [
"-DCMAKE_INSTALL_PREFIX=${out}"
"-DIRODS_DIR=${irods}/lib/irods/cmake"
"-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath,${irods}/lib"
"-DCMAKE_MODULE_LINKER_FLAGS=-Wl,-rpath,${irods}/lib"
"-DCMAKE_SHARED_LINKER_FLAGS=-Wl,-rpath,${irods}/lib"
];

meta = common.meta // {
description = common.meta.description + " CLI clients";
longDescription = common.meta.longDescription + ''
This package provides the CLI clients, called 'icommands'.'';
};
});
}

11 changes: 11 additions & 0 deletions pkgs/tools/filesystems/irods/irods_root_path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/lib/core/src/irods_default_paths.cpp 2016-10-24 17:09:02.955889536 +0200
+++ b/lib/core/src/irods_default_paths.cpp 2016-10-24 17:09:43.178722157 +0200
@@ -18,7 +18,7 @@
try {
boost::filesystem::path path{dl_info.dli_fname};
path = boost::filesystem::canonical(path);
- path.remove_filename().remove_filename().remove_filename(); // Removes filename and the two directories (usr and lib) between libirods_common.so and base of irods install
+ path.remove_filename().remove_filename(); // Removes filename and the two directories (usr and lib) between libirods_common.so and base of irods install
return path;
} catch(const boost::filesystem::filesystem_error& e) {
THROW(-1, e.what());
8 changes: 8 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
@@ -2375,6 +2375,14 @@ with pkgs;

ifuse = callPackage ../tools/filesystems/ifuse/default.nix { };

inherit (callPackages ../tools/filesystems/irods rec {
stdenv = llvmPackages_38.libcxxStdenv;
libcxx = llvmPackages_38.libcxx;
boost = boost160.override { inherit stdenv; };
})
irods
irods-icommands;

ignition = recurseIntoAttrs {

math = callPackage ../development/libraries/ignition-math { };