Compare commits
9 Commits
enableStri
...
9f3bbfe606
| Author | SHA1 | Date | |
|---|---|---|---|
| 9f3bbfe606 | |||
| 240a705fa7 | |||
| cef7832f56 | |||
| 5d99acc02e | |||
| f78cdf8efa | |||
| e8fc15d0e8 | |||
| 725520a7a7 | |||
| 94f4ba6468 | |||
| f999efa544 |
@@ -3,4 +3,4 @@ build:bsc-ci.all:
|
|||||||
tags:
|
tags:
|
||||||
- nix
|
- nix
|
||||||
script:
|
script:
|
||||||
- nix build -L "jungle#bsc-ci.all" --override-input bscpkgs . -v --show-trace
|
- nix build -L --no-link --print-out-paths .#bsc-ci.all
|
||||||
|
|||||||
2
COPYING
2
COPYING
@@ -1,4 +1,4 @@
|
|||||||
Copyright (c) 2020-2021 Barcelona Supercomputing Center
|
Copyright (c) 2020-2025 Barcelona Supercomputing Center
|
||||||
Copyright (c) 2003-2020 Eelco Dolstra and the Nixpkgs/NixOS contributors
|
Copyright (c) 2003-2020 Eelco Dolstra and the Nixpkgs/NixOS contributors
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
|
|||||||
10
README.md
10
README.md
@@ -1 +1,9 @@
|
|||||||
Nix overlay with BSC packages.
|
# Jungle
|
||||||
|
|
||||||
|
This repository provides two components that can be used independently:
|
||||||
|
|
||||||
|
- A Nix overlay with packages used at BSC (formerly known as bscpkgs). Access
|
||||||
|
them directly with `nix shell .#<pkgname>`.
|
||||||
|
|
||||||
|
- NixOS configurations for jungle machines. Use `nixos-rebuild switch --flake .`
|
||||||
|
to upgrade the current machine.
|
||||||
|
|||||||
21
flake.lock
generated
21
flake.lock
generated
@@ -23,26 +23,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bscpkgs": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1749650500,
|
|
||||||
"narHash": "sha256-2MHfVPV6RA7qPSCtXh4+KK0F0UjN+J4z8//+n6NK7Xs=",
|
|
||||||
"ref": "refs/heads/master",
|
|
||||||
"rev": "9d1944c658929b6f98b3f3803fead4d1b91c4405",
|
|
||||||
"revCount": 961,
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://git.sr.ht/~rodarima/bscpkgs"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://git.sr.ht/~rodarima/bscpkgs"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"darwin": {
|
"darwin": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -105,7 +85,6 @@
|
|||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
"bscpkgs": "bscpkgs",
|
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
56
flake.nix
56
flake.nix
@@ -3,17 +3,22 @@
|
|||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||||
agenix.url = "github:ryantm/agenix";
|
agenix.url = "github:ryantm/agenix";
|
||||||
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
bscpkgs.url = "git+https://git.sr.ht/~rodarima/bscpkgs";
|
|
||||||
bscpkgs.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, agenix, bscpkgs, ... }:
|
outputs = { self, nixpkgs, agenix, ... }:
|
||||||
let
|
let
|
||||||
mkConf = name: nixpkgs.lib.nixosSystem {
|
mkConf = name: nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = { inherit nixpkgs bscpkgs agenix; theFlake = self; };
|
specialArgs = { inherit nixpkgs agenix; theFlake = self; };
|
||||||
modules = [ "${self.outPath}/m/${name}/configuration.nix" ];
|
modules = [ "${self.outPath}/m/${name}/configuration.nix" ];
|
||||||
};
|
};
|
||||||
|
# For now we only support x86
|
||||||
|
system = "x86_64-linux";
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
overlays = [ self.overlays.default ];
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
@@ -31,36 +36,17 @@ in
|
|||||||
weasel = mkConf "weasel";
|
weasel = mkConf "weasel";
|
||||||
};
|
};
|
||||||
|
|
||||||
packages.x86_64-linux = self.nixosConfigurations.hut.pkgs // {
|
bscOverlay = import ./overlay.nix;
|
||||||
bscpkgs = bscpkgs.packages.x86_64-linux;
|
overlays.default = self.bscOverlay;
|
||||||
nixpkgs = nixpkgs.legacyPackages.x86_64-linux;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# TODO: Merge from bscpkgs:
|
# full nixpkgs with our overlay applied
|
||||||
#
|
legacyPackages.${system} = pkgs;
|
||||||
# inputs.nixpkgs.url = "nixpkgs";
|
|
||||||
#
|
hydraJobs = {
|
||||||
# outputs = { self, nixpkgs, ...}:
|
inherit (self.legacyPackages.${system}.bsc-ci) tests pkgs cross;
|
||||||
# let
|
};
|
||||||
# # For now we only support x86
|
|
||||||
# system = "x86_64-linux";
|
# propagate nixpkgs lib, so we can do bscpkgs.lib
|
||||||
# pkgs = import nixpkgs {
|
inherit (nixpkgs) lib;
|
||||||
# inherit system;
|
};
|
||||||
# overlays = [ self.overlays.default ];
|
|
||||||
# };
|
|
||||||
# in
|
|
||||||
# {
|
|
||||||
# bscOverlay = import ./overlay.nix;
|
|
||||||
# overlays.default = self.bscOverlay;
|
|
||||||
# # full nixpkgs with our overlay applied
|
|
||||||
# legacyPackages.${system} = pkgs;
|
|
||||||
#
|
|
||||||
# hydraJobs = {
|
|
||||||
# inherit (self.legacyPackages.${system}.bsc-ci) tests pkgs cross;
|
|
||||||
# };
|
|
||||||
#
|
|
||||||
# # propagate nixpkgs lib, so we can do bscpkgs.lib
|
|
||||||
# inherit (nixpkgs) lib;
|
|
||||||
# };
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
{ pkgs, nixpkgs, bscpkgs, theFlake, ... }:
|
{ pkgs, nixpkgs, theFlake, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
bscpkgs.bscOverlay
|
(import ../../../overlay.nix)
|
||||||
(import ../../../pkgs/overlay.nix)
|
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|||||||
15
overlay.nix
15
overlay.nix
@@ -7,6 +7,7 @@ let
|
|||||||
callPackage = final.callPackage;
|
callPackage = final.callPackage;
|
||||||
|
|
||||||
bscPkgs = {
|
bscPkgs = {
|
||||||
|
amd-uprof = prev.callPackage ./pkgs/amd-uprof/default.nix { };
|
||||||
bench6 = callPackage ./pkgs/bench6/default.nix { };
|
bench6 = callPackage ./pkgs/bench6/default.nix { };
|
||||||
bigotes = callPackage ./pkgs/bigotes/default.nix { };
|
bigotes = callPackage ./pkgs/bigotes/default.nix { };
|
||||||
clangOmpss2 = callPackage ./pkgs/llvm-ompss2/default.nix { };
|
clangOmpss2 = callPackage ./pkgs/llvm-ompss2/default.nix { };
|
||||||
@@ -14,12 +15,24 @@ let
|
|||||||
clangOmpss2Nodes = callPackage ./pkgs/llvm-ompss2/default.nix { ompss2rt = final.nodes; openmp = final.openmp; };
|
clangOmpss2Nodes = callPackage ./pkgs/llvm-ompss2/default.nix { ompss2rt = final.nodes; openmp = final.openmp; };
|
||||||
clangOmpss2NodesOmpv = callPackage ./pkgs/llvm-ompss2/default.nix { ompss2rt = final.nodes; openmp = final.openmpv; };
|
clangOmpss2NodesOmpv = callPackage ./pkgs/llvm-ompss2/default.nix { ompss2rt = final.nodes; openmp = final.openmpv; };
|
||||||
clangOmpss2Unwrapped = callPackage ./pkgs/llvm-ompss2/clang.nix { };
|
clangOmpss2Unwrapped = callPackage ./pkgs/llvm-ompss2/clang.nix { };
|
||||||
|
cudainfo = prev.callPackage ./pkgs/cudainfo/default.nix { };
|
||||||
#extrae = callPackage ./pkgs/extrae/default.nix { }; # Broken and outdated
|
#extrae = callPackage ./pkgs/extrae/default.nix { }; # Broken and outdated
|
||||||
gpi-2 = callPackage ./pkgs/gpi-2/default.nix { };
|
gpi-2 = callPackage ./pkgs/gpi-2/default.nix { };
|
||||||
intelPackages_2023 = callPackage ./pkgs/intel-oneapi/2023.nix { };
|
intelPackages_2023 = callPackage ./pkgs/intel-oneapi/2023.nix { };
|
||||||
jemallocNanos6 = callPackage ./pkgs/nanos6/jemalloc.nix { };
|
jemallocNanos6 = callPackage ./pkgs/nanos6/jemalloc.nix { };
|
||||||
|
# FIXME: Extend this to all linuxPackages variants. Open problem, see:
|
||||||
|
# https://discourse.nixos.org/t/whats-the-right-way-to-make-a-custom-kernel-module-available/4636
|
||||||
|
linuxPackages = prev.linuxPackages.extend (_final: _prev: {
|
||||||
|
amd-uprof-driver = _prev.callPackage ./pkgs/amd-uprof/driver.nix { };
|
||||||
|
});
|
||||||
|
linuxPackages_latest = prev.linuxPackages_latest.extend(_final: _prev: {
|
||||||
|
amd-uprof-driver = _prev.callPackage ./pkgs/amd-uprof/driver.nix { };
|
||||||
|
});
|
||||||
lmbench = callPackage ./pkgs/lmbench/default.nix { };
|
lmbench = callPackage ./pkgs/lmbench/default.nix { };
|
||||||
mcxx = callPackage ./pkgs/mcxx/default.nix { };
|
mcxx = callPackage ./pkgs/mcxx/default.nix { };
|
||||||
|
meteocat-exporter = prev.callPackage ./pkgs/meteocat-exporter/default.nix { };
|
||||||
|
mpi = final.mpich; # Set MPICH as default
|
||||||
|
mpich = callPackage ./pkgs/mpich/default.nix { mpich = prev.mpich; };
|
||||||
nanos6 = callPackage ./pkgs/nanos6/default.nix { };
|
nanos6 = callPackage ./pkgs/nanos6/default.nix { };
|
||||||
nanos6Debug = final.nanos6.override { enableDebug = true; };
|
nanos6Debug = final.nanos6.override { enableDebug = true; };
|
||||||
nixtools = callPackage ./pkgs/nixtools/default.nix { };
|
nixtools = callPackage ./pkgs/nixtools/default.nix { };
|
||||||
@@ -34,6 +47,7 @@ let
|
|||||||
ovni = callPackage ./pkgs/ovni/default.nix { };
|
ovni = callPackage ./pkgs/ovni/default.nix { };
|
||||||
ovniGit = final.ovni.override { useGit = true; };
|
ovniGit = final.ovni.override { useGit = true; };
|
||||||
paraverKernel = callPackage ./pkgs/paraver/kernel.nix { };
|
paraverKernel = callPackage ./pkgs/paraver/kernel.nix { };
|
||||||
|
prometheus-slurm-exporter = prev.callPackage ./pkgs/slurm-exporter/default.nix { };
|
||||||
#pscom = callPackage ./pkgs/parastation/pscom.nix { }; # Unmaintaned
|
#pscom = callPackage ./pkgs/parastation/pscom.nix { }; # Unmaintaned
|
||||||
#psmpi = callPackage ./pkgs/parastation/psmpi.nix { }; # Unmaintaned
|
#psmpi = callPackage ./pkgs/parastation/psmpi.nix { }; # Unmaintaned
|
||||||
sonar = callPackage ./pkgs/sonar/default.nix { };
|
sonar = callPackage ./pkgs/sonar/default.nix { };
|
||||||
@@ -43,6 +57,7 @@ let
|
|||||||
stdenvClangOmpss2NodesOmpv = final.stdenv.override { cc = final.clangOmpss2NodesOmpv; allowedRequisites = null; };
|
stdenvClangOmpss2NodesOmpv = final.stdenv.override { cc = final.clangOmpss2NodesOmpv; allowedRequisites = null; };
|
||||||
tagaspi = callPackage ./pkgs/tagaspi/default.nix { };
|
tagaspi = callPackage ./pkgs/tagaspi/default.nix { };
|
||||||
tampi = callPackage ./pkgs/tampi/default.nix { };
|
tampi = callPackage ./pkgs/tampi/default.nix { };
|
||||||
|
upc-qaire-exporter = prev.callPackage ./pkgs/upc-qaire-exporter/default.nix { };
|
||||||
wxparaver = callPackage ./pkgs/paraver/default.nix { };
|
wxparaver = callPackage ./pkgs/paraver/default.nix { };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,68 +1,36 @@
|
|||||||
{
|
{
|
||||||
stdenv
|
stdenv
|
||||||
, lib
|
, lib
|
||||||
, fetchurl
|
|
||||||
, perl
|
|
||||||
, gfortran
|
|
||||||
, openssh
|
|
||||||
, hwloc
|
|
||||||
, libfabric
|
, libfabric
|
||||||
, enableDebug ? false
|
, mpich
|
||||||
|
, pmix
|
||||||
|
, gfortran
|
||||||
|
, symlinkJoin
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
let
|
||||||
|
# pmix comes with the libraries in .out and headers in .dev
|
||||||
stdenv.mkDerivation rec {
|
pmixAll = symlinkJoin {
|
||||||
pname = "mpich";
|
name = "pmix-all";
|
||||||
version = "3.3.2";
|
paths = [ pmix.dev pmix.out ];
|
||||||
|
|
||||||
src = fetchurl {
|
|
||||||
url = "https://www.mpich.org/static/downloads/${version}/mpich-${version}.tar.gz";
|
|
||||||
sha256 = "1farz5zfx4cd0c3a0wb9pgfypzw0xxql1j1294z1sxslga1ziyjb";
|
|
||||||
};
|
};
|
||||||
|
in mpich.overrideAttrs (old: {
|
||||||
|
buildInput = old.buildInputs ++ [
|
||||||
|
libfabric
|
||||||
|
pmixAll
|
||||||
|
];
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--enable-shared"
|
"--enable-shared"
|
||||||
"--enable-sharedlib"
|
"--enable-sharedlib"
|
||||||
|
"--with-pm=no"
|
||||||
"--with-device=ch4:ofi"
|
"--with-device=ch4:ofi"
|
||||||
|
"--with-pmi=pmix"
|
||||||
|
"--with-pmix=${pmixAll}"
|
||||||
"--with-libfabric=${libfabric}"
|
"--with-libfabric=${libfabric}"
|
||||||
]
|
"--enable-g=log"
|
||||||
++ optional enableDebug "--enable-g=dbg,log";
|
] ++ lib.optionals (lib.versionAtLeast gfortran.version "10") [
|
||||||
|
"FFLAGS=-fallow-argument-mismatch" # https://github.com/pmodels/mpich/issues/4300
|
||||||
enableParallelBuilding = true;
|
"FCFLAGS=-fallow-argument-mismatch"
|
||||||
|
];
|
||||||
buildInputs = [ perl gfortran openssh hwloc libfabric ];
|
|
||||||
hardeningDisable = [ "all" ];
|
hardeningDisable = [ "all" ];
|
||||||
|
})
|
||||||
# doCheck = true; # Fails
|
|
||||||
|
|
||||||
preFixup = ''
|
|
||||||
# Ensure the default compilers are the ones mpich was built with
|
|
||||||
sed -i 's:CC="gcc":CC=${stdenv.cc}/bin/gcc:' $out/bin/mpicc
|
|
||||||
sed -i 's:CXX="g++":CXX=${stdenv.cc}/bin/g++:' $out/bin/mpicxx
|
|
||||||
sed -i 's:FC="gfortran":FC=${gfortran}/bin/gfortran:' $out/bin/mpifort
|
|
||||||
''
|
|
||||||
+ lib.optionalString (!stdenv.isDarwin) ''
|
|
||||||
# /tmp/nix-build... ends up in the RPATH, fix it manually
|
|
||||||
for entry in $out/bin/mpichversion $out/bin/mpivars; do
|
|
||||||
echo "fix rpath: $entry"
|
|
||||||
patchelf --set-rpath "$out/lib" $entry
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Implementation of the Message Passing Interface (MPI) standard";
|
|
||||||
|
|
||||||
longDescription = ''
|
|
||||||
MPICH is a high-performance and widely portable implementation of
|
|
||||||
the Message Passing Interface (MPI) standard (MPI-1, MPI-2 and MPI-3).
|
|
||||||
'';
|
|
||||||
homepage = "http://www.mpich.org";
|
|
||||||
license = {
|
|
||||||
url = "https://github.com/pmodels/mpich/blob/v${version}/COPYRIGHT";
|
|
||||||
fullName = "MPICH license (permissive)";
|
|
||||||
};
|
|
||||||
maintainers = [ ];
|
|
||||||
platforms = platforms.linux ++ platforms.darwin;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,67 +0,0 @@
|
|||||||
final: prev:
|
|
||||||
{
|
|
||||||
# Set MPICH as default
|
|
||||||
mpi = final.mpich;
|
|
||||||
|
|
||||||
# Configure the network for MPICH
|
|
||||||
mpich = with final; let
|
|
||||||
# pmix comes with the libraries in .out and headers in .dev
|
|
||||||
pmixAll = symlinkJoin {
|
|
||||||
name = "pmix-all";
|
|
||||||
paths = [ pmix.dev pmix.out ];
|
|
||||||
};
|
|
||||||
in prev.mpich.overrideAttrs (old: {
|
|
||||||
buildInput = old.buildInputs ++ [
|
|
||||||
libfabric
|
|
||||||
pmixAll
|
|
||||||
];
|
|
||||||
configureFlags = [
|
|
||||||
"--enable-shared"
|
|
||||||
"--enable-sharedlib"
|
|
||||||
"--with-pm=no"
|
|
||||||
"--with-device=ch4:ofi"
|
|
||||||
"--with-pmi=pmix"
|
|
||||||
"--with-pmix=${pmixAll}"
|
|
||||||
"--with-libfabric=${libfabric}"
|
|
||||||
"--enable-g=log"
|
|
||||||
] ++ lib.optionals (lib.versionAtLeast gfortran.version "10") [
|
|
||||||
"FFLAGS=-fallow-argument-mismatch" # https://github.com/pmodels/mpich/issues/4300
|
|
||||||
"FCFLAGS=-fallow-argument-mismatch"
|
|
||||||
];
|
|
||||||
});
|
|
||||||
|
|
||||||
slurm = prev.slurm.overrideAttrs (old: {
|
|
||||||
patches = (old.patches or []) ++ [
|
|
||||||
# See https://bugs.schedmd.com/show_bug.cgi?id=19324
|
|
||||||
./slurm-rank-expansion.patch
|
|
||||||
];
|
|
||||||
# Install also the pam_slurm_adopt library to restrict users from accessing
|
|
||||||
# nodes with no job allocated.
|
|
||||||
postBuild = (old.postBuild or "") + ''
|
|
||||||
pushd contribs/pam_slurm_adopt
|
|
||||||
make "PAM_DIR=$out/lib/security"
|
|
||||||
popd
|
|
||||||
'';
|
|
||||||
postInstall = (old.postInstall or "") + ''
|
|
||||||
pushd contribs/pam_slurm_adopt
|
|
||||||
make "PAM_DIR=$out/lib/security" install
|
|
||||||
popd
|
|
||||||
'';
|
|
||||||
});
|
|
||||||
|
|
||||||
prometheus-slurm-exporter = prev.callPackage ./slurm-exporter.nix { };
|
|
||||||
meteocat-exporter = prev.callPackage ./meteocat-exporter/default.nix { };
|
|
||||||
upc-qaire-exporter = prev.callPackage ./upc-qaire-exporter/default.nix { };
|
|
||||||
cudainfo = prev.callPackage ./cudainfo/default.nix { };
|
|
||||||
|
|
||||||
amd-uprof = prev.callPackage ./amd-uprof/default.nix { };
|
|
||||||
|
|
||||||
# FIXME: Extend this to all linuxPackages variants. Open problem, see:
|
|
||||||
# https://discourse.nixos.org/t/whats-the-right-way-to-make-a-custom-kernel-module-available/4636
|
|
||||||
linuxPackages = prev.linuxPackages.extend (_final: _prev: {
|
|
||||||
amd-uprof-driver = _prev.callPackage ./amd-uprof/driver.nix { };
|
|
||||||
});
|
|
||||||
linuxPackages_latest = prev.linuxPackages_latest.extend(_final: _prev: {
|
|
||||||
amd-uprof-driver = _prev.callPackage ./amd-uprof/driver.nix { };
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@@ -1,80 +1,22 @@
|
|||||||
{ stdenv, lib, fetchFromGitHub, pkg-config, libtool, curl
|
{ slurm }:
|
||||||
, python, munge, perl, pam, openssl
|
|
||||||
, ncurses, libmysqlclient, gtk2, lua, hwloc, numactl
|
|
||||||
, readline, freeipmi, libssh2, xorg
|
|
||||||
, pmix
|
|
||||||
# enable internal X11 support via libssh2
|
|
||||||
, enableX11 ? true
|
|
||||||
}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
slurm.overrideAttrs (old: {
|
||||||
name = "slurm-${version}";
|
patches = (old.patches or []) ++ [
|
||||||
version = "17.11.9-2";
|
# See https://bugs.schedmd.com/show_bug.cgi?id=19324
|
||||||
|
# Still unmerged as of 2025-10-03, another corpo-cancer.
|
||||||
# N.B. We use github release tags instead of https://www.schedmd.com/downloads.php
|
./slurm-rank-expansion.patch
|
||||||
# because the latter does not keep older releases.
|
];
|
||||||
src = fetchFromGitHub {
|
# Install also the pam_slurm_adopt library to restrict users from accessing
|
||||||
owner = "SchedMD";
|
# nodes with no job allocated.
|
||||||
repo = "slurm";
|
# TODO: Review pam_slurm_adopt, I don't trust their code much.
|
||||||
# The release tags use - instead of .
|
postBuild = (old.postBuild or "") + ''
|
||||||
rev = "${builtins.replaceStrings ["."] ["-"] name}";
|
pushd contribs/pam_slurm_adopt
|
||||||
sha256 = "1lq4ac6yjai6wh979dciw8v3d99zbd3w36rfh0vpncqm672fg1qy";
|
make "PAM_DIR=$out/lib/security"
|
||||||
};
|
popd
|
||||||
|
|
||||||
outputs = [ "out" "dev" ];
|
|
||||||
|
|
||||||
prePatch = lib.optional enableX11 ''
|
|
||||||
substituteInPlace src/common/x11_util.c \
|
|
||||||
--replace '"/usr/bin/xauth"' '"${xorg.xauth}/bin/xauth"'
|
|
||||||
'';
|
'';
|
||||||
|
postInstall = (old.postInstall or "") + ''
|
||||||
# nixos test fails to start slurmd with 'undefined symbol: slurm_job_preempt_mode'
|
pushd contribs/pam_slurm_adopt
|
||||||
# https://groups.google.com/forum/#!topic/slurm-devel/QHOajQ84_Es
|
make "PAM_DIR=$out/lib/security" install
|
||||||
# this doesn't fix tests completely at least makes slurmd to launch
|
popd
|
||||||
hardeningDisable = [ "bindnow" ];
|
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config libtool ];
|
|
||||||
buildInputs = [
|
|
||||||
curl python munge perl pam openssl
|
|
||||||
libmysqlclient ncurses gtk2
|
|
||||||
lua hwloc numactl readline freeipmi
|
|
||||||
pmix
|
|
||||||
] ++ lib.optionals enableX11 [ libssh2 xorg.xauth ];
|
|
||||||
|
|
||||||
configureFlags = with lib;
|
|
||||||
[ "--with-munge=${munge}"
|
|
||||||
"--with-ssl=${openssl.dev}"
|
|
||||||
"--with-hwloc=${hwloc.dev}"
|
|
||||||
"--with-freeipmi=${freeipmi}"
|
|
||||||
"--sysconfdir=/etc/slurm"
|
|
||||||
"--with-pmix=${pmix}"
|
|
||||||
] ++ (optional (gtk2 == null) "--disable-gtktest")
|
|
||||||
++ (optional enableX11 "--with-libssh2=${libssh2.dev}");
|
|
||||||
|
|
||||||
|
|
||||||
preConfigure = ''
|
|
||||||
patchShebangs ./doc/html/shtml2html.py
|
|
||||||
patchShebangs ./doc/man/man2html.py
|
|
||||||
patchShebangs ./configure
|
|
||||||
'';
|
'';
|
||||||
|
})
|
||||||
# postBuild = ''
|
|
||||||
# pushd contrib/pmi2
|
|
||||||
# make -j install
|
|
||||||
# popd
|
|
||||||
# '';
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
rm -f $out/lib/*.la $out/lib/slurm/*.la
|
|
||||||
'';
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
homepage = http://www.schedmd.com/;
|
|
||||||
description = "Simple Linux Utility for Resource Management";
|
|
||||||
platforms = platforms.linux;
|
|
||||||
license = licenses.gpl2;
|
|
||||||
maintainers = with maintainers; [ jagajaga markuskowa ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user