mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-14 00:43:24 +00:00
571c71e6f7
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.
57 lines
1.5 KiB
Nix
57 lines
1.5 KiB
Nix
{ lib, stdenv, fetchurl, perl }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "spooles";
|
|
version = "2.2";
|
|
|
|
src = fetchurl {
|
|
url = "http://www.netlib.org/linalg/spooles/spooles.${version}.tgz";
|
|
sha256 = "1pf5z3vvwd8smbpibyabprdvcmax0grzvx2y0liy98c7x6h5jid8";
|
|
};
|
|
|
|
sourceRoot = ".";
|
|
|
|
patches = [
|
|
./spooles.patch
|
|
# fix compiler error where NULL is used as a zero parameter
|
|
./transform.patch
|
|
# use proper format specifier for size_t
|
|
./allocate.patch
|
|
];
|
|
|
|
postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
substituteInPlace makefile --replace "-Wl,-soname," "-Wl,-install_name,$out/lib/"
|
|
'';
|
|
|
|
buildPhase = ''
|
|
make lib
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/lib $out/include/spooles
|
|
cp libspooles.a libspooles.so.2.2 $out/lib/
|
|
ln -s libspooles.so.2.2 $out/lib/libspooles.so.2
|
|
ln -s libspooles.so.2 $out/lib/libspooles.so
|
|
for h in *.h; do
|
|
if [ $h != 'MPI.h' ]; then
|
|
cp $h $out/include/spooles
|
|
d=`basename $h .h`
|
|
if [ -d $d ]; then
|
|
mkdir $out/include/spooles/$d
|
|
cp $d/*.h $out/include/spooles/$d
|
|
fi
|
|
fi
|
|
done
|
|
'';
|
|
|
|
nativeBuildInputs = [ perl ];
|
|
|
|
meta = with lib; {
|
|
homepage = "http://www.netlib.org/linalg/spooles/";
|
|
description = "Library for solving sparse real and complex linear systems of equations";
|
|
license = licenses.publicDomain;
|
|
maintainers = with maintainers; [ gebner ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|