nixpkgs/pkgs/by-name/li/libfabric/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

45 lines
1.1 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, pkg-config
, autoreconfHook
, enablePsm2 ? (stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isLinux)
, libpsm2
, enableOpx ? (stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isLinux)
, libuuid
, numactl
}:
stdenv.mkDerivation rec {
pname = "libfabric";
version = "1.22.0";
enableParallelBuilding = true;
src = fetchFromGitHub {
owner = "ofiwg";
repo = pname;
rev = "v${version}";
sha256 = "sha256-s6e9UMCYqSuAvVvlF+SuduCA5UC43QEahUA8apubnOk=";
};
outputs = [ "out" "dev" "man" ];
nativeBuildInputs = [ pkg-config autoreconfHook ];
buildInputs = lib.optionals enableOpx [ libuuid numactl ] ++ lib.optionals enablePsm2 [ libpsm2 ];
configureFlags = [
(if enablePsm2 then "--enable-psm2=${libpsm2}" else "--disable-psm2")
(if enableOpx then "--enable-opx" else "--disable-opx")
];
meta = with lib; {
homepage = "https://ofiwg.github.io/libfabric/";
description = "Open Fabric Interfaces";
license = with licenses; [ gpl2 bsd2 ];
platforms = platforms.all;
maintainers = [ maintainers.bzizou ];
};
}