mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +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" ```
41 lines
964 B
Nix
41 lines
964 B
Nix
{
|
|
blas,
|
|
blasfeo,
|
|
cmake,
|
|
fetchFromGitHub,
|
|
lib,
|
|
stdenv,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "hpipm";
|
|
#version = "0.1.3"; not building, use master instead
|
|
version = "0-unstable-2024-07-30";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "giaf";
|
|
repo = "hpipm";
|
|
rev = "3ab7d6059d9d7da31ec9ff6a8ca84fd8ec5ab5e2";
|
|
hash = "sha256-TRNHjW2/YDfGJHTG9sy2nmHyk6+HlBGIabPm87TETE8=";
|
|
};
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
buildInputs = [
|
|
blas
|
|
blasfeo
|
|
];
|
|
|
|
cmakeFlags = [
|
|
"-DHPIPM_FIND_BLASFEO=ON"
|
|
"-DBUILD_SHARED_LIBS=ON"
|
|
] ++ lib.optionals (!stdenv.hostPlatform.isx86_64) [ "-DTARGET=GENERIC" ];
|
|
|
|
meta = {
|
|
description = "High-performance interior-point-method QP and QCQP solvers";
|
|
homepage = "https://github.com/giaf/hpipm";
|
|
changelog = "https://github.com/giaf/hpipm/blob/${finalAttrs.src.rev}/Changelog.txt";
|
|
license = lib.licenses.bsd2;
|
|
maintainers = with lib.maintainers; [ nim65s ];
|
|
};
|
|
})
|