Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

odoo: fix tests and update #344173

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkgs/applications/networking/remote/anydesk/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ let
description = "Desktop sharing application, providing remote support and online meetings";
in stdenv.mkDerivation (finalAttrs: {
pname = "anydesk";
version = "6.3.2";
version = "6.3.3";

src = fetchurl {
urls = [
"https://download.anydesk.com/linux/anydesk-${finalAttrs.version}-amd64.tar.gz"
"https://download.anydesk.com/linux/generic-linux/anydesk-${finalAttrs.version}-amd64.tar.gz"
];
hash = "sha256-nSY4qHRsEvQk4M3JDHalAk3C6Y21WlfDQ2Gpp6/jjMs=";
hash = "sha256-uSotkFOpuC2a2sRTagY9KFx3F2VJmgrsn+dBa5ycdck=";
};

buildInputs = [
Expand Down
31 changes: 23 additions & 8 deletions pkgs/applications/radio/abracadabra/default.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
{ lib, stdenv, fetchFromGitHub, cmake, wrapQtAppsHook
, qtbase, qtmultimedia, qttools
, faad2, mpg123, portaudio
, libusb1, rtl-sdr, airspy, soapysdr-with-plugins
} :
{
lib,
stdenv,
fetchFromGitHub,
cmake,
wrapQtAppsHook,
qtbase,
qtmultimedia,
qttools,
qtpositioning,
qtlocation,
faad2,
mpg123,
portaudio,
libusb1,
rtl-sdr,
airspy,
soapysdr-with-plugins,
}:

stdenv.mkDerivation rec {
pname = "abracadabra";
version = "2.5.1";
version = "2.6.0";

src = fetchFromGitHub {
owner = "KejPi";
repo = "AbracaDABra";
rev = "v${version}";
hash = "sha256-EaHVHfyhQTxxLtb3wsJV7Fea2jyENnfn6Lv/3GwAKdk=";
hash = "sha256-oO8ef2VTw/gVNNU2JRXtEHEkJm7X7dypjZr0vZXCfH8=";
};

nativeBuildInputs = [
Expand All @@ -24,6 +38,8 @@ stdenv.mkDerivation rec {
buildInputs = [
qtbase
qtmultimedia
qtlocation
qtpositioning
faad2
mpg123
portaudio
Expand All @@ -47,4 +63,3 @@ stdenv.mkDerivation rec {
mainProgram = "AbracaDABra";
};
}

Original file line number Diff line number Diff line change
@@ -1,55 +1,61 @@
{ lib
, stdenv
, fetchFromGitHub
, mpiCheckPhaseHook
, python3
, gfortran
, blas
, lapack
, fftw
, libint
, libvori
, libxc
, dftd4
, mctc-lib
, mstore
, multicharge
, mpi
, gsl
, scalapack
, openssh
, makeWrapper
, libxsmm
, spglib
, which
, pkg-config
, plumed
, zlib
, hdf5-fortran
, sirius
, libvdwxc
, spla
, spfft
, enableElpa ? false
, elpa
, cudaPackages
, rocmPackages
, config
, gpuBackend ? (
if config.cudaSupport
then "cuda"
else if config.rocmSupport
then "rocm"
else "none"
)
# Change to a value suitable for your target GPU.
# For AMD values see https://github.com/cp2k/cp2k/blob/master/INSTALL.md#2v-rocmhip-support-for-amd-gpu
# and for Nvidia see https://github.com/cp2k/cp2k/blob/master/INSTALL.md#2i-cuda-optional-improved-performance-on-gpu-systems
, gpuVersion ? ( if gpuBackend == "cuda" then "A100" else "Mi100" )
, gpuArch ? ( if gpuBackend == "cuda" then "sm_80" else "gfx908" )
{
lib,
stdenv,
fetchFromGitHub,
mpiCheckPhaseHook,
python3,
gfortran,
blas,
lapack,
fftw,
libint,
libvori,
libxc,
dftd4,
mctc-lib,
mstore,
multicharge,
mpi,
gsl,
scalapack,
openssh,
makeWrapper,
libxsmm,
spglib,
which,
pkg-config,
plumed,
zlib,
hdf5-fortran,
sirius,
libvdwxc,
spla,
spfft,
enableElpa ? false,
elpa,
cudaPackages,
rocmPackages,
config,
gpuBackend ? (
if config.cudaSupport then
"cuda"
else if config.rocmSupport then
"rocm"
else
"none"
),
# Change to a value suitable for your target GPU.
# For AMD values see https://github.com/cp2k/cp2k/blob/master/INSTALL.md#2v-rocmhip-support-for-amd-gpu
# and for Nvidia see https://github.com/cp2k/cp2k/blob/master/INSTALL.md#2i-cuda-optional-improved-performance-on-gpu-systems
gpuVersion ? (if gpuBackend == "cuda" then "A100" else "Mi100"),
gpuArch ? (if gpuBackend == "cuda" then "sm_80" else "gfx908"),
}:

assert builtins.elem gpuBackend [ "none" "cuda" "rocm" ];
assert builtins.elem gpuBackend [
"none"
"cuda"
"rocm"
];

let
cp2kVersion = "psmp";
Expand All @@ -74,47 +80,53 @@ stdenv.mkDerivation rec {
./remove-compiler-options.patch
];

nativeBuildInputs = [ python3 which openssh makeWrapper pkg-config ]
++ lib.optional (gpuBackend == "cuda") cudaPackages.cuda_nvcc;

buildInputs = [
gfortran
fftw
gsl
libint
libvori
libxc
dftd4
mctc-lib
mstore
multicharge
libxsmm
mpi
spglib
scalapack
blas
lapack
plumed
zlib
hdf5-fortran
sirius
spla
spfft
libvdwxc
]
++ lib.optional enableElpa elpa
++ lib.optionals (gpuBackend == "cuda") [
cudaPackages.cuda_cudart
cudaPackages.libcublas
cudaPackages.cuda_nvrtc
] ++ lib.optionals (gpuBackend == "rocm") [
rocmPackages.clr
rocmPackages.rocm-core
rocmPackages.hipblas
rocmPackages.hipfft
rocmPackages.rocblas
]
;
nativeBuildInputs = [
python3
which
openssh
makeWrapper
pkg-config
] ++ lib.optional (gpuBackend == "cuda") cudaPackages.cuda_nvcc;

buildInputs =
[
gfortran
fftw
gsl
libint
libvori
libxc
dftd4
mctc-lib
mstore
multicharge
libxsmm
mpi
spglib
scalapack
blas
lapack
plumed
zlib
hdf5-fortran
sirius
spla
spfft
libvdwxc
]
++ lib.optional enableElpa elpa
++ lib.optionals (gpuBackend == "cuda") [
cudaPackages.cuda_cudart
cudaPackages.libcublas
cudaPackages.cuda_nvrtc
]
++ lib.optionals (gpuBackend == "rocm") [
rocmPackages.clr
rocmPackages.rocm-core
rocmPackages.hipblas
rocmPackages.hipfft
rocmPackages.rocblas
];

propagatedBuildInputs = [ (lib.getBin mpi) ];
propagatedUserEnvPkgs = [ mpi ];
Expand All @@ -136,35 +148,43 @@ stdenv.mkDerivation rec {
'';

configurePhase = ''
runHook preConfigure

cat > arch/${arch}.${cp2kVersion} << EOF
CC = mpicc
CPP =
FC = mpif90
LD = mpif90
AR = ar -r
${lib.strings.optionalString (gpuBackend == "cuda") ''
OFFLOAD_CC = nvcc
OFFLOAD_FLAGS = -O3 -g -w --std=c++11 -arch ${gpuArch}
OFFLOAD_TARGET = cuda
GPUVER = ${gpuVersion}
CXX = mpicxx
CXXFLAGS = -std=c++11 -fopenmp
OFFLOAD_CC = nvcc
OFFLOAD_FLAGS = -O3 -g -w --std=c++11 -arch ${gpuArch}
OFFLOAD_TARGET = cuda
GPUVER = ${gpuVersion}
CXX = mpicxx
CXXFLAGS = -std=c++11 -fopenmp
''}
${lib.strings.optionalString (gpuBackend == "rocm") ''
GPUVER = ${gpuVersion}
OFFLOAD_CC = hipcc
OFFLOAD_FLAGS = -fopenmp -m64 -pthread -fPIC -D__GRID_HIP -O2 --offload-arch=${gpuArch} --rocm-path=${rocmPackages.rocm-core}
OFFLOAD_TARGET = hip
CXX = mpicxx
CXXFLAGS = -std=c++11 -fopenmp -D__HIP_PLATFORM_AMD__
GPUVER = ${gpuVersion}
OFFLOAD_CC = hipcc
OFFLOAD_FLAGS = -fopenmp -m64 -pthread -fPIC -D__GRID_HIP -O2 --offload-arch=${gpuArch} --rocm-path=${rocmPackages.rocm-core}
OFFLOAD_TARGET = hip
CXX = mpicxx
CXXFLAGS = -std=c++11 -fopenmp -D__HIP_PLATFORM_AMD__
''}
DFLAGS = -D__FFTW3 -D__LIBXC -D__LIBINT -D__parallel -D__SCALAPACK \
-D__MPI_VERSION=3 -D__F2008 -D__LIBXSMM -D__SPGLIB \
-D__MAX_CONTR=4 -D__LIBVORI ${lib.optionalString enableElpa "-D__ELPA"} \
-D__PLUMED2 -D__HDF5 -D__GSL -D__SIRIUS -D__LIBVDWXC -D__SPFFT -D__SPLA \
-D__DFTD4 \
${lib.strings.optionalString (gpuBackend == "cuda") "-D__OFFLOAD_CUDA -D__ACC -D__DBCSR_ACC -D__NO_OFFLOAD_PW"} \
${lib.strings.optionalString (gpuBackend == "rocm") "-D__OFFLOAD_HIP -D__DBCSR_ACC -D__NO_OFFLOAD_PW"}
${
lib.strings.optionalString (
gpuBackend == "cuda"
) "-D__OFFLOAD_CUDA -D__ACC -D__DBCSR_ACC -D__NO_OFFLOAD_PW"
} \
${
lib.strings.optionalString (gpuBackend == "rocm") "-D__OFFLOAD_HIP -D__DBCSR_ACC -D__NO_OFFLOAD_PW"
}
CFLAGS = -fopenmp
FCFLAGS = \$(DFLAGS) -O2 -ffree-form -ffree-line-length-none \
-ftree-vectorize -funroll-loops -msse2 \
Expand All @@ -187,15 +207,20 @@ stdenv.mkDerivation rec {
-lz -ldl ${lib.optionalString (mpi.pname == "openmpi") "$(mpicxx --showme:link)"} \
-lplumed -lhdf5_fortran -lhdf5_hl -lhdf5 -lgsl -lsirius -lspla -lspfft -lvdwxc \
-ldftd4 -lmstore -lmulticharge -lmctc-lib \
${lib.strings.optionalString (gpuBackend == "cuda") ''
-L${cudaPackages.cuda_cudart}/lib/stubs/ \
-lcudart -lnvrtc -lcuda -lcublas
${
lib.strings.optionalString (gpuBackend == "cuda") ''
-L${cudaPackages.cuda_cudart}/lib/stubs/ \
-lcudart -lnvrtc -lcuda -lcublas
''
} \
${lib.strings.optionalString (gpuBackend == "rocm") "-lamdhip64 -lhipfft -lhipblas -lrocblas"}
${
lib.strings.optionalString (gpuBackend == "rocm") "-lamdhip64 -lhipfft -lhipblas -lrocblas"
}
LDFLAGS = \$(FCFLAGS) \$(LIBS)
include ${plumed}/lib/plumed/src/lib/Plumed.inc
EOF

runHook postConfigure
'';

nativeCheckInputs = [
Expand All @@ -213,6 +238,8 @@ stdenv.mkDerivation rec {
'';

installPhase = ''
runHook preInstall

mkdir -p $out/bin $out/share/cp2k

cp exe/${arch}/* $out/bin
Expand All @@ -228,15 +255,19 @@ stdenv.mkDerivation rec {
--set OMP_NUM_THREADS 1

cp -r data/* $out/share/cp2k

runHook postInstall
'';

passthru = { inherit mpi; };
passthru = {
inherit mpi;
};

meta = with lib; {
meta = {
description = "Quantum chemistry and solid state physics program";
homepage = "https://www.cp2k.org";
license = licenses.gpl2Plus;
maintainers = [ maintainers.sheepforce ];
license = lib.licenses.gpl2Plus;
maintainers = [ lib.maintainers.sheepforce ];
platforms = [ "x86_64-linux" ];
};
}
Loading