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.
50 lines
1.2 KiB
Nix
50 lines
1.2 KiB
Nix
{ lib, stdenv, fetchFromGitHub, copyPkgconfigItems, makePkgconfigItem }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "symfpu";
|
|
version = "unstable-2019-05-17";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "martin-cs";
|
|
repo = "symfpu";
|
|
rev = "8fbe139bf0071cbe0758d2f6690a546c69ff0053";
|
|
sha256 = "1jf5lkn67q136ppfacw3lsry369v7mdr1rhidzjpbz18jfy9zl9q";
|
|
};
|
|
|
|
nativeBuildInputs = [ copyPkgconfigItems ];
|
|
|
|
pkgconfigItems = [
|
|
(makePkgconfigItem {
|
|
name = "symfpu";
|
|
inherit version;
|
|
cflags = [ "-I\${includedir}" ];
|
|
variables = {
|
|
includedir = "@includedir@";
|
|
};
|
|
inherit (meta) description;
|
|
})
|
|
];
|
|
|
|
env = {
|
|
# copyPkgconfigItems will substitute this in the pkg-config file
|
|
includedir = "${placeholder "out"}/include";
|
|
};
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/include/symfpu
|
|
cp -r * $out/include/symfpu/
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "A (concrete or symbolic) implementation of IEEE-754 / SMT-LIB floating-point";
|
|
homepage = "https://github.com/martin-cs/symfpu";
|
|
license = licenses.gpl3Only;
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ shadaj ];
|
|
};
|
|
}
|