uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
45
pkgs/development/libraries/physics/lhapdf/default.nix
Normal file
45
pkgs/development/libraries/physics/lhapdf/default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ lib, stdenv, fetchurl, python, makeWrapper }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "lhapdf";
|
||||
version = "6.5.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.hepforge.org/archive/lhapdf/LHAPDF-${version}.tar.gz";
|
||||
sha256 = "sha256-ElZBniIn0aT5M4f+HagF5kg1FBfTdV6K9aMKNaamZ1E=";
|
||||
};
|
||||
|
||||
# The Apple SDK only exports locale_t from xlocale.h whereas glibc
|
||||
# had decided that xlocale.h should be a part of locale.h
|
||||
postPatch = lib.optionalString (stdenv.isDarwin && stdenv.cc.isGNU) ''
|
||||
substituteInPlace src/GridPDF.cc --replace '#include <locale>' '#include <xlocale.h>'
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ]
|
||||
++ lib.optionals (python != null && lib.versionAtLeast python.version "3.10") [ python.pkgs.cython ];
|
||||
buildInputs = [ python ];
|
||||
|
||||
configureFlags = lib.optionals (python == null) [ "--disable-python" ];
|
||||
|
||||
preBuild = lib.optionalString (python != null && lib.versionAtLeast python.version "3.10") ''
|
||||
rm wrappers/python/lhapdf.cpp
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru = {
|
||||
pdf_sets = import ./pdf_sets.nix { inherit lib stdenv fetchurl; };
|
||||
};
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/lhapdf --prefix PYTHONPATH : "$(toPythonPath "$out")"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A general purpose interpolator, used for evaluating Parton Distribution Functions from discretised data files";
|
||||
license = licenses.gpl2;
|
||||
homepage = "http://lhapdf.hepforge.org";
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ veprbl ];
|
||||
};
|
||||
}
|
||||
13
pkgs/development/libraries/physics/lhapdf/maintainer.sh
Executable file
13
pkgs/development/libraries/physics/lhapdf/maintainer.sh
Executable file
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -xe
|
||||
|
||||
: ${SED:="$(nix-build '<nixpkgs>' -A gnused --no-out-link)/bin/sed"}
|
||||
|
||||
BASE_URL="https://lhapdfsets.web.cern.ch/current/"
|
||||
|
||||
for pdf_set in `curl -L $BASE_URL 2>/dev/null | "$SED" -n -e 's/.*<a href=".*\/\([^"/]*\.tar\.gz\)".*/\1/p' | sort -u`; do
|
||||
echo -n " \"${pdf_set%.tar.gz}\" = \""
|
||||
nix-prefetch-url "${BASE_URL}${pdf_set}" 2>/dev/null | tr -d '\n'
|
||||
echo "\";"
|
||||
done
|
||||
1369
pkgs/development/libraries/physics/lhapdf/pdf_sets.nix
Normal file
1369
pkgs/development/libraries/physics/lhapdf/pdf_sets.nix
Normal file
File diff suppressed because it is too large
Load diff
5
pkgs/development/libraries/physics/lhapdf/pdfset-hook.sh
Normal file
5
pkgs/development/libraries/physics/lhapdf/pdfset-hook.sh
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
@name@ () {
|
||||
addToSearchPath LHAPDF_DATA_PATH "@out@"
|
||||
}
|
||||
|
||||
postHooks+=(@name@)
|
||||
Loading…
Add table
Add a link
Reference in a new issue