mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 01:43:15 +00:00
e0464e4788
In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ```
52 lines
963 B
Nix
52 lines
963 B
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, unstableGitUpdater
|
|
, cmake
|
|
, blas
|
|
, gmp
|
|
, mpfr
|
|
, fplll
|
|
, eigen
|
|
, llvmPackages
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "flatter";
|
|
version = "0-unstable-2024-03-04";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "keeganryan";
|
|
repo = "flatter";
|
|
rev = "c2ed0ee94b6d281df7bcbce31ca275197ef9a562";
|
|
hash = "sha256-1Pjn0lANXaMOqlwwdOx6X/7jtAvfa2ZWa0nDfS3T5XU=";
|
|
};
|
|
|
|
strictDeps = true;
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
];
|
|
|
|
buildInputs = [
|
|
blas
|
|
gmp
|
|
mpfr
|
|
fplll
|
|
eigen
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
llvmPackages.openmp
|
|
];
|
|
|
|
passthru.updateScript = unstableGitUpdater { };
|
|
|
|
meta = with lib; {
|
|
description = "(F)ast (lat)tice (r)eduction of integer lattice bases";
|
|
homepage = "https://github.com/keeganryan/flatter";
|
|
license = licenses.lgpl3Only;
|
|
mainProgram = "flatter";
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ josephsurin ];
|
|
};
|
|
}
|