nixpkgs/pkgs/tools/filesystems/orangefs/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

62 lines
1.7 KiB
Nix

{ lib, stdenv, fetchurl, bison, flex, autoreconfHook
, openssl, db, attr, perl, tcsh
} :
stdenv.mkDerivation rec {
pname = "orangefs";
version = "2.9.8";
src = fetchurl {
url = "http://download.orangefs.org/current/source/orangefs-${version}.tar.gz";
sha256 = "0c2yla615j04ygclfavh8g5miqhbml2r0zs2c5mvkacf9in7p7sq";
};
nativeBuildInputs = [ bison flex perl autoreconfHook ];
buildInputs = [ openssl db attr tcsh ];
postPatch = ''
# Issue introduced by attr-2.4.48
substituteInPlace src/apps/user/ofs_setdirhint.c --replace attr/xattr.h sys/xattr.h
# Do not try to install empty sysconfdir
substituteInPlace Makefile.in --replace 'install -d $(sysconfdir)' ""
# perl interpreter needs to be fixed or build fails
patchShebangs ./src/apps/admin/pvfs2-genconfig
# symlink points to a location in /usr
rm ./src/client/webpack/ltmain.sh
'';
configureFlags = [
"--sysconfdir=/etc/orangefs"
"--enable-shared"
"--enable-fast"
"--with-ssl=${stdenv.lib.getDev openssl}"
];
enableParallelBuilding = true;
postInstall = ''
# install useful helper scripts
install examples/keys/pvfs2-gen-keys.sh $out/bin
'';
postFixup = ''
for f in pvfs2-getmattr pvfs2-setmattr; do
substituteInPlace $out/bin/$f --replace '#!/bin/csh' '#!${tcsh}/bin/tcsh'
done
sed -i 's:openssl:${openssl}/bin/openssl:' $out/bin/pvfs2-gen-keys.sh
'';
meta = with lib; {
description = "Scale-out network file system for use on high-end computing systems";
homepage = "http://www.orangefs.org/";
license = with licenses; [ asl20 bsd3 gpl2 lgpl21 lgpl21Plus openldap ];
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ markuskowa ];
};
}