Compare commits
1 Commits
master
...
remove-old
| Author | SHA1 | Date | |
|---|---|---|---|
| 3816c1bcb2 |
82
flake.lock
generated
82
flake.lock
generated
@ -1,5 +1,71 @@
|
||||
{
|
||||
"nodes": {
|
||||
"agenix": {
|
||||
"inputs": {
|
||||
"darwin": "darwin",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1750173260,
|
||||
"narHash": "sha256-9P1FziAwl5+3edkfFcr5HeGtQUtrSdk/MksX39GieoA=",
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"rev": "531beac616433bac6f9e2a19feb8e99a22a66baf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"agenix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1744478979,
|
||||
"narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "43975d782b418ebf4969e9ccba82466728c2851b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lnl7",
|
||||
"ref": "master",
|
||||
"repo": "nix-darwin",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"agenix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1745494811,
|
||||
"narHash": "sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "abfad3d2958c9e6300a883bd443512c55dfeb1be",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1752436162,
|
||||
@ -18,8 +84,24 @@
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"agenix": "agenix",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
||||
@ -1,13 +1,15 @@
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||
agenix.url = "github:ryantm/agenix";
|
||||
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, ... }:
|
||||
outputs = { self, nixpkgs, agenix, ... }:
|
||||
let
|
||||
mkConf = name: nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit nixpkgs; theFlake = self; };
|
||||
specialArgs = { inherit nixpkgs agenix; theFlake = self; };
|
||||
modules = [ "${self.outPath}/m/${name}/configuration.nix" ];
|
||||
};
|
||||
# For now we only support x86
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
{ pkgs, ... }:
|
||||
{ agenix, ... }:
|
||||
|
||||
{
|
||||
imports = [ ../../module/agenix.nix ];
|
||||
imports = [ agenix.nixosModules.default ];
|
||||
|
||||
# Add agenix to system packages
|
||||
environment.systemPackages = [ pkgs.agenix ];
|
||||
environment.systemPackages = [
|
||||
agenix.packages.x86_64-linux.default
|
||||
];
|
||||
}
|
||||
|
||||
@ -5,8 +5,8 @@
|
||||
vim wget git htop tmux pciutils tcpdump ripgrep nix-index nixos-option
|
||||
nix-diff ipmitool freeipmi ethtool lm_sensors cmake gnumake file tree
|
||||
ncdu config.boot.kernelPackages.perf ldns pv
|
||||
# From jungle overlay
|
||||
osumb nixgen
|
||||
# From bsckgs overlay
|
||||
osumb
|
||||
];
|
||||
|
||||
programs.direnv.enable = true;
|
||||
|
||||
@ -180,19 +180,6 @@
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFmMqKqPg4uocNOr3O41kLbZMOMJn3m2ZdN1JvTR96z3 bsccns@arnau-bsc"
|
||||
];
|
||||
};
|
||||
|
||||
aaguirre = {
|
||||
uid = 9655;
|
||||
isNormalUser = true;
|
||||
home = "/home/Computational/aaguirre";
|
||||
description = "Alejandro Aguirre";
|
||||
group = "Computational";
|
||||
hosts = [ "apex" "hut" ];
|
||||
hashedPassword = "$6$TXRXQT6jjBvxkxU6$E.sh5KspAm1qeG5Ct7OPHpo8REmbGDwjFGvqeGgTVz3GASGOAnPL7UMZsMAsAKBoahOw.v8LNno6XGrTEPzZH1";
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOlRX7ZCnqtUJYCxKgWmgSrFCYuA2LHY96rVwqxXPl86 aaguirre@BSC-8488184117"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
groups = {
|
||||
|
||||
@ -93,4 +93,20 @@
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig.ExecStart = script;
|
||||
};
|
||||
|
||||
# Only allow SSH connections from users who have a SLURM allocation
|
||||
# See: https://slurm.schedmd.com/pam_slurm_adopt.html
|
||||
security.pam.services.sshd.rules.account.slurm = {
|
||||
control = "required";
|
||||
enable = true;
|
||||
modulePath = "${pkgs.slurm}/lib/security/pam_slurm_adopt.so";
|
||||
args = [ "log_level=debug5" ];
|
||||
order = 999999; # Make it last one
|
||||
};
|
||||
|
||||
# Disable systemd session (pam_systemd.so) as it will conflict with the
|
||||
# pam_slurm_adopt.so module. What happens is that the shell is first adopted
|
||||
# into the slurmstepd task and then into the systemd session, which is not
|
||||
# what we want, otherwise it will linger even if all jobs are gone.
|
||||
security.pam.services.sshd.startSession = lib.mkForce false;
|
||||
}
|
||||
|
||||
@ -17,7 +17,6 @@
|
||||
./postgresql.nix
|
||||
./nginx.nix
|
||||
./p.nix
|
||||
./ompss2-timer.nix
|
||||
#./pxe.nix
|
||||
];
|
||||
|
||||
|
||||
@ -29,9 +29,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
# Allow gitea user to send mail
|
||||
users.users.gitea.extraGroups = [ "mail-robot" ];
|
||||
|
||||
services.gitea-actions-runner.instances = {
|
||||
runrun = {
|
||||
enable = true;
|
||||
|
||||
@ -1,11 +1,8 @@
|
||||
{ config, lib, ... }:
|
||||
{
|
||||
# Robot user that can see the password to send mail from jungle-robot
|
||||
users.groups.mail-robot = {};
|
||||
|
||||
age.secrets.jungleRobotPassword = {
|
||||
file = ../../secrets/jungle-robot-password.age;
|
||||
group = "mail-robot";
|
||||
group = "gitea";
|
||||
mode = "440";
|
||||
};
|
||||
|
||||
|
||||
@ -4,8 +4,8 @@ let
|
||||
name = "jungle-web";
|
||||
src = pkgs.fetchgit {
|
||||
url = "https://jungle.bsc.es/git/rarias/jungle-website.git";
|
||||
rev = "52abaf4d71652a9ef77a0b098db14ca33bffff4c";
|
||||
hash = "sha256-/ul9GazbOrOkmlvSgDz/+2W+V+ir5725Y7mVLc3rb0M=";
|
||||
rev = "739bf0175a7f05380fe7ad7023ff1d60db1710e1";
|
||||
hash = "sha256-ea5DzhYTzZ9TmqD+x95rdNdLbxPnBluqlYH2NmBYmc4=";
|
||||
};
|
||||
buildInputs = [ pkgs.hugo ];
|
||||
buildPhase = ''
|
||||
|
||||
@ -1,85 +0,0 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
systemd.timers = {
|
||||
"ompss2-closing" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
Unit = "ompss2-closing.service";
|
||||
OnCalendar = [ "*-03-15 07:00:00" "*-09-15 07:00:00"];
|
||||
};
|
||||
};
|
||||
"ompss2-freeze" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
Unit = "ompss2-freeze.service";
|
||||
OnCalendar = [ "*-04-15 07:00:00" "*-10-15 07:00:00" ];
|
||||
};
|
||||
};
|
||||
"ompss2-release" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
Unit = "ompss2-release.service";
|
||||
OnCalendar = [ "*-05-15 07:00:00" "*-11-15 07:00:00" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services =
|
||||
let
|
||||
closing = pkgs.writeText "closing.txt"
|
||||
''
|
||||
Subject: OmpSs-2 release enters closing period
|
||||
|
||||
Hi,
|
||||
|
||||
You have one month to merge the remaining features for the next OmpSs-2
|
||||
release. Please, identify what needs to be merged and discuss it in the next
|
||||
OmpSs-2 meeting.
|
||||
|
||||
Thanks!,
|
||||
Jungle robot
|
||||
'';
|
||||
freeze = pkgs.writeText "freeze.txt"
|
||||
''
|
||||
Subject: OmpSs-2 release enters freeze period
|
||||
|
||||
Hi,
|
||||
|
||||
The period to introduce new features or breaking changes is over, only bug
|
||||
fixes are allowed now. During this time, please prepare the release notes
|
||||
to be included in the next OmpSs-2 release.
|
||||
|
||||
Thanks!,
|
||||
Jungle robot
|
||||
'';
|
||||
release = pkgs.writeText "release.txt"
|
||||
''
|
||||
Subject: OmpSs-2 release now
|
||||
|
||||
Hi,
|
||||
|
||||
The period to introduce bug fixes is now over. Please, proceed to do the
|
||||
OmpSs-2 release.
|
||||
|
||||
Thanks!,
|
||||
Jungle robot
|
||||
'';
|
||||
mkServ = name: mail: {
|
||||
"ompss2-${name}" = {
|
||||
script = ''
|
||||
set -eu
|
||||
set -o pipefail
|
||||
cat ${mail} | ${config.security.wrapperDir}/sendmail star@bsc.es
|
||||
'';
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
DynamicUser = true;
|
||||
Group = "mail-robot";
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
(mkServ "closing" closing) //
|
||||
(mkServ "freeze" freeze) //
|
||||
(mkServ "release" release);
|
||||
}
|
||||
@ -1,357 +0,0 @@
|
||||
{
|
||||
config,
|
||||
options,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.age;
|
||||
|
||||
isDarwin = lib.attrsets.hasAttrByPath [ "environment" "darwinConfig" ] options;
|
||||
|
||||
ageBin = config.age.ageBin;
|
||||
|
||||
users = config.users.users;
|
||||
|
||||
sysusersEnabled =
|
||||
if isDarwin then
|
||||
false
|
||||
else
|
||||
options.systemd ? sysusers && (config.systemd.sysusers.enable || config.services.userborn.enable);
|
||||
|
||||
mountCommand =
|
||||
if isDarwin then
|
||||
''
|
||||
if ! diskutil info "${cfg.secretsMountPoint}" &> /dev/null; then
|
||||
num_sectors=1048576
|
||||
dev=$(hdiutil attach -nomount ram://"$num_sectors" | sed 's/[[:space:]]*$//')
|
||||
newfs_hfs -v agenix "$dev"
|
||||
mount -t hfs -o nobrowse,nodev,nosuid,-m=0751 "$dev" "${cfg.secretsMountPoint}"
|
||||
fi
|
||||
''
|
||||
else
|
||||
''
|
||||
grep -q "${cfg.secretsMountPoint} ramfs" /proc/mounts ||
|
||||
mount -t ramfs none "${cfg.secretsMountPoint}" -o nodev,nosuid,mode=0751
|
||||
'';
|
||||
newGeneration = ''
|
||||
_agenix_generation="$(basename "$(readlink ${cfg.secretsDir})" || echo 0)"
|
||||
(( ++_agenix_generation ))
|
||||
echo "[agenix] creating new generation in ${cfg.secretsMountPoint}/$_agenix_generation"
|
||||
mkdir -p "${cfg.secretsMountPoint}"
|
||||
chmod 0751 "${cfg.secretsMountPoint}"
|
||||
${mountCommand}
|
||||
mkdir -p "${cfg.secretsMountPoint}/$_agenix_generation"
|
||||
chmod 0751 "${cfg.secretsMountPoint}/$_agenix_generation"
|
||||
'';
|
||||
|
||||
chownGroup = if isDarwin then "admin" else "keys";
|
||||
# chown the secrets mountpoint and the current generation to the keys group
|
||||
# instead of leaving it root:root.
|
||||
chownMountPoint = ''
|
||||
chown :${chownGroup} "${cfg.secretsMountPoint}" "${cfg.secretsMountPoint}/$_agenix_generation"
|
||||
'';
|
||||
|
||||
setTruePath = secretType: ''
|
||||
${
|
||||
if secretType.symlink then
|
||||
''
|
||||
_truePath="${cfg.secretsMountPoint}/$_agenix_generation/${secretType.name}"
|
||||
''
|
||||
else
|
||||
''
|
||||
_truePath="${secretType.path}"
|
||||
''
|
||||
}
|
||||
'';
|
||||
|
||||
installSecret = secretType: ''
|
||||
${setTruePath secretType}
|
||||
echo "decrypting '${secretType.file}' to '$_truePath'..."
|
||||
TMP_FILE="$_truePath.tmp"
|
||||
|
||||
IDENTITIES=()
|
||||
for identity in ${toString cfg.identityPaths}; do
|
||||
test -r "$identity" || continue
|
||||
test -s "$identity" || continue
|
||||
IDENTITIES+=(-i)
|
||||
IDENTITIES+=("$identity")
|
||||
done
|
||||
|
||||
test "''${#IDENTITIES[@]}" -eq 0 && echo "[agenix] WARNING: no readable identities found!"
|
||||
|
||||
mkdir -p "$(dirname "$_truePath")"
|
||||
[ "${secretType.path}" != "${cfg.secretsDir}/${secretType.name}" ] && mkdir -p "$(dirname "${secretType.path}")"
|
||||
(
|
||||
umask u=r,g=,o=
|
||||
test -f "${secretType.file}" || echo '[agenix] WARNING: encrypted file ${secretType.file} does not exist!'
|
||||
test -d "$(dirname "$TMP_FILE")" || echo "[agenix] WARNING: $(dirname "$TMP_FILE") does not exist!"
|
||||
LANG=${
|
||||
config.i18n.defaultLocale or "C"
|
||||
} ${ageBin} --decrypt "''${IDENTITIES[@]}" -o "$TMP_FILE" "${secretType.file}"
|
||||
)
|
||||
chmod ${secretType.mode} "$TMP_FILE"
|
||||
mv -f "$TMP_FILE" "$_truePath"
|
||||
|
||||
${optionalString secretType.symlink ''
|
||||
[ "${secretType.path}" != "${cfg.secretsDir}/${secretType.name}" ] && ln -sfT "${cfg.secretsDir}/${secretType.name}" "${secretType.path}"
|
||||
''}
|
||||
'';
|
||||
|
||||
testIdentities = map (path: ''
|
||||
test -f ${path} || echo '[agenix] WARNING: config.age.identityPaths entry ${path} not present!'
|
||||
'') cfg.identityPaths;
|
||||
|
||||
cleanupAndLink = ''
|
||||
_agenix_generation="$(basename "$(readlink ${cfg.secretsDir})" || echo 0)"
|
||||
(( ++_agenix_generation ))
|
||||
echo "[agenix] symlinking new secrets to ${cfg.secretsDir} (generation $_agenix_generation)..."
|
||||
ln -sfT "${cfg.secretsMountPoint}/$_agenix_generation" ${cfg.secretsDir}
|
||||
|
||||
(( _agenix_generation > 1 )) && {
|
||||
echo "[agenix] removing old secrets (generation $(( _agenix_generation - 1 )))..."
|
||||
rm -rf "${cfg.secretsMountPoint}/$(( _agenix_generation - 1 ))"
|
||||
}
|
||||
'';
|
||||
|
||||
installSecrets = builtins.concatStringsSep "\n" (
|
||||
[ "echo '[agenix] decrypting secrets...'" ]
|
||||
++ testIdentities
|
||||
++ (map installSecret (builtins.attrValues cfg.secrets))
|
||||
++ [ cleanupAndLink ]
|
||||
);
|
||||
|
||||
chownSecret = secretType: ''
|
||||
${setTruePath secretType}
|
||||
chown ${secretType.owner}:${secretType.group} "$_truePath"
|
||||
'';
|
||||
|
||||
chownSecrets = builtins.concatStringsSep "\n" (
|
||||
[ "echo '[agenix] chowning...'" ]
|
||||
++ [ chownMountPoint ]
|
||||
++ (map chownSecret (builtins.attrValues cfg.secrets))
|
||||
);
|
||||
|
||||
secretType = types.submodule (
|
||||
{ config, ... }:
|
||||
{
|
||||
options = {
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
default = config._module.args.name;
|
||||
defaultText = literalExpression "config._module.args.name";
|
||||
description = ''
|
||||
Name of the file used in {option}`age.secretsDir`
|
||||
'';
|
||||
};
|
||||
file = mkOption {
|
||||
type = types.path;
|
||||
description = ''
|
||||
Age file the secret is loaded from.
|
||||
'';
|
||||
};
|
||||
path = mkOption {
|
||||
type = types.str;
|
||||
default = "${cfg.secretsDir}/${config.name}";
|
||||
defaultText = literalExpression ''
|
||||
"''${cfg.secretsDir}/''${config.name}"
|
||||
'';
|
||||
description = ''
|
||||
Path where the decrypted secret is installed.
|
||||
'';
|
||||
};
|
||||
mode = mkOption {
|
||||
type = types.str;
|
||||
default = "0400";
|
||||
description = ''
|
||||
Permissions mode of the decrypted secret in a format understood by chmod.
|
||||
'';
|
||||
};
|
||||
owner = mkOption {
|
||||
type = types.str;
|
||||
default = "0";
|
||||
description = ''
|
||||
User of the decrypted secret.
|
||||
'';
|
||||
};
|
||||
group = mkOption {
|
||||
type = types.str;
|
||||
default = users.${config.owner}.group or "0";
|
||||
defaultText = literalExpression ''
|
||||
users.''${config.owner}.group or "0"
|
||||
'';
|
||||
description = ''
|
||||
Group of the decrypted secret.
|
||||
'';
|
||||
};
|
||||
symlink = mkEnableOption "symlinking secrets to their destination" // {
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
(mkRenamedOptionModule [ "age" "sshKeyPaths" ] [ "age" "identityPaths" ])
|
||||
];
|
||||
|
||||
options.age = {
|
||||
ageBin = mkOption {
|
||||
type = types.str;
|
||||
default = "${pkgs.age}/bin/age";
|
||||
defaultText = literalExpression ''
|
||||
"''${pkgs.age}/bin/age"
|
||||
'';
|
||||
description = ''
|
||||
The age executable to use.
|
||||
'';
|
||||
};
|
||||
secrets = mkOption {
|
||||
type = types.attrsOf secretType;
|
||||
default = { };
|
||||
description = ''
|
||||
Attrset of secrets.
|
||||
'';
|
||||
};
|
||||
secretsDir = mkOption {
|
||||
type = types.path;
|
||||
default = "/run/agenix";
|
||||
description = ''
|
||||
Folder where secrets are symlinked to
|
||||
'';
|
||||
};
|
||||
secretsMountPoint = mkOption {
|
||||
type =
|
||||
types.addCheck types.str (
|
||||
s:
|
||||
(builtins.match "[ \t\n]*" s) == null # non-empty
|
||||
&& (builtins.match ".+/" s) == null
|
||||
) # without trailing slash
|
||||
// {
|
||||
description = "${types.str.description} (with check: non-empty without trailing slash)";
|
||||
};
|
||||
default = "/run/agenix.d";
|
||||
description = ''
|
||||
Where secrets are created before they are symlinked to {option}`age.secretsDir`
|
||||
'';
|
||||
};
|
||||
identityPaths = mkOption {
|
||||
type = types.listOf types.path;
|
||||
default =
|
||||
if isDarwin then
|
||||
[
|
||||
"/etc/ssh/ssh_host_ed25519_key"
|
||||
"/etc/ssh/ssh_host_rsa_key"
|
||||
]
|
||||
else if (config.services.openssh.enable or false) then
|
||||
map (e: e.path) (
|
||||
lib.filter (e: e.type == "rsa" || e.type == "ed25519") config.services.openssh.hostKeys
|
||||
)
|
||||
else
|
||||
[ ];
|
||||
defaultText = literalExpression ''
|
||||
if isDarwin
|
||||
then [
|
||||
"/etc/ssh/ssh_host_ed25519_key"
|
||||
"/etc/ssh/ssh_host_rsa_key"
|
||||
]
|
||||
else if (config.services.openssh.enable or false)
|
||||
then map (e: e.path) (lib.filter (e: e.type == "rsa" || e.type == "ed25519") config.services.openssh.hostKeys)
|
||||
else [];
|
||||
'';
|
||||
description = ''
|
||||
Path to SSH keys to be used as identities in age decryption.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.secrets != { }) (mkMerge [
|
||||
{
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.identityPaths != [ ];
|
||||
message = "age.identityPaths must be set, for example by enabling openssh.";
|
||||
}
|
||||
];
|
||||
}
|
||||
(optionalAttrs (!isDarwin) {
|
||||
# When using sysusers we no longer be started as an activation script
|
||||
# because those are started in initrd while sysusers is started later.
|
||||
systemd.services.agenix-install-secrets = mkIf sysusersEnabled {
|
||||
wantedBy = [ "sysinit.target" ];
|
||||
after = [ "systemd-sysusers.service" ];
|
||||
unitConfig.DefaultDependencies = "no";
|
||||
|
||||
path = [ pkgs.mount ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = pkgs.writeShellScript "agenix-install" (concatLines [
|
||||
newGeneration
|
||||
installSecrets
|
||||
chownSecrets
|
||||
]);
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Create a new directory full of secrets for symlinking (this helps
|
||||
# ensure removed secrets are actually removed, or at least become
|
||||
# invalid symlinks).
|
||||
system.activationScripts = mkIf (!sysusersEnabled) {
|
||||
agenixNewGeneration = {
|
||||
text = newGeneration;
|
||||
deps = [
|
||||
"specialfs"
|
||||
];
|
||||
};
|
||||
|
||||
agenixInstall = {
|
||||
text = installSecrets;
|
||||
deps = [
|
||||
"agenixNewGeneration"
|
||||
"specialfs"
|
||||
];
|
||||
};
|
||||
|
||||
# So user passwords can be encrypted.
|
||||
users.deps = [ "agenixInstall" ];
|
||||
|
||||
# Change ownership and group after users and groups are made.
|
||||
agenixChown = {
|
||||
text = chownSecrets;
|
||||
deps = [
|
||||
"users"
|
||||
"groups"
|
||||
];
|
||||
};
|
||||
|
||||
# So other activation scripts can depend on agenix being done.
|
||||
agenix = {
|
||||
text = "";
|
||||
deps = [ "agenixChown" ];
|
||||
};
|
||||
};
|
||||
})
|
||||
|
||||
(optionalAttrs isDarwin {
|
||||
launchd.daemons.activate-agenix = {
|
||||
script = ''
|
||||
set -e
|
||||
set -o pipefail
|
||||
export PATH="${pkgs.gnugrep}/bin:${pkgs.coreutils}/bin:@out@/sw/bin:/usr/bin:/bin:/usr/sbin:/sbin"
|
||||
${newGeneration}
|
||||
${installSecrets}
|
||||
${chownSecrets}
|
||||
exit 0
|
||||
'';
|
||||
serviceConfig = {
|
||||
RunAtLoad = true;
|
||||
KeepAlive.SuccessfulExit = false;
|
||||
};
|
||||
};
|
||||
})
|
||||
]);
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
{ lib, pkgs, ... }:
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
@ -21,20 +21,4 @@
|
||||
};
|
||||
|
||||
services.slurm.client.enable = true;
|
||||
|
||||
# Only allow SSH connections from users who have a SLURM allocation
|
||||
# See: https://slurm.schedmd.com/pam_slurm_adopt.html
|
||||
security.pam.services.sshd.rules.account.slurm = {
|
||||
control = "required";
|
||||
enable = true;
|
||||
modulePath = "${pkgs.slurm}/lib/security/pam_slurm_adopt.so";
|
||||
args = [ "log_level=debug5" ];
|
||||
order = 999999; # Make it last one
|
||||
};
|
||||
|
||||
# Disable systemd session (pam_systemd.so) as it will conflict with the
|
||||
# pam_slurm_adopt.so module. What happens is that the shell is first adopted
|
||||
# into the slurmstepd task and then into the systemd session, which is not
|
||||
# what we want, otherwise it will linger even if all jobs are gone.
|
||||
security.pam.services.sshd.startSession = lib.mkForce false;
|
||||
}
|
||||
|
||||
@ -1,6 +1,31 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
let
|
||||
suspendProgram = pkgs.writeShellScript "suspend.sh" ''
|
||||
exec 1>>/var/log/power_save.log 2>>/var/log/power_save.log
|
||||
set -x
|
||||
export "PATH=/run/current-system/sw/bin:$PATH"
|
||||
echo "$(date) Suspend invoked $0 $*" >> /var/log/power_save.log
|
||||
hosts=$(scontrol show hostnames $1)
|
||||
for host in $hosts; do
|
||||
echo Shutting down host: $host
|
||||
ipmitool -I lanplus -H ''${host}-ipmi -P "" -U "" chassis power off
|
||||
done
|
||||
'';
|
||||
|
||||
resumeProgram = pkgs.writeShellScript "resume.sh" ''
|
||||
exec 1>>/var/log/power_save.log 2>>/var/log/power_save.log
|
||||
set -x
|
||||
export "PATH=/run/current-system/sw/bin:$PATH"
|
||||
echo "$(date) Suspend invoked $0 $*" >> /var/log/power_save.log
|
||||
hosts=$(scontrol show hostnames $1)
|
||||
for host in $hosts; do
|
||||
echo Starting host: $host
|
||||
ipmitool -I lanplus -H ''${host}-ipmi -P "" -U "" chassis power on
|
||||
done
|
||||
'';
|
||||
|
||||
in {
|
||||
services.slurm = {
|
||||
controlMachine = "apex";
|
||||
clusterName = "jungle";
|
||||
@ -34,6 +59,16 @@
|
||||
# the resources. Use the task/cgroup plugin to enable process containment.
|
||||
TaskPlugin=task/affinity,task/cgroup
|
||||
|
||||
# Power off unused nodes until they are requested
|
||||
SuspendProgram=${suspendProgram}
|
||||
SuspendTimeout=60
|
||||
ResumeProgram=${resumeProgram}
|
||||
ResumeTimeout=300
|
||||
SuspendExcNodes=fox
|
||||
|
||||
# Turn the nodes off after 1 hour of inactivity
|
||||
SuspendTime=3600
|
||||
|
||||
# Reduce port range so we can allow only this range in the firewall
|
||||
SrunPortRange=60000-61000
|
||||
|
||||
@ -51,7 +86,9 @@
|
||||
# when a task runs (srun) so we can ssh early.
|
||||
PrologFlags=Alloc,Contain,X11
|
||||
|
||||
LaunchParameters=use_interactive_step
|
||||
# LaunchParameters=ulimit_pam_adopt will set RLIMIT_RSS in processes
|
||||
# adopted by the external step, similar to tasks running in regular steps
|
||||
# LaunchParameters=ulimit_pam_adopt
|
||||
SlurmdDebug=debug5
|
||||
#DebugFlags=Protocol,Cgroup
|
||||
'';
|
||||
|
||||
@ -4,8 +4,8 @@ let
|
||||
name = "jungle-web";
|
||||
src = pkgs.fetchgit {
|
||||
url = "https://jungle.bsc.es/git/rarias/jungle-website.git";
|
||||
rev = "52abaf4d71652a9ef77a0b098db14ca33bffff4c";
|
||||
hash = "sha256-/ul9GazbOrOkmlvSgDz/+2W+V+ir5725Y7mVLc3rb0M=";
|
||||
rev = "739bf0175a7f05380fe7ad7023ff1d60db1710e1";
|
||||
hash = "sha256-ea5DzhYTzZ9TmqD+x95rdNdLbxPnBluqlYH2NmBYmc4=";
|
||||
};
|
||||
buildInputs = [ pkgs.hugo ];
|
||||
buildPhase = ''
|
||||
|
||||
17
overlay.nix
17
overlay.nix
@ -7,7 +7,6 @@ let
|
||||
callPackage = final.callPackage;
|
||||
|
||||
bscPkgs = {
|
||||
agenix = prev.callPackage ./pkgs/agenix/default.nix { };
|
||||
amd-uprof = prev.callPackage ./pkgs/amd-uprof/default.nix { };
|
||||
bench6 = callPackage ./pkgs/bench6/default.nix { };
|
||||
bigotes = callPackage ./pkgs/bigotes/default.nix { };
|
||||
@ -37,7 +36,6 @@ let
|
||||
nanos6 = callPackage ./pkgs/nanos6/default.nix { };
|
||||
nanos6Debug = final.nanos6.override { enableDebug = true; };
|
||||
nixtools = callPackage ./pkgs/nixtools/default.nix { };
|
||||
nixgen = callPackage ./pkgs/nixgen/default.nix { };
|
||||
# Broken because of pkgsStatic.libcap
|
||||
# See: https://github.com/NixOS/nixpkgs/pull/268791
|
||||
#nix-wrap = callPackage ./pkgs/nix-wrap/default.nix { };
|
||||
@ -52,7 +50,6 @@ let
|
||||
prometheus-slurm-exporter = prev.callPackage ./pkgs/slurm-exporter/default.nix { };
|
||||
#pscom = callPackage ./pkgs/parastation/pscom.nix { }; # Unmaintaned
|
||||
#psmpi = callPackage ./pkgs/parastation/psmpi.nix { }; # Unmaintaned
|
||||
slurm = import ./pkgs/slurm/default.nix { slurm = prev.slurm; };
|
||||
sonar = callPackage ./pkgs/sonar/default.nix { };
|
||||
stdenvClangOmpss2 = final.stdenv.override { cc = final.clangOmpss2; allowedRequisites = null; };
|
||||
stdenvClangOmpss2Nanos6 = final.stdenv.override { cc = final.clangOmpss2Nanos6; allowedRequisites = null; };
|
||||
@ -101,16 +98,14 @@ let
|
||||
pkgsTopLevel = filterAttrs (_: isDerivation) bscPkgs;
|
||||
|
||||
# Native build in that platform doesn't imply cross build works
|
||||
canCrossCompile = platform: default: pkg:
|
||||
canCrossCompile = platform: pkg:
|
||||
(isDerivation pkg) &&
|
||||
# If meta.cross is undefined, use default
|
||||
(pkg.meta.cross or default) &&
|
||||
(meta.availableOn final.pkgsCross.${platform}.stdenv.hostPlatform pkg);
|
||||
# Must be defined explicitly
|
||||
(pkg.meta.cross or false) &&
|
||||
(meta.availableOn platform pkg);
|
||||
|
||||
# For now only RISC-V
|
||||
crossSet = genAttrs [ "riscv64" ] (platform:
|
||||
filterAttrs (_: canCrossCompile platform true)
|
||||
final.pkgsCross.${platform}.bsc.pkgsTopLevel);
|
||||
crossSet = { riscv64 = final.pkgsCross.riscv64.bsc.pkgsTopLevel; };
|
||||
|
||||
buildList = name: paths:
|
||||
final.runCommandLocal name { } ''
|
||||
@ -130,7 +125,7 @@ let
|
||||
# For now only RISC-V
|
||||
crossList = buildList "ci-cross"
|
||||
(filter
|
||||
(canCrossCompile "riscv64" false) # opt-in (pkgs with: meta.cross = true)
|
||||
(canCrossCompile final.pkgsCross.riscv64.stdenv.hostPlatform)
|
||||
(builtins.attrValues crossSet.riscv64));
|
||||
|
||||
in bscPkgs // {
|
||||
|
||||
@ -1,212 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -Eeuo pipefail
|
||||
|
||||
PACKAGE="agenix"
|
||||
|
||||
function show_help () {
|
||||
echo "$PACKAGE - edit and rekey age secret files"
|
||||
echo " "
|
||||
echo "$PACKAGE -e FILE [-i PRIVATE_KEY]"
|
||||
echo "$PACKAGE -r [-i PRIVATE_KEY]"
|
||||
echo ' '
|
||||
echo 'options:'
|
||||
echo '-h, --help show help'
|
||||
# shellcheck disable=SC2016
|
||||
echo '-e, --edit FILE edits FILE using $EDITOR'
|
||||
echo '-r, --rekey re-encrypts all secrets with specified recipients'
|
||||
echo '-d, --decrypt FILE decrypts FILE to STDOUT'
|
||||
echo '-i, --identity identity to use when decrypting'
|
||||
echo '-v, --verbose verbose output'
|
||||
echo ' '
|
||||
echo 'FILE an age-encrypted file'
|
||||
echo ' '
|
||||
echo 'PRIVATE_KEY a path to a private SSH key used to decrypt file'
|
||||
echo ' '
|
||||
echo 'EDITOR environment variable of editor to use when editing FILE'
|
||||
echo ' '
|
||||
echo 'If STDIN is not interactive, EDITOR will be set to "cp /dev/stdin"'
|
||||
echo ' '
|
||||
echo 'RULES environment variable with path to Nix file specifying recipient public keys.'
|
||||
echo "Defaults to './secrets.nix'"
|
||||
echo ' '
|
||||
echo "agenix version: @version@"
|
||||
echo "age binary path: @ageBin@"
|
||||
echo "age version: $(@ageBin@ --version)"
|
||||
}
|
||||
|
||||
function warn() {
|
||||
printf '%s\n' "$*" >&2
|
||||
}
|
||||
|
||||
function err() {
|
||||
warn "$*"
|
||||
exit 1
|
||||
}
|
||||
|
||||
test $# -eq 0 && (show_help && exit 1)
|
||||
|
||||
REKEY=0
|
||||
DECRYPT_ONLY=0
|
||||
DEFAULT_DECRYPT=(--decrypt)
|
||||
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
-h|--help)
|
||||
show_help
|
||||
exit 0
|
||||
;;
|
||||
-e|--edit)
|
||||
shift
|
||||
if test $# -gt 0; then
|
||||
export FILE=$1
|
||||
else
|
||||
echo "no FILE specified"
|
||||
exit 1
|
||||
fi
|
||||
shift
|
||||
;;
|
||||
-i|--identity)
|
||||
shift
|
||||
if test $# -gt 0; then
|
||||
DEFAULT_DECRYPT+=(--identity "$1")
|
||||
else
|
||||
echo "no PRIVATE_KEY specified"
|
||||
exit 1
|
||||
fi
|
||||
shift
|
||||
;;
|
||||
-r|--rekey)
|
||||
shift
|
||||
REKEY=1
|
||||
;;
|
||||
-d|--decrypt)
|
||||
shift
|
||||
DECRYPT_ONLY=1
|
||||
if test $# -gt 0; then
|
||||
export FILE=$1
|
||||
else
|
||||
echo "no FILE specified"
|
||||
exit 1
|
||||
fi
|
||||
shift
|
||||
;;
|
||||
-v|--verbose)
|
||||
shift
|
||||
set -x
|
||||
;;
|
||||
*)
|
||||
show_help
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
RULES=${RULES:-./secrets.nix}
|
||||
function cleanup {
|
||||
if [ -n "${CLEARTEXT_DIR+x}" ]
|
||||
then
|
||||
rm -rf -- "$CLEARTEXT_DIR"
|
||||
fi
|
||||
if [ -n "${REENCRYPTED_DIR+x}" ]
|
||||
then
|
||||
rm -rf -- "$REENCRYPTED_DIR"
|
||||
fi
|
||||
}
|
||||
trap "cleanup" 0 2 3 15
|
||||
|
||||
function keys {
|
||||
(@nixInstantiate@ --json --eval --strict -E "(let rules = import $RULES; in rules.\"$1\".publicKeys)" | @jqBin@ -r .[]) || exit 1
|
||||
}
|
||||
|
||||
function armor {
|
||||
(@nixInstantiate@ --json --eval --strict -E "(let rules = import $RULES; in (builtins.hasAttr \"armor\" rules.\"$1\" && rules.\"$1\".armor))") || exit 1
|
||||
}
|
||||
|
||||
function decrypt {
|
||||
FILE=$1
|
||||
KEYS=$2
|
||||
if [ -z "$KEYS" ]
|
||||
then
|
||||
err "There is no rule for $FILE in $RULES."
|
||||
fi
|
||||
|
||||
if [ -f "$FILE" ]
|
||||
then
|
||||
DECRYPT=("${DEFAULT_DECRYPT[@]}")
|
||||
if [[ "${DECRYPT[*]}" != *"--identity"* ]]; then
|
||||
if [ -f "$HOME/.ssh/id_rsa" ]; then
|
||||
DECRYPT+=(--identity "$HOME/.ssh/id_rsa")
|
||||
fi
|
||||
if [ -f "$HOME/.ssh/id_ed25519" ]; then
|
||||
DECRYPT+=(--identity "$HOME/.ssh/id_ed25519")
|
||||
fi
|
||||
fi
|
||||
if [[ "${DECRYPT[*]}" != *"--identity"* ]]; then
|
||||
err "No identity found to decrypt $FILE. Try adding an SSH key at $HOME/.ssh/id_rsa or $HOME/.ssh/id_ed25519 or using the --identity flag to specify a file."
|
||||
fi
|
||||
|
||||
@ageBin@ "${DECRYPT[@]}" -- "$FILE" || exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
function edit {
|
||||
FILE=$1
|
||||
KEYS=$(keys "$FILE") || exit 1
|
||||
ARMOR=$(armor "$FILE") || exit 1
|
||||
|
||||
CLEARTEXT_DIR=$(@mktempBin@ -d)
|
||||
CLEARTEXT_FILE="$CLEARTEXT_DIR/$(basename -- "$FILE")"
|
||||
DEFAULT_DECRYPT+=(-o "$CLEARTEXT_FILE")
|
||||
|
||||
decrypt "$FILE" "$KEYS" || exit 1
|
||||
|
||||
[ ! -f "$CLEARTEXT_FILE" ] || cp -- "$CLEARTEXT_FILE" "$CLEARTEXT_FILE.before"
|
||||
|
||||
[ -t 0 ] || EDITOR='cp -- /dev/stdin'
|
||||
|
||||
$EDITOR "$CLEARTEXT_FILE"
|
||||
|
||||
if [ ! -f "$CLEARTEXT_FILE" ]
|
||||
then
|
||||
warn "$FILE wasn't created."
|
||||
return
|
||||
fi
|
||||
[ -f "$FILE" ] && [ "$EDITOR" != ":" ] && @diffBin@ -q -- "$CLEARTEXT_FILE.before" "$CLEARTEXT_FILE" && warn "$FILE wasn't changed, skipping re-encryption." && return
|
||||
|
||||
ENCRYPT=()
|
||||
if [[ "$ARMOR" == "true" ]]; then
|
||||
ENCRYPT+=(--armor)
|
||||
fi
|
||||
while IFS= read -r key
|
||||
do
|
||||
if [ -n "$key" ]; then
|
||||
ENCRYPT+=(--recipient "$key")
|
||||
fi
|
||||
done <<< "$KEYS"
|
||||
|
||||
REENCRYPTED_DIR=$(@mktempBin@ -d)
|
||||
REENCRYPTED_FILE="$REENCRYPTED_DIR/$(basename -- "$FILE")"
|
||||
|
||||
ENCRYPT+=(-o "$REENCRYPTED_FILE")
|
||||
|
||||
@ageBin@ "${ENCRYPT[@]}" <"$CLEARTEXT_FILE" || exit 1
|
||||
|
||||
mkdir -p -- "$(dirname -- "$FILE")"
|
||||
|
||||
mv -f -- "$REENCRYPTED_FILE" "$FILE"
|
||||
}
|
||||
|
||||
function rekey {
|
||||
FILES=$( (@nixInstantiate@ --json --eval -E "(let rules = import $RULES; in builtins.attrNames rules)" | @jqBin@ -r .[]) || exit 1)
|
||||
|
||||
for FILE in $FILES
|
||||
do
|
||||
warn "rekeying $FILE..."
|
||||
EDITOR=: edit "$FILE"
|
||||
cleanup
|
||||
done
|
||||
}
|
||||
|
||||
[ $REKEY -eq 1 ] && rekey && exit 0
|
||||
[ $DECRYPT_ONLY -eq 1 ] && DEFAULT_DECRYPT+=("-o" "-") && decrypt "${FILE}" "$(keys "$FILE")" && exit 0
|
||||
edit "$FILE" && cleanup && exit 0
|
||||
@ -1,66 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
age,
|
||||
jq,
|
||||
nix,
|
||||
mktemp,
|
||||
diffutils,
|
||||
replaceVars,
|
||||
ageBin ? "${age}/bin/age",
|
||||
shellcheck,
|
||||
}:
|
||||
let
|
||||
bin = "${placeholder "out"}/bin/agenix";
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "agenix";
|
||||
version = "0.15.0";
|
||||
src = replaceVars ./agenix.sh {
|
||||
inherit ageBin version;
|
||||
jqBin = "${jq}/bin/jq";
|
||||
nixInstantiate = "${nix}/bin/nix-instantiate";
|
||||
mktempBin = "${mktemp}/bin/mktemp";
|
||||
diffBin = "${diffutils}/bin/diff";
|
||||
};
|
||||
dontUnpack = true;
|
||||
doInstallCheck = true;
|
||||
installCheckInputs = [ shellcheck ];
|
||||
postInstallCheck = ''
|
||||
shellcheck ${bin}
|
||||
${bin} -h | grep ${version}
|
||||
|
||||
test_tmp=$(mktemp -d 2>/dev/null || mktemp -d -t 'mytmpdir')
|
||||
export HOME="$test_tmp/home"
|
||||
export NIX_STORE_DIR="$test_tmp/nix/store"
|
||||
export NIX_STATE_DIR="$test_tmp/nix/var"
|
||||
mkdir -p "$HOME" "$NIX_STORE_DIR" "$NIX_STATE_DIR"
|
||||
function cleanup {
|
||||
rm -rf "$test_tmp"
|
||||
}
|
||||
trap "cleanup" 0 2 3 15
|
||||
|
||||
mkdir -p $HOME/.ssh
|
||||
cp -r "${./example}" $HOME/secrets
|
||||
chmod -R u+rw $HOME/secrets
|
||||
(
|
||||
umask u=rw,g=r,o=r
|
||||
cp ${./example_keys/user1.pub} $HOME/.ssh/id_ed25519.pub
|
||||
chown $UID $HOME/.ssh/id_ed25519.pub
|
||||
)
|
||||
(
|
||||
umask u=rw,g=,o=
|
||||
cp ${./example_keys/user1} $HOME/.ssh/id_ed25519
|
||||
chown $UID $HOME/.ssh/id_ed25519
|
||||
)
|
||||
|
||||
cd $HOME/secrets
|
||||
test $(${bin} -d secret1.age) = "hello"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -D $src ${bin}
|
||||
'';
|
||||
|
||||
meta.description = "age-encrypted secrets for NixOS";
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
age-encryption.org/v1
|
||||
-> ssh-ed25519 V3XmEA zirqdzZZ1E+sedBn7fbEHq4ntLEkokZ4GctarBBOHXY
|
||||
Rvs5YHaAUeCZyNwPedubPcHClWYIuXXWA5zadXPWY6w
|
||||
-> ssh-ed25519 KLPP8w BVp4rDkOYSQyn8oVeHFeinSqW+pdVtxBF9+5VM1yORY
|
||||
bMwppAi8Nhz0328taU4AzUkTVyWtSLvFZG6c5W/Fs78
|
||||
--- xCbqLhXAcOziO2wmbjTiSQfZvt5Rlsc4SCvF+iEzpQA
|
||||
ôKB£î/²ZÅÈrÙ%¾à4¡´—Mq5×Ô_ÌÂÝ’‹†ã„Ò11ܨqM;& ¢‡LríÂÒføû”]>N
|
||||
@ -1,7 +0,0 @@
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IFYzWG1FQSBpZkZW
|
||||
aFpLNnJxc0VUMHRmZ2dZS0pjMGVENnR3OHd5K0RiT1RjRUhibFZBCnN5UG5vUjA3
|
||||
SXpsNGtiVUw4T0tIVFo5Wkk5QS9NQlBndzVvektiQ0ozc0kKLS0tIGxyY1Q4dEZ1
|
||||
VGZEanJyTFNta2JNRmpZb2FnK2JyS1hSVml1UGdMNWZKQXMKYla+wTXcRedyZoEb
|
||||
LVWaSx49WoUTU0KBPJg9RArxaeC23GoCDzR/aM/1DvYU
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
@ -1,9 +0,0 @@
|
||||
age-encryption.org/v1
|
||||
-> ssh-ed25519 KLPP8w s1DYZRlZuSsyhmZCF1lFB+E9vB8bZ/+ZhBRlx8nprwE
|
||||
nmYVCsVBrX2CFXXPU+D+bbkkIe/foofp+xoUrg9DHZw
|
||||
-> ssh-ed25519 V3XmEA Pwv3oCwcY0DX8rY48UNfsj9RumWsn4dbgorYHCwObgI
|
||||
FKxRYkL3JHtJxUwymWDF0rAtJ33BivDI6IfPsfumM90
|
||||
-> V'v(/u$-grease em/Vgf 2qDuk
|
||||
7I3iiQLPGi1COML9u/JeYkr7EqbSLoU
|
||||
--- 57WJRigUGtmcObrssS3s4PvmR8wgh1AOC/ijJn1s3xI
|
||||
<EFBFBD>'K©Æ·Y&‘7GÆOÝòFj±kÆXç«BnuJöê:9Ê(’ÙÏX¬#¼AíÄÞÃÚ§j’,ê_ÈþÝ?ÝZ“¥vœ¹V’96]oks~%£c Îe^CÅ%JQ5€<H¢z}îCý,°pŒ¿*!W§§ÈA±ºÒ…dC¼K)¿¢-žy
|
||||
Binary file not shown.
@ -1,5 +0,0 @@
|
||||
age-encryption.org/v1
|
||||
-> ssh-ed25519 V3XmEA OB4+1FbPhQ3r6iGksM7peWX5it8NClpXIq/o5nnP7GA
|
||||
FmHVUj+A5i5+bDFgySQskmlvynnosJiWUTJmBRiNA9I
|
||||
--- tP+3mFVtd7ogVu1Lkboh55zoi5a77Ht08Uc/QuIviv4
|
||||
¤¬Xæ{”ïOŠ£èätMXxÔvÓª(¬IÁmyPÇï¸è+3²S3i
|
||||
@ -1,23 +0,0 @@
|
||||
let
|
||||
user1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL0idNvgGiucWgup/mP78zyC23uFjYq0evcWdjGQUaBH";
|
||||
system1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPJDyIr/FSz1cJdcoW69R+NrWzwGK/+3gJpqD1t8L2zE";
|
||||
in
|
||||
{
|
||||
"secret1.age".publicKeys = [
|
||||
user1
|
||||
system1
|
||||
];
|
||||
"secret2.age".publicKeys = [ user1 ];
|
||||
"passwordfile-user1.age".publicKeys = [
|
||||
user1
|
||||
system1
|
||||
];
|
||||
"-leading-hyphen-filename.age".publicKeys = [
|
||||
user1
|
||||
system1
|
||||
];
|
||||
"armored-secret.age" = {
|
||||
publicKeys = [ user1 ];
|
||||
armor = true;
|
||||
};
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
-----BEGIN OPENSSH PRIVATE KEY-----
|
||||
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
|
||||
QyNTUxOQAAACDyQ8iK/xUs9XCXXKFuvUfja1s8Biv/t4Caag9bfC9sxAAAAJA3yvCWN8rw
|
||||
lgAAAAtzc2gtZWQyNTUxOQAAACDyQ8iK/xUs9XCXXKFuvUfja1s8Biv/t4Caag9bfC9sxA
|
||||
AAAEA+J2V6AG1NriAIvnNKRauIEh1JE9HSdhvKJ68a5Fm0w/JDyIr/FSz1cJdcoW69R+Nr
|
||||
WzwGK/+3gJpqD1t8L2zEAAAADHJ5YW50bUBob21lMQE=
|
||||
-----END OPENSSH PRIVATE KEY-----
|
||||
@ -1 +0,0 @@
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPJDyIr/FSz1cJdcoW69R+NrWzwGK/+3gJpqD1t8L2zE
|
||||
@ -1,7 +0,0 @@
|
||||
-----BEGIN OPENSSH PRIVATE KEY-----
|
||||
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtzc2gtZW
|
||||
QyNTUxOQAAACC9InTb4BornFoLqf5j+/M8gtt7hY2KtHr3FnYxkFGgRwAAAJC2JJ8htiSf
|
||||
IQAAAAtzc2gtZWQyNTUxOQAAACC9InTb4BornFoLqf5j+/M8gtt7hY2KtHr3FnYxkFGgRw
|
||||
AAAEDxt5gC/s53IxiKAjfZJVCCcFIsdeERdIgbYhLO719+Kb0idNvgGiucWgup/mP78zyC
|
||||
23uFjYq0evcWdjGQUaBHAAAADHJ5YW50bUBob21lMQE=
|
||||
-----END OPENSSH PRIVATE KEY-----
|
||||
@ -1 +0,0 @@
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL0idNvgGiucWgup/mP78zyC23uFjYq0evcWdjGQUaBH
|
||||
@ -1,23 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# All operations are done relative to root
|
||||
GITROOT=$(git rev-parse --show-toplevel)
|
||||
cd "$GITROOT"
|
||||
|
||||
REVISION=${1:-main}
|
||||
|
||||
TMPCLONE=$(mktemp -d)
|
||||
trap "rm -rf ${TMPCLONE}" EXIT
|
||||
|
||||
git clone https://github.com/ryantm/agenix.git --revision="$REVISION" "$TMPCLONE" --depth=1
|
||||
|
||||
cp "${TMPCLONE}/pkgs/agenix.sh" pkgs/agenix/agenix.sh
|
||||
cp "${TMPCLONE}/pkgs/agenix.nix" pkgs/agenix/default.nix
|
||||
sed -i 's#../example#./example#' pkgs/agenix/default.nix
|
||||
|
||||
cp "${TMPCLONE}/example/"* pkgs/agenix/example/
|
||||
cp "${TMPCLONE}/example_keys/"* pkgs/agenix/example_keys/
|
||||
|
||||
cp "${TMPCLONE}/modules/age.nix" m/module/agenix.nix
|
||||
@ -90,7 +90,7 @@ in
|
||||
meta = {
|
||||
description = "Performance analysis tool-suite for x86 based applications";
|
||||
homepage = "https://www.amd.com/es/developer/uprof.html";
|
||||
platforms = [ "x86_64-linux" ];
|
||||
platforms = lib.platforms.linux;
|
||||
license = lib.licenses.unfree;
|
||||
maintainers = with lib.maintainers.bsc; [ rarias varcila ];
|
||||
};
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
{ stdenv, lib, fetchurl, pkg-config, glib, libuuid, popt, elfutils, swig4, python3 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "babeltrace-1.5.8";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.efficios.com/files/babeltrace/${name}.tar.bz2";
|
||||
sha256 = "1hkg3phnamxfrhwzmiiirbhdgckzfkqwhajl0lmr1wfps7j47wcz";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ glib libuuid popt elfutils swig4 python3 ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Command-line tool and library to read and convert LTTng tracefiles";
|
||||
homepage = "https://www.efficios.com/babeltrace";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
maintainers = [ maintainers.bjornfor ];
|
||||
};
|
||||
|
||||
configureFlags = [
|
||||
"--enable-python-bindings"
|
||||
];
|
||||
}
|
||||
@ -1,34 +0,0 @@
|
||||
{
|
||||
stdenv
|
||||
, fetchurl
|
||||
, pkg-config
|
||||
, glib
|
||||
, libuuid
|
||||
, popt
|
||||
, elfutils
|
||||
, python3
|
||||
, swig4
|
||||
, ncurses
|
||||
, breakpointHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "babeltrace2";
|
||||
version = "2.0.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.efficios.com/files/babeltrace/${pname}-${version}.tar.bz2";
|
||||
sha256 = "1804pyq7fz6rkcz4r1abkkn0pfnss13m6fd8if32s42l4lajadm5";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ glib libuuid popt elfutils python3 swig4 ncurses breakpointHook ];
|
||||
hardeningDisable = [ "all" ];
|
||||
|
||||
configureFlags = [
|
||||
"--enable-python-plugins"
|
||||
"--enable-python-bindings"
|
||||
];
|
||||
|
||||
}
|
||||
@ -1,54 +0,0 @@
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, libcap
|
||||
, libcgroup
|
||||
, libmhash
|
||||
, doxygen
|
||||
, graphviz
|
||||
, autoreconfHook
|
||||
, pkg-config
|
||||
, glib
|
||||
}:
|
||||
|
||||
let
|
||||
version = "0.4.4";
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
pname = "clsync";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "clsync";
|
||||
owner = "clsync";
|
||||
rev = "v${version}";
|
||||
sha256 = "0sdiyfwp0iqr6l1sirm51pirzmhi4jzgky5pzfj24nn71q3fwqgz";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
buildInputs = [
|
||||
autoreconfHook
|
||||
libcap
|
||||
libcgroup
|
||||
libmhash
|
||||
doxygen
|
||||
graphviz
|
||||
pkg-config
|
||||
glib
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
./configure --help
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "File live sync daemon based on inotify/kqueue/bsm (Linux, FreeBSD), written in GNU C";
|
||||
homepage = "https://github.com/clsync/clsync";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = [ ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
||||
@ -1,51 +0,0 @@
|
||||
{
|
||||
stdenv
|
||||
, lib
|
||||
, babeltrace2
|
||||
, pkg-config
|
||||
, uthash
|
||||
, enableTest ? false
|
||||
, mpi ? null
|
||||
, clangOmpss2 ? null
|
||||
, tampi ? null
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
assert (enableTest -> (mpi != null));
|
||||
assert (enableTest -> (clangOmpss2 != null));
|
||||
assert (enableTest -> (tampi != null));
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cn6";
|
||||
version = "${src.shortRev}";
|
||||
|
||||
buildInputs = [
|
||||
babeltrace2
|
||||
pkg-config
|
||||
uthash
|
||||
mpi
|
||||
] ++ optionals (enableTest) [ mpi clangOmpss2 tampi ];
|
||||
|
||||
src = builtins.fetchGit {
|
||||
url = "ssh://git@bscpm04.bsc.es/rarias/cn6.git";
|
||||
ref = "master";
|
||||
rev = "c72c3b66b720c2a33950f536fc819051c8f20a69";
|
||||
};
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)" ];
|
||||
|
||||
postBuild = optionalString (enableTest) ''
|
||||
(
|
||||
cd test
|
||||
make timediff timediff_mpi
|
||||
)
|
||||
'';
|
||||
|
||||
postInstall = optionalString (enableTest) ''
|
||||
(
|
||||
cd test
|
||||
cp timediff timediff_mpi sync-err.sh $out/bin/
|
||||
)
|
||||
'';
|
||||
}
|
||||
@ -1,21 +0,0 @@
|
||||
{
|
||||
stdenv
|
||||
, perl # For the pod2man command
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "20201006";
|
||||
pname = "cpuid";
|
||||
|
||||
buildInputs = [ perl ];
|
||||
|
||||
# Replace /usr install directory for $out
|
||||
postPatch = ''
|
||||
sed -i "s@/usr@$out@g" Makefile
|
||||
'';
|
||||
|
||||
src = builtins.fetchTarball {
|
||||
url = "http://www.etallen.com/cpuid/${pname}-${version}.src.tar.gz";
|
||||
sha256 = "04qhs938gs1kjxpsrnfy6lbsircsprfyh4db62s5cf83a1nrwn9w";
|
||||
};
|
||||
}
|
||||
@ -1,6 +1,5 @@
|
||||
{
|
||||
stdenv
|
||||
, lib
|
||||
, cudatoolkit
|
||||
, cudaPackages
|
||||
, autoAddDriverRunpath
|
||||
@ -41,9 +40,4 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
'';
|
||||
installPhase = "touch $out";
|
||||
};
|
||||
|
||||
meta = {
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = with lib.maintainers.bsc; [ rarias ];
|
||||
};
|
||||
})
|
||||
|
||||
@ -1,25 +0,0 @@
|
||||
{
|
||||
stdenv
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "dummy";
|
||||
|
||||
src = null;
|
||||
dontUnpack = true;
|
||||
dontBuild = true;
|
||||
|
||||
programPath = "/bin/dummy";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
|
||||
cat > $out/bin/dummy <<EOF
|
||||
#!/bin/sh
|
||||
echo Hello worlda!
|
||||
|
||||
EOF
|
||||
|
||||
chmod +x $out/bin/dummy
|
||||
'';
|
||||
}
|
||||
@ -1,58 +0,0 @@
|
||||
{ fetchurl, stdenv, lib, llvmPackages ? null, precision ? "double", perl, mpi }:
|
||||
|
||||
with lib;
|
||||
|
||||
assert stdenv.cc.isClang -> llvmPackages != null;
|
||||
assert elem precision [ "single" "double" "long-double" "quad-precision" ];
|
||||
|
||||
let
|
||||
version = "3.3.8";
|
||||
withDoc = stdenv.cc.isGNU;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "fftw-${precision}-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"http://fftw.org/fftw-${version}.tar.gz"
|
||||
"ftp://ftp.fftw.org/pub/fftw/fftw-${version}.tar.gz"
|
||||
];
|
||||
sha256 = "00z3k8fq561wq2khssqg0kallk0504dzlx989x3vvicjdqpjc4v1";
|
||||
};
|
||||
|
||||
outputs = [ "out" "dev" "man" ]
|
||||
++ optional withDoc "info"; # it's dev-doc only
|
||||
outputBin = "dev"; # fftw-wisdom
|
||||
|
||||
buildInputs = [ mpi ]
|
||||
++ lib.optionals stdenv.cc.isClang [
|
||||
# TODO: This may mismatch the LLVM version sin the stdenv, see #79818.
|
||||
llvmPackages.openmp
|
||||
];
|
||||
|
||||
configureFlags =
|
||||
[ "--enable-shared"
|
||||
"--enable-threads"
|
||||
"--enable-mpi"
|
||||
"--disable-openmp"
|
||||
]
|
||||
++ optional (precision != "double") "--enable-${precision}"
|
||||
# all x86_64 have sse2
|
||||
# however, not all float sizes fit
|
||||
++ optional (stdenv.isx86_64 && (precision == "single" || precision == "double") ) "--enable-sse2"
|
||||
# doc generation causes Fortran wrapper generation which hard-codes gcc
|
||||
++ optional (!withDoc) "--disable-doc";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
checkInputs = [ perl ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Fastest Fourier Transform in the West library";
|
||||
homepage = "http://www.fftw.org/";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = [ maintainers.spwhitt ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
@ -9,6 +9,7 @@
|
||||
, automake
|
||||
, libtool
|
||||
, mpi
|
||||
, rsync
|
||||
, gfortran
|
||||
}:
|
||||
|
||||
@ -43,24 +44,13 @@ stdenv.mkDerivation rec {
|
||||
|
||||
configureFlags = [
|
||||
"--with-infiniband=${rdma-core-all}"
|
||||
"--with-mpi=yes" # fixes mpi detection when cross-compiling
|
||||
"--with-mpi=${mpiAll}"
|
||||
"--with-slurm"
|
||||
"CFLAGS=-fPIC"
|
||||
"CXXFLAGS=-fPIC"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoconf
|
||||
automake
|
||||
gfortran
|
||||
libtool
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
slurm
|
||||
mpiAll
|
||||
rdma-core-all
|
||||
];
|
||||
buildInputs = [ slurm mpiAll rdma-core-all autoconf automake libtool rsync gfortran ];
|
||||
|
||||
hardeningDisable = [ "all" ];
|
||||
|
||||
@ -70,6 +60,5 @@ stdenv.mkDerivation rec {
|
||||
maintainers = with lib.maintainers.bsc; [ rarias ];
|
||||
platforms = lib.platforms.linux;
|
||||
license = lib.licenses.gpl3Plus;
|
||||
cross = false; # infiniband detection does not work
|
||||
};
|
||||
}
|
||||
|
||||
@ -1,46 +0,0 @@
|
||||
From 1454525f70b43a6957b7c9e1870e997368787da3 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Dionne-Riel <samuel@dionne-riel.com>
|
||||
Date: Fri, 8 Nov 2019 21:59:21 -0500
|
||||
Subject: [PATCH] Fix cross-compilation by looking for `ar`.
|
||||
|
||||
---
|
||||
Makefile.am | 2 +-
|
||||
configure.ac | 2 ++
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index d18c49b8..b1b53338 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -494,7 +494,7 @@ CCC=@CXX@
|
||||
# INSTALL_INFO
|
||||
# LN_S
|
||||
|
||||
-AR=ar
|
||||
+AR=@AR@
|
||||
ETAGS=etags
|
||||
ETAGSFLAGS=
|
||||
# Flag that tells etags to assume C++.
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 28e75f17..2449b9f5 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -37,6 +37,7 @@ AC_CONFIG_AUX_DIR([build-aux])
|
||||
|
||||
AC_CONFIG_HEADERS([src/include/config.h:src/include/config.hin])
|
||||
AC_CONFIG_SRCDIR([src/roff/groff/groff.cpp])
|
||||
+AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
|
||||
@@ -72,6 +73,7 @@ GROFF_DOC_CHECK
|
||||
GROFF_MAKEINFO
|
||||
GROFF_TEXI2DVI
|
||||
AC_PROG_RANLIB
|
||||
+AC_CHECK_TOOL([AR], [ar], [ar])
|
||||
GROFF_INSTALL_SH
|
||||
GROFF_INSTALL_INFO
|
||||
AC_PROG_INSTALL
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@ -1,127 +0,0 @@
|
||||
{ stdenv, lib, fetchurl, perl
|
||||
, ghostscript #for postscript and html output
|
||||
, psutils, netpbm #for html output
|
||||
, buildPackages
|
||||
, autoreconfHook
|
||||
, pkg-config
|
||||
, texinfo
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "groff";
|
||||
version = "1.22.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/groff/${pname}-${version}.tar.gz";
|
||||
sha256 = "14q2mldnr1vx0l9lqp9v2f6iww24gj28iyh4j2211hyynx67p3p7";
|
||||
};
|
||||
|
||||
enableParallelBuilding = false;
|
||||
|
||||
patches = [
|
||||
./0001-Fix-cross-compilation-by-looking-for-ar.patch
|
||||
];
|
||||
|
||||
postPatch = lib.optionalString (psutils != null) ''
|
||||
substituteInPlace src/preproc/html/pre-html.cpp \
|
||||
--replace "psselect" "${psutils}/bin/psselect"
|
||||
'' + lib.optionalString (netpbm != null) ''
|
||||
substituteInPlace src/preproc/html/pre-html.cpp \
|
||||
--replace "pnmcut" "${lib.getBin netpbm}/bin/pnmcut" \
|
||||
--replace "pnmcrop" "${lib.getBin netpbm}/bin/pnmcrop" \
|
||||
--replace "pnmtopng" "${lib.getBin netpbm}/bin/pnmtopng"
|
||||
substituteInPlace tmac/www.tmac.in \
|
||||
--replace "pnmcrop" "${lib.getBin netpbm}/bin/pnmcrop" \
|
||||
--replace "pngtopnm" "${lib.getBin netpbm}/bin/pngtopnm" \
|
||||
--replace "@PNMTOPS_NOSETPAGE@" "${lib.getBin netpbm}/bin/pnmtops -nosetpage"
|
||||
'';
|
||||
|
||||
buildInputs = [ ghostscript psutils netpbm perl ];
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config texinfo ];
|
||||
|
||||
# Builds running without a chroot environment may detect the presence
|
||||
# of /usr/X11 in the host system, leading to an impure build of the
|
||||
# package. To avoid this issue, X11 support is explicitly disabled.
|
||||
# Note: If we ever want to *enable* X11 support, then we'll probably
|
||||
# have to pass "--with-appresdir", too.
|
||||
configureFlags = [
|
||||
"--without-x"
|
||||
] ++ lib.optionals (ghostscript != null) [
|
||||
"--with-gs=${ghostscript}/bin/gs"
|
||||
] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
|
||||
"ac_cv_path_PERL=${buildPackages.perl}/bin/perl"
|
||||
];
|
||||
|
||||
makeFlags = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
|
||||
# Trick to get the build system find the proper 'native' groff
|
||||
# http://www.mail-archive.com/bug-groff@gnu.org/msg01335.html
|
||||
"GROFF_BIN_PATH=${buildPackages.groff}/bin"
|
||||
"GROFFBIN=${buildPackages.groff}/bin/groff"
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
postInstall = ''
|
||||
for f in 'man.local' 'mdoc.local'; do
|
||||
cat '${./site.tmac}' >>"$out/share/groff/site-tmac/$f"
|
||||
done
|
||||
|
||||
moveToOutput bin/gropdf $out
|
||||
moveToOutput bin/pdfmom $out
|
||||
moveToOutput bin/roff2text $out
|
||||
moveToOutput bin/roff2pdf $out
|
||||
moveToOutput bin/roff2ps $out
|
||||
moveToOutput bin/roff2dvi $out
|
||||
moveToOutput bin/roff2ps $out
|
||||
moveToOutput bin/roff2html $out
|
||||
moveToOutput bin/glilypond $out
|
||||
moveToOutput bin/mmroff $out
|
||||
moveToOutput bin/roff2x $out
|
||||
moveToOutput bin/afmtodit $out
|
||||
moveToOutput bin/gperl $out
|
||||
moveToOutput bin/chem $out
|
||||
moveToOutput share/groff/${version}/font/devpdf $out
|
||||
|
||||
# idk if this is needed, but Fedora does it
|
||||
moveToOutput share/groff/${version}/tmac/pdf.tmac $out
|
||||
|
||||
moveToOutput bin/gpinyin $out
|
||||
moveToOutput lib/groff/gpinyin $out
|
||||
substituteInPlace $out/bin/gpinyin \
|
||||
--replace $out/lib/groff/gpinyin $out/lib/groff/gpinyin
|
||||
|
||||
moveToOutput bin/groffer $out
|
||||
moveToOutput lib/groff/groffer $out
|
||||
substituteInPlace $out/bin/groffer \
|
||||
--replace $out/lib/groff/groffer $out/lib/groff/groffer
|
||||
|
||||
moveToOutput bin/grog $out
|
||||
moveToOutput lib/groff/grog $out
|
||||
substituteInPlace $out/bin/grog \
|
||||
--replace $out/lib/groff/grog $out/lib/groff/grog
|
||||
|
||||
'' + lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
|
||||
find $out/ -type f -print0 | xargs --null sed -i 's|${buildPackages.perl}|${perl}|'
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.gnu.org/software/groff/";
|
||||
description = "GNU Troff, a typesetting package that reads plain text and produces formatted output";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ pSub ];
|
||||
|
||||
longDescription = ''
|
||||
groff is the GNU implementation of troff, a document formatting
|
||||
system. Included in this release are implementations of troff,
|
||||
pic, eqn, tbl, grn, refer, -man, -mdoc, -mom, and -ms macros,
|
||||
and drivers for PostScript, TeX dvi format, HP LaserJet 4
|
||||
printers, Canon CAPSL printers, HTML and XHTML format (beta
|
||||
status), and typewriter-like devices. Also included is a
|
||||
modified version of the Berkeley -me macros, the enhanced
|
||||
version gxditview of the X11 xditview previewer, and an
|
||||
implementation of the -mm macros.
|
||||
'';
|
||||
|
||||
};
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
.
|
||||
.if n \{\
|
||||
. \" Character translations for non-keyboard
|
||||
. \" characters - to make them searchable
|
||||
. if '\*[.T]'utf8' \{\
|
||||
. char \- \N'45'
|
||||
. char - \N'45'
|
||||
. char ' \N'39'
|
||||
. char \' \N'39'
|
||||
. \}
|
||||
.
|
||||
. \" Shut off SGR by default (groff colors)
|
||||
. \" Require GROFF_SGR envvar defined to turn it on
|
||||
. if '\V[GROFF_SGR]'' \
|
||||
. output x X tty: sgr 0
|
||||
.\}
|
||||
@ -1,70 +0,0 @@
|
||||
{ stdenv, lib, fetchurl, pkg-config, expat, ncurses
|
||||
, pciutils, numactl }:
|
||||
|
||||
with lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "hwloc-1.11.6";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.open-mpi.org/software/hwloc/v1.11/downloads/${name}.tar.bz2";
|
||||
sha256 = "1yl7dm2qplwmnidd712zy12qfvxk28k8ccs694n42ybwdjwzg1bn";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
# Filter out `null' inputs. This allows users to `.override' the
|
||||
# derivation and set optional dependencies to `null'.
|
||||
buildInputs = filter (x: x != null)
|
||||
([ expat ncurses ]
|
||||
++ (optionals stdenv.isLinux [ numactl ]));
|
||||
|
||||
propagatedBuildInputs =
|
||||
# Since `libpci' appears in `hwloc.pc', it must be propagated.
|
||||
optional stdenv.isLinux pciutils;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postInstall =
|
||||
optionalString (stdenv.isLinux && numactl != null)
|
||||
'' if [ -d "${numactl}/lib64" ]
|
||||
then
|
||||
numalibdir="${numactl}/lib64"
|
||||
else
|
||||
numalibdir="${numactl}/lib"
|
||||
test -d "$numalibdir"
|
||||
fi
|
||||
|
||||
sed -i "$out/lib/libhwloc.la" \
|
||||
-e "s|-lnuma|-L$numalibdir -lnuma|g"
|
||||
'';
|
||||
|
||||
# Checks disabled because they're impure (hardware dependent) and
|
||||
# fail on some build machines.
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
description = "Portable abstraction of hierarchical architectures for high-performance computing";
|
||||
longDescription = ''
|
||||
hwloc provides a portable abstraction (across OS,
|
||||
versions, architectures, ...) of the hierarchical topology of
|
||||
modern architectures, including NUMA memory nodes, sockets,
|
||||
shared caches, cores and simultaneous multithreading. It also
|
||||
gathers various attributes such as cache and memory
|
||||
information. It primarily aims at helping high-performance
|
||||
computing applications with gathering information about the
|
||||
hardware so as to exploit it accordingly and efficiently.
|
||||
|
||||
hwloc may display the topology in multiple convenient
|
||||
formats. It also offers a powerful programming interface to
|
||||
gather information about the hardware, bind processes, and much
|
||||
more.
|
||||
'';
|
||||
|
||||
# http://www.open-mpi.org/projects/hwloc/license.php
|
||||
license = licenses.bsd3;
|
||||
homepage = http://www.open-mpi.org/projects/hwloc/;
|
||||
maintainers = [ ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
@ -1,40 +0,0 @@
|
||||
{
|
||||
stdenv
|
||||
, gcc
|
||||
, iccUnwrapped
|
||||
, wrapCCWith
|
||||
, intelLicense
|
||||
}:
|
||||
|
||||
let
|
||||
targetConfig = stdenv.targetPlatform.config;
|
||||
inherit gcc;
|
||||
in wrapCCWith rec {
|
||||
cc = iccUnwrapped;
|
||||
extraBuildCommands = ''
|
||||
echo "-B${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-cflags
|
||||
echo "-isystem ${iccUnwrapped}/include" >> $out/nix-support/cc-cflags
|
||||
echo "-isystem ${iccUnwrapped}/include/intel64" >> $out/nix-support/cc-cflags
|
||||
echo "-L${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-ldflags
|
||||
echo "-L${gcc.cc.lib}/lib" >> $out/nix-support/cc-ldflags
|
||||
|
||||
cat "${iccUnwrapped}/nix-support/propagated-build-inputs" >> \
|
||||
$out/nix-support/propagated-build-inputs
|
||||
|
||||
echo "export INTEL_LICENSE_FILE=${intelLicense}" \
|
||||
>> $out/nix-support/setup-hook
|
||||
|
||||
# Create the wrappers for icc and icpc
|
||||
if [ -e $ccPath/icc ]; then
|
||||
wrap icc $wrapper $ccPath/icc
|
||||
fi
|
||||
|
||||
if [ -e $ccPath/icpc ]; then
|
||||
wrap icpc $wrapper $ccPath/icpc
|
||||
fi
|
||||
|
||||
if [ -e $ccPath/ifort ]; then
|
||||
wrap ifort $wrapper $ccPath/ifort
|
||||
fi
|
||||
'';
|
||||
}
|
||||
@ -1,71 +0,0 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, rpmextract
|
||||
, autoPatchelfHook
|
||||
, gcc
|
||||
, intel-mpi
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "${year}.${v_a}.${v_b}";
|
||||
name = "intel-compiler-${version}";
|
||||
|
||||
passthru = {
|
||||
CC = "icc";
|
||||
CXX = "icpc";
|
||||
};
|
||||
|
||||
# From Arch Linux PKGBUILD
|
||||
dir_nr="17114";
|
||||
year="2020";
|
||||
v_a="4";
|
||||
v_b="304";
|
||||
update="4";
|
||||
composer_xe_dir="compilers_and_libraries_${year}.${v_a}.${v_b}";
|
||||
tgz="parallel_studio_xe_2020_update${update}_professional_edition.tgz";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://registrationcenter-download.intel.com/akdlm/irc_nas/tec/${dir_nr}/${tgz}";
|
||||
sha256 = "1rn9kk5bjj0jfv853b09dxrx7kzvv8dlyzw3hl9ijx9mqr09lrzr";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
rpmextract
|
||||
autoPatchelfHook
|
||||
gcc.cc.lib
|
||||
gcc
|
||||
intel-mpi
|
||||
];
|
||||
|
||||
# The gcc package is required for building other programs
|
||||
propagatedBuildInputs = [ gcc ];
|
||||
|
||||
installPhase = ''
|
||||
pwd
|
||||
ls -l rpm
|
||||
rpmextract rpm/intel-icc-*.rpm
|
||||
rpmextract rpm/intel-comp-*.rpm
|
||||
rpmextract rpm/intel-c-comp-*.rpm
|
||||
rpmextract rpm/intel-openmp*.rpm
|
||||
rpmextract rpm/intel-ifort*.rpm
|
||||
|
||||
mkdir -p $out/{bin,lib,include}
|
||||
|
||||
pushd ./opt/intel/${composer_xe_dir}/linux/
|
||||
cp -a bin/intel64/* $out/bin/
|
||||
cp -a compiler/include/* $out/include/
|
||||
cp -a compiler/lib/intel64_lin/* $out/lib/
|
||||
ln -s lib $out/lib_lin
|
||||
rm $out/lib/*.dbg
|
||||
popd
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://www.intel.com/content/www/us/en/developer/tools/overview.html";
|
||||
description = "Intel compiler";
|
||||
maintainers = with lib.maintainers.bsc; [ rarias ];
|
||||
platforms = lib.platforms.linux;
|
||||
license = lib.licenses.unfree;
|
||||
};
|
||||
}
|
||||
@ -1,156 +0,0 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, dpkg
|
||||
, rsync
|
||||
, libffi
|
||||
, libelf
|
||||
, libxml2
|
||||
, hwloc
|
||||
, autoPatchelfHook
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
getsrc = url: sha256: fetchurl { inherit url sha256; };
|
||||
|
||||
version = "2021.2.0";
|
||||
_debpkgrel = "610";
|
||||
tbbrel = "357";
|
||||
|
||||
# Shorhands
|
||||
main = "intel-oneapi-dpcpp-cpp";
|
||||
compiler = "intel-oneapi-compiler-dpcpp-cpp";
|
||||
shared = "intel-oneapi-compiler-shared";
|
||||
openmp = "intel-oneapi-openmp";
|
||||
tbb = "intel-oneapi-tbb";
|
||||
|
||||
# From Arch Linux PKGBUILD:
|
||||
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=intel-oneapi-compiler-dpcpp-cpp
|
||||
debs = [
|
||||
# From intel-oneapi-compiler-dpcpp-cpp
|
||||
"${main}-${version}-${version}-${_debpkgrel}_amd64.deb"
|
||||
"${compiler}-common-${version}-${version}-${_debpkgrel}_all.deb"
|
||||
"${compiler}-runtime-${version}-${version}-${_debpkgrel}_amd64.deb"
|
||||
|
||||
# From intel-oneapi-compiler-shared
|
||||
"${shared}-${version}-${version}-${_debpkgrel}_amd64.deb"
|
||||
"${shared}-runtime-${version}-${version}-${_debpkgrel}_amd64.deb"
|
||||
"${shared}-common-${version}-${version}-${_debpkgrel}_all.deb"
|
||||
"${shared}-common-runtime-${version}-${version}-${_debpkgrel}_all.deb"
|
||||
"${compiler}-classic-fortran-shared-runtime-${version}-${version}-${_debpkgrel}_amd64.deb"
|
||||
|
||||
# From intel-oneapi-openmp
|
||||
"${openmp}-${version}-${version}-${_debpkgrel}_amd64.deb"
|
||||
"${openmp}-common-${version}-${version}-${_debpkgrel}_all.deb"
|
||||
|
||||
# From intel-oneapi-tbb
|
||||
"${tbb}-${version}-${version}-${tbbrel}_amd64.deb"
|
||||
"${tbb}-devel-${version}-${version}-${tbbrel}_amd64.deb"
|
||||
"${tbb}-common-${version}-${version}-${tbbrel}_all.deb"
|
||||
"${tbb}-common-devel-${version}-${version}-${tbbrel}_all.deb"
|
||||
];
|
||||
|
||||
apthost = "https://apt.repos.intel.com/oneapi/pool/main/";
|
||||
urls = map (x: apthost + x) debs;
|
||||
|
||||
sums = [
|
||||
# From intel-oneapi-compiler-dpcpp-cpp
|
||||
"0pwsfzkazr9yf6v6lgwb3p2in6ch3rlcc9qcfarkyqn052p760kk"
|
||||
"0vzsanldhs4ym4gsfn0zjqm03x53ma1zjkj24hpkhpsvlr2r069w"
|
||||
"0nx62v6g0wl70lqdh7sh7gfgxbynhrrips9gpj9if60ngz6fm21m"
|
||||
|
||||
# From intel-oneapi-compiler-shared
|
||||
"1al80pcy2r3q2r2pm04sva7rd3z6y287mkdv5jq4p5bfd8yi14d4"
|
||||
"07rp0cjmbgj48wly9dm6ibxzbsanmgrsjjqr7mx688ms6qbhv314"
|
||||
"1pf4xckyyhssjknhs6hwampjsz2qjlg81jw2fc441zaccwf25yf3"
|
||||
"0hk0x4wq60g9wnn9j051v25zcmbasjdzp34xfvrihmcvyws0s69g"
|
||||
"0dhbw8kshw4abqc9zf891z5ic0x13x3kvhk56nrqkqgcfwps9w8a"
|
||||
|
||||
# From intel-oneapi-openmp
|
||||
"1wqy2sjwlqdh72zhfrxl9pm106hjzfdbbm98cxigbg20fb5lbv5a"
|
||||
"19nbqypvqcf8c3mwriaqrmp5igjpwvwrb9mq2fxa5i40w7bhlxjl"
|
||||
|
||||
# From intel-oneapi-tbb
|
||||
"1dpii3g861kimky0x7dqcj6hg7zb6i5kw1wgwrxdc5yxhi5slbm9"
|
||||
"0bl1flm6w0w9nzrh34ig4p9qz2gbdgw9q14as2pwp8flicd8p899"
|
||||
"0w3kip6q713v1xlfc10ai4v15cbwmbqrv8r1f5x6pfqdbb0bpmbv"
|
||||
"0v95nmddyi0mjjdvm07w9fm3vq4a0wkx7zxlyzn2f4xg38qc5j73"
|
||||
];
|
||||
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
inherit version;
|
||||
name = "intel-compiler-${version}";
|
||||
|
||||
passthru = {
|
||||
CC = "icc";
|
||||
CXX = "icpc";
|
||||
};
|
||||
|
||||
srcs = zipListsWith getsrc urls sums;
|
||||
|
||||
buildInputs = [
|
||||
dpkg
|
||||
rsync
|
||||
libffi
|
||||
libelf
|
||||
libxml2
|
||||
hwloc
|
||||
autoPatchelfHook
|
||||
stdenv.cc.cc.lib
|
||||
];
|
||||
|
||||
dontBuild = true;
|
||||
dontStrip = true;
|
||||
|
||||
# The gcc package is required for building other programs
|
||||
#propagatedBuildInputs = [ gcc ];
|
||||
|
||||
unpackCmd = ''
|
||||
dpkg -x $curSrc .
|
||||
'';
|
||||
|
||||
# FIXME: Some dependencies are missing
|
||||
autoPatchelfIgnoreMissingDeps = true;
|
||||
#autoPatchelfIgnoreMissingDeps = [ "*" ];
|
||||
|
||||
# Compiler
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,lib,include}
|
||||
|
||||
pushd intel/oneapi/compiler/${version}/linux
|
||||
# Binaries
|
||||
rsync -a bin/ $out/bin/
|
||||
rsync -a bin/intel64/ $out/bin/
|
||||
|
||||
# Libraries
|
||||
rsync -a --exclude=oclfpga lib/ $out/lib/
|
||||
rsync -a compiler/lib/intel64_lin/ $out/lib/
|
||||
|
||||
# Headers
|
||||
rsync -a include/ $out/include/
|
||||
rsync -a compiler/include/ $out/include/
|
||||
popd
|
||||
|
||||
# TBB
|
||||
pushd intel/oneapi/tbb/${version}
|
||||
# Libraries
|
||||
rsync -a lib/intel64/gcc4.8/ $out/lib/
|
||||
|
||||
# Headers
|
||||
rsync -a include/ $out/include/
|
||||
popd
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://www.intel.com/content/www/us/en/developer/tools/overview.html";
|
||||
description = "Intel compiler";
|
||||
maintainers = with lib.maintainers.bsc; [ rarias ];
|
||||
platforms = lib.platforms.linux;
|
||||
license = lib.licenses.unfree;
|
||||
};
|
||||
|
||||
}
|
||||
@ -1,39 +0,0 @@
|
||||
{ stdenv
|
||||
, requireFile
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "intel-compiler-license";
|
||||
version = "2019.7.217";
|
||||
|
||||
src = requireFile {
|
||||
name = "license.lic";
|
||||
sha256 = "0rgmsqkhpqcfny8j7msa4sgz3prhh248ylh69gjh12dkra77prsj";
|
||||
message = ''
|
||||
The Intel Compiler requires a license. You can get one (free of charge) if
|
||||
you meet the requeriments at the website:
|
||||
|
||||
https://software.intel.com/content/www/us/en/develop/articles/qualify-for-free-software.html#opensourcecontributor
|
||||
|
||||
Or you can use your own license. Add it to the store with:
|
||||
|
||||
$ nix-store --add-fixed sha256 license.lic
|
||||
/nix/store/2p9v0nvsl3scshjx348z6j32rh7ac0db-license.lic
|
||||
|
||||
Notice that the name must match exactly "license.lic".
|
||||
|
||||
Then update the hash in the bsc/intel-compiler/license.nix file using the
|
||||
nix-hash command with:
|
||||
|
||||
$ nix-hash --type sha256 --base32 --flat /nix/store/2p9v0nvsl3scshjx348z6j32rh7ac0db-license.lic
|
||||
06g2xgm1lch6zqfkhb768wacdx46kf61mfvj5wfpyssw0anr0x9q
|
||||
'';
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp $src $out/
|
||||
'';
|
||||
}
|
||||
@ -1,29 +0,0 @@
|
||||
{
|
||||
stdenv
|
||||
, gcc
|
||||
, iccUnwrapped
|
||||
, wrapCCWith
|
||||
}:
|
||||
|
||||
let
|
||||
targetConfig = stdenv.targetPlatform.config;
|
||||
inherit gcc;
|
||||
in wrapCCWith rec {
|
||||
cc = iccUnwrapped;
|
||||
extraBuildCommands = ''
|
||||
echo "-B${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-cflags
|
||||
echo "-isystem ${iccUnwrapped}/include" >> $out/nix-support/cc-cflags
|
||||
echo "-isystem ${iccUnwrapped}/include/icc" >> $out/nix-support/cc-cflags
|
||||
echo "-isystem ${gcc.cc}/include/c++/${gcc.version}" >> $out/nix-support/cc-cflags
|
||||
echo "-isystem ${gcc.cc}/include/c++/${gcc.version}/${targetConfig}" >> $out/nix-support/cc-cflags
|
||||
|
||||
echo "-L${iccUnwrapped}/lib" >> $out/nix-support/cc-ldflags
|
||||
echo "-L${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-ldflags
|
||||
echo "-L${gcc.cc.lib}/lib" >> $out/nix-support/cc-ldflags
|
||||
|
||||
# Create the wrappers for icx*
|
||||
wrap lld $wrapper $ccPath/lld
|
||||
wrap icx $wrapper $ccPath/icx
|
||||
wrap icpx $wrapper $ccPath/icpx
|
||||
'';
|
||||
}
|
||||
@ -1,113 +0,0 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, rpmextract
|
||||
, gcc
|
||||
, zlib
|
||||
, ucx
|
||||
, numactl
|
||||
, rdma-core
|
||||
, libpsm2
|
||||
, patchelf
|
||||
, autoPatchelfHook
|
||||
, enableDebug ? false
|
||||
# The _mt version seems to cause seg-faults and deadlocks with the libpsm2
|
||||
# provider library with programs that call the MPI library without any locking
|
||||
# mechanism. See https://pm.bsc.es/gitlab/rarias/bscpkgs/-/issues/28. By
|
||||
# default, we use the non-mt variant, which provides a big lock. If you want to
|
||||
# use it, take a look at the I_MPI_THREAD_SPLIT env-var as well.
|
||||
, enableMt ? false
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
lib_variant = (if enableDebug then "debug" else "release");
|
||||
|
||||
# See https://software.intel.com/content/www/us/en/develop/documentation/mpi-developer-reference-linux/top/environment-variable-reference/other-environment-variables.html
|
||||
lib_mt = (if enableMt then "_mt" else "");
|
||||
lib_name = "${lib_variant}${lib_mt}";
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "intel-mpi-${version}";
|
||||
version = "2019.10.317";
|
||||
dir_nr = "17534";
|
||||
|
||||
src = builtins.fetchTarball {
|
||||
url = "http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/${dir_nr}/l_mpi_${version}.tgz";
|
||||
sha256 = "00nimgqywr20dv1ns5kg4r8539gvharn0xfj48i7mhbg8kwf8s08";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
rpmextract
|
||||
autoPatchelfHook
|
||||
gcc.cc.lib
|
||||
zlib
|
||||
ucx
|
||||
numactl
|
||||
rdma-core
|
||||
libpsm2
|
||||
patchelf
|
||||
];
|
||||
|
||||
postUnpack = ''
|
||||
pushd $sourceRoot
|
||||
rpmextract rpm/intel-mpi-*.rpm
|
||||
# Predictable name
|
||||
mv opt/intel/compilers_and_libraries_* opt/intel/compilers_and_libraries
|
||||
popd
|
||||
sourceRoot="$sourceRoot/opt/intel/compilers_and_libraries/linux/mpi/intel64"
|
||||
'';
|
||||
|
||||
patches = [
|
||||
./mpicc.patch
|
||||
./mpicxx.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
for i in bin/mpi* ; do
|
||||
echo "Fixing paths in $i"
|
||||
sed -i "s:I_MPI_SUBSTITUTE_INSTALLDIR:$out:g" "$i"
|
||||
done
|
||||
'';
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
mv etc $out
|
||||
mv bin $out
|
||||
mv include $out
|
||||
mkdir $out/lib
|
||||
cp -a lib/lib* $out/lib
|
||||
cp -a lib/${lib_name}/lib* $out/lib
|
||||
cp -a libfabric/lib/* $out/lib
|
||||
cp -a libfabric/lib/prov/* $out/lib
|
||||
cp -a libfabric/bin/* $out/bin
|
||||
ln -s . $out/intel64
|
||||
rm $out/lib/libmpi.dbg
|
||||
|
||||
# Fixup Intel PSM2 library missing (now located at PSMX2)
|
||||
ln -s $out/lib/libpsmx2-fi.so $out/lib/libpsm2-fi.so
|
||||
'';
|
||||
|
||||
dontAutoPatchelf = true;
|
||||
|
||||
# The rpath of libfabric.so bundled with Intel MPI is patched to include the
|
||||
# rdma-core lib path, as is required for dlopen to find the rdma components.
|
||||
# TODO: Try the upstream libfabric library with rdma support, so we can avoid
|
||||
# this hack.
|
||||
postFixup = ''
|
||||
autoPatchelf -- $out
|
||||
patchelf --set-rpath "$out/lib:${rdma-core}/lib:${libpsm2}/lib" $out/lib/libfabric.so
|
||||
echo "Patched RPATH in libfabric.so to: $(patchelf --print-rpath $out/lib/libfabric.so)"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://www.intel.com/content/www/us/en/developer/tools/overview.html";
|
||||
description = "Intel MPI";
|
||||
maintainers = with lib.maintainers.bsc; [ rarias ];
|
||||
platforms = lib.platforms.linux;
|
||||
license = lib.licenses.unfree;
|
||||
};
|
||||
}
|
||||
@ -1,20 +0,0 @@
|
||||
--- a/bin/mpicc 2021-02-04 18:15:11.233632360 +0100
|
||||
+++ b/bin/mpicc 2021-02-05 09:33:49.493598479 +0100
|
||||
@@ -50,7 +50,7 @@
|
||||
if [ x"$opt_args" == x"" ]; then
|
||||
case "${compiler_short_name}" in
|
||||
icc|icx) "$dir"/mpiicc -cc=$compiler_name "$@" ;;
|
||||
- cc|*gcc*|clang*) "$dir"/mpigcc -cc=$compiler_name "$@" ;;
|
||||
+ cc|*gcc*|clang*|mcc|echo) "$dir"/mpigcc -cc=$compiler_name "$@" ;;
|
||||
mpicc) "$dir"/mpigcc "$@" ;;
|
||||
*)
|
||||
echo "Error: unsupported compiler name '$compiler_name'."
|
||||
@@ -60,7 +60,7 @@
|
||||
else
|
||||
case "${compiler_short_name}" in
|
||||
icc|icx) "$dir"/mpiicc -cc=$compiler_name "$@" $opt_args ;;
|
||||
- cc|*gcc*|clang*) "$dir"/mpigcc -cc=$compiler_name "$@" $opt_args ;;
|
||||
+ cc|*gcc*|clang*|mcc|echo) "$dir"/mpigcc -cc=$compiler_name "$@" $opt_args ;;
|
||||
mpicc) "$dir"/mpigcc "$@" $opt_args ;;
|
||||
*)
|
||||
echo "Error: unsupported compiler name '$compiler_name'."
|
||||
@ -1,20 +0,0 @@
|
||||
--- a/bin/mpicxx 2021-02-04 18:15:11.233632360 +0100
|
||||
+++ b/bin/mpicxx 2021-02-05 09:36:21.396922569 +0100
|
||||
@@ -50,7 +50,7 @@
|
||||
if [ x"$opt_args" == x"" ]; then
|
||||
case "${compiler_short_name}" in
|
||||
icc|icpc|dpcpp) "$dir"/mpiicpc -cxx=$compiler_name "$@" ;;
|
||||
- *g++*) "$dir"/mpigxx -cxx=$compiler_name "$@" ;;
|
||||
+ *g++*|clang*++|mcxx|echo) "$dir"/mpigxx -cxx=$compiler_name "$@" ;;
|
||||
mpicxx) "$dir"/mpigxx "$@" ;;
|
||||
*)
|
||||
echo "Error: unsupported compiler name '$compiler_name'."
|
||||
@@ -60,7 +60,7 @@
|
||||
else
|
||||
case "${compiler_short_name}" in
|
||||
icc|icpc|dpcpp) "$dir"/mpiicpc -cxx=$compiler_name "$@" $opt_args ;;
|
||||
- *g++*) "$dir"/mpigxx -cxx=$compiler_name "$@" $opt_args ;;
|
||||
+ *g++*|clang*++|mcxx|echo) "$dir"/mpigxx -cxx=$compiler_name "$@" $opt_args ;;
|
||||
mpicxx) "$dir"/mpigxx "$@" $opt_args ;;
|
||||
*)
|
||||
echo "Error: unsupported compiler name '$compiler_name'."
|
||||
@ -1,44 +0,0 @@
|
||||
{ stdenv, lib, fetchFromGitHub, numactl, pkg-config }:
|
||||
|
||||
let
|
||||
version = "11.2.185";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "libpsm2";
|
||||
inherit version;
|
||||
|
||||
preConfigure= ''
|
||||
export UDEVDIR=$out/etc/udev
|
||||
substituteInPlace ./Makefile --replace "udevrulesdir}" "prefix}/etc/udev";
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
buildInputs = [ numactl pkg-config ];
|
||||
|
||||
installFlags = [
|
||||
"DESTDIR=$(out)"
|
||||
"UDEVDIR=/etc/udev"
|
||||
"LIBPSM2_COMPAT_CONF_DIR=/etc"
|
||||
];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "intel";
|
||||
repo = "opa-psm2";
|
||||
rev = "PSM2_${version}";
|
||||
sha256 = "062hg4r6gz7pla9df70nqs5i2a3mp1wszmp4l0g771fykhhrxsjg";
|
||||
};
|
||||
|
||||
postInstall = ''
|
||||
mv $out/usr/* $out
|
||||
rmdir $out/usr
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/intel/opa-psm2";
|
||||
description = "The PSM2 library supports a number of fabric media and stacks";
|
||||
license = with licenses; [ gpl2 bsd3 ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = [ maintainers.bzizou ];
|
||||
};
|
||||
}
|
||||
@ -16,19 +16,19 @@
|
||||
, useGit ? false
|
||||
, gitUrl ? "ssh://git@bscpm04.bsc.es/llvm-ompss/llvm-mono.git"
|
||||
, gitBranch ? "master"
|
||||
, gitCommit ? "872ba63f86edaefc9787984ef3fae9f2f94e0124" # github-release-2025.11
|
||||
, gitCommit ? "880e2341c56bad1dc14e8c369fb3356bec19018e"
|
||||
}:
|
||||
|
||||
let
|
||||
stdenv = llvmPackages_latest.stdenv;
|
||||
|
||||
release = rec {
|
||||
version = "2025.11";
|
||||
version = "2025.06";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bsc-pm";
|
||||
repo = "llvm";
|
||||
rev = "refs/tags/github-release-${version}";
|
||||
hash = "sha256-UgwMTUkM9Z87dDH205swZFBeFhrcbLAxginViG40pBM=";
|
||||
hash = "sha256-ww9PpRmtz/M9IyLiZ8rAehx2UW4VpQt+svf4XfKBzKo=";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@ -6,13 +6,6 @@
|
||||
, pmix
|
||||
, gfortran
|
||||
, symlinkJoin
|
||||
# Disabled when cross-compiling
|
||||
# To fix cross compilation, we should fill the values in:
|
||||
# https://github.com/pmodels/mpich/blob/main/maint/fcrosscompile/cross_values.txt.in
|
||||
# For each arch
|
||||
, enableFortran ? stdenv.hostPlatform == stdenv.buildPlatform
|
||||
, perl
|
||||
, targetPackages
|
||||
}:
|
||||
|
||||
let
|
||||
@ -22,13 +15,10 @@ let
|
||||
paths = [ pmix.dev pmix.out ];
|
||||
};
|
||||
in mpich.overrideAttrs (old: {
|
||||
buildInputs = old.buildInputs ++ [
|
||||
buildInput = old.buildInputs ++ [
|
||||
libfabric
|
||||
pmixAll
|
||||
];
|
||||
nativeBuildInputs = old.nativeBuildInputs ++ [
|
||||
perl
|
||||
];
|
||||
configureFlags = [
|
||||
"--enable-shared"
|
||||
"--enable-sharedlib"
|
||||
@ -41,21 +31,10 @@ in mpich.overrideAttrs (old: {
|
||||
] ++ lib.optionals (lib.versionAtLeast gfortran.version "10") [
|
||||
"FFLAGS=-fallow-argument-mismatch" # https://github.com/pmodels/mpich/issues/4300
|
||||
"FCFLAGS=-fallow-argument-mismatch"
|
||||
] ++ lib.optionals (!enableFortran) [
|
||||
"--disable-fortran"
|
||||
];
|
||||
|
||||
preFixup = ''
|
||||
sed -i 's:^CC=.*:CC=${targetPackages.stdenv.cc}/bin/${targetPackages.stdenv.cc.targetPrefix}cc:' $out/bin/mpicc
|
||||
sed -i 's:^CXX=.*:CXX=${targetPackages.stdenv.cc}/bin/${targetPackages.stdenv.cc.targetPrefix}c++:' $out/bin/mpicxx
|
||||
'' + lib.optionalString enableFortran ''
|
||||
sed -i 's:^FC=.*:FC=${targetPackages.gfortran or gfortran}/bin/${targetPackages.gfortran.targetPrefix or gfortran.targetPrefix}gfortran:' $out/bin/mpifort
|
||||
'';
|
||||
|
||||
hardeningDisable = [ "all" ];
|
||||
|
||||
meta = old.meta // {
|
||||
maintainers = old.meta.maintainers ++ (with lib.maintainers.bsc; [ rarias ]);
|
||||
cross = true;
|
||||
};
|
||||
})
|
||||
|
||||
@ -1,219 +0,0 @@
|
||||
{ lib, fetchurl, fetchFromGitHub, callPackage
|
||||
, storeDir ? "/nix/store"
|
||||
, stateDir ? "/nix/var"
|
||||
, confDir ? "/etc"
|
||||
, boehmgc
|
||||
, stdenv, llvmPackages_6
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
common =
|
||||
{ lib, stdenv, fetchpatch, perl, curl, bzip2, sqlite, openssl ? null, xz
|
||||
, bash, coreutils, gzip, gnutar
|
||||
, pkg-config, boehmgc, perlPackages, libsodium, brotli, boost, editline, nlohmann_json
|
||||
, autoreconfHook, autoconf-archive, bison, flex, libxml2, libxslt, docbook5, docbook_xsl_ns
|
||||
, jq, libarchive, rustc, cargo
|
||||
# Used by tests
|
||||
, gmock
|
||||
, busybox-sandbox-shell
|
||||
, storeDir
|
||||
, stateDir
|
||||
, confDir
|
||||
, withLibseccomp ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) libseccomp.meta.platforms, libseccomp
|
||||
, withAWS ? stdenv.isLinux || stdenv.isDarwin, aws-sdk-cpp
|
||||
|
||||
, name, suffix ? "", src, crates ? null
|
||||
|
||||
}:
|
||||
let
|
||||
sh = busybox-sandbox-shell;
|
||||
nix = stdenv.mkDerivation rec {
|
||||
inherit name src;
|
||||
version = lib.getVersion name;
|
||||
|
||||
is24 = lib.versionAtLeast version "2.4pre";
|
||||
isExactly23 = lib.versionAtLeast version "2.3" && lib.versionOlder version "2.4";
|
||||
|
||||
VERSION_SUFFIX = suffix;
|
||||
|
||||
outputs = [ "out" "dev" "man" "doc" ];
|
||||
|
||||
nativeBuildInputs =
|
||||
[ pkg-config ]
|
||||
++ lib.optionals is24 [ autoreconfHook autoconf-archive bison flex libxml2 libxslt
|
||||
docbook5 docbook_xsl_ns jq gmock ];
|
||||
|
||||
buildInputs =
|
||||
[ curl openssl sqlite xz bzip2 nlohmann_json
|
||||
brotli boost editline
|
||||
]
|
||||
++ lib.optional (stdenv.isLinux || stdenv.isDarwin) libsodium
|
||||
++ lib.optionals is24 [ libarchive rustc cargo ]
|
||||
++ lib.optional withLibseccomp libseccomp
|
||||
++ lib.optional withAWS
|
||||
((aws-sdk-cpp.override {
|
||||
apis = ["s3" "transfer"];
|
||||
customMemoryManagement = false;
|
||||
}).overrideDerivation (args: {
|
||||
patches = args.patches or [] ++ [(fetchpatch {
|
||||
url = "https://github.com/edolstra/aws-sdk-cpp/commit/7d58e303159b2fb343af9a1ec4512238efa147c7.patch";
|
||||
sha256 = "103phn6kyvs1yc7fibyin3lgxz699qakhw671kl207484im55id1";
|
||||
})];
|
||||
}));
|
||||
|
||||
propagatedBuildInputs = [ boehmgc ];
|
||||
|
||||
# Seems to be required when using std::atomic with 64-bit types
|
||||
NIX_LDFLAGS = lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux" || stdenv.hostPlatform.system == "armv6l-linux") "-latomic";
|
||||
|
||||
preConfigure =
|
||||
# Copy libboost_context so we don't get all of Boost in our closure.
|
||||
# https://github.com/NixOS/nixpkgs/issues/45462
|
||||
''
|
||||
mkdir -p $out/lib
|
||||
cp -pd ${boost}/lib/{libboost_context*,libboost_thread*,libboost_system*} $out/lib
|
||||
rm -f $out/lib/*.a
|
||||
${lib.optionalString stdenv.isLinux ''
|
||||
chmod u+w $out/lib/*.so.*
|
||||
patchelf --set-rpath $out/lib:${stdenv.cc.cc.lib}/lib $out/lib/libboost_thread.so.*
|
||||
''}
|
||||
'' +
|
||||
# Unpack the Rust crates.
|
||||
lib.optionalString is24 ''
|
||||
tar xvf ${crates} -C nix-rust/
|
||||
mv nix-rust/nix-vendored-crates* nix-rust/vendor
|
||||
'' +
|
||||
# For Nix-2.3, patch around an issue where the Nix configure step pulls in the
|
||||
# build system's bash and other utilities when cross-compiling
|
||||
lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform && isExactly23) ''
|
||||
mkdir tmp/
|
||||
substitute corepkgs/config.nix.in tmp/config.nix.in \
|
||||
--subst-var-by bash ${bash}/bin/bash \
|
||||
--subst-var-by coreutils ${coreutils}/bin \
|
||||
--subst-var-by bzip2 ${bzip2}/bin/bzip2 \
|
||||
--subst-var-by gzip ${gzip}/bin/gzip \
|
||||
--subst-var-by xz ${xz}/bin/xz \
|
||||
--subst-var-by tar ${gnutar}/bin/tar \
|
||||
--subst-var-by tr ${coreutils}/bin/tr
|
||||
mv tmp/config.nix.in corepkgs/config.nix.in
|
||||
'';
|
||||
|
||||
configureFlags =
|
||||
[ "--with-store-dir=${storeDir}"
|
||||
"--localstatedir=${stateDir}"
|
||||
"--sysconfdir=${confDir}"
|
||||
"--disable-init-state"
|
||||
"--enable-gc"
|
||||
]
|
||||
++ lib.optionals stdenv.isLinux [
|
||||
"--with-sandbox-shell=${sh}/bin/busybox"
|
||||
]
|
||||
++ lib.optional (
|
||||
stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform ? nix && stdenv.hostPlatform.nix ? system
|
||||
) ''--with-system=${stdenv.hostPlatform.nix.system}''
|
||||
# RISC-V support in progress https://github.com/seccomp/libseccomp/pull/50
|
||||
++ lib.optional (!withLibseccomp) "--disable-seccomp-sandboxing";
|
||||
|
||||
makeFlags = [ "profiledir=$(out)/etc/profile.d" ];
|
||||
|
||||
installFlags = [ "sysconfdir=$(out)/etc" ];
|
||||
|
||||
doInstallCheck = false;
|
||||
|
||||
# socket path becomes too long otherwise
|
||||
#preInstallCheck = lib.optional stdenv.isDarwin ''
|
||||
# export TMPDIR=$NIX_BUILD_TOP
|
||||
#'';
|
||||
|
||||
separateDebugInfo = stdenv.isLinux;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
description = "Powerful package manager that makes package management reliable and reproducible";
|
||||
longDescription = ''
|
||||
Nix is a powerful package manager for Linux and other Unix systems that
|
||||
makes package management reliable and reproducible. It provides atomic
|
||||
upgrades and rollbacks, side-by-side installation of multiple versions of
|
||||
a package, multi-user package management and easy setup of build
|
||||
environments.
|
||||
'';
|
||||
homepage = "https://nixos.org/";
|
||||
license = lib.licenses.lgpl2Plus;
|
||||
maintainers = [ lib.maintainers.eelco ];
|
||||
platforms = lib.platforms.unix;
|
||||
outputsToInstall = [ "out" "man" ];
|
||||
};
|
||||
|
||||
passthru = {
|
||||
perl-bindings = stdenv.mkDerivation {
|
||||
pname = "nix-perl";
|
||||
inherit version;
|
||||
|
||||
inherit src;
|
||||
|
||||
postUnpack = "sourceRoot=$sourceRoot/perl";
|
||||
|
||||
# This is not cross-compile safe, don't have time to fix right now
|
||||
# but noting for future travellers.
|
||||
nativeBuildInputs =
|
||||
[ perl pkg-config curl nix libsodium boost autoreconfHook autoconf-archive ];
|
||||
|
||||
configureFlags =
|
||||
[ "--with-dbi=${perlPackages.DBI}/${perl.libPrefix}"
|
||||
"--with-dbd-sqlite=${perlPackages.DBDSQLite}/${perl.libPrefix}"
|
||||
];
|
||||
|
||||
preConfigure = "export NIX_STATE_DIR=$TMPDIR";
|
||||
|
||||
preBuild = "unset NIX_INDENT_MAKE";
|
||||
};
|
||||
};
|
||||
};
|
||||
in nix;
|
||||
|
||||
in rec {
|
||||
|
||||
nix = nixUnstable;
|
||||
|
||||
nixUnstable = lib.lowPrio (callPackage common rec {
|
||||
name = "nix-2.4${suffix}";
|
||||
suffix = "pre7534_b92f58f6";
|
||||
|
||||
#src = /home/Computational/rarias/nix/nix-rodarima;
|
||||
src = fetchFromGitHub {
|
||||
owner = "rodarima";
|
||||
repo = "nix";
|
||||
rev = "3a642187c33ed46d952d3a50a83b2576b704fab7";
|
||||
sha256 = "0s8is2czpkcj1x1kcjqgbnsbbl03w3fwjjiclsd44zh1ij3wb90s";
|
||||
};
|
||||
|
||||
crates = fetchurl {
|
||||
url = "https://hydra.nixos.org/build/118797694/download/1/nix-vendored-crates-2.4pre7534_b92f58f6.tar.xz";
|
||||
sha256 = "a4c2612bbd81732bbb899bc0c230e07b16f6b6150ffbb19c4907dedbbc2bf9fc";
|
||||
};
|
||||
|
||||
inherit storeDir stateDir confDir boehmgc;
|
||||
});
|
||||
|
||||
nixFlakes = lib.lowPrio (callPackage common rec {
|
||||
name = "nix-2.4${suffix}";
|
||||
suffix = "pre20200521_00b562c";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "NixOS";
|
||||
repo = "nix";
|
||||
rev = "00b562c87ec4c3bbe514f5dc1f4d1c41f66f66bf";
|
||||
sha256 = "0s8is2czpkcj1x1kcjqgbnsbbl03w3fwjjiclsd44zh1ij3wb90s";
|
||||
};
|
||||
|
||||
crates = fetchurl {
|
||||
url = "https://hydra.nixos.org/build/118093786/download/1/nix-vendored-crates-2.4pre20200501_941f952.tar.xz";
|
||||
sha256 = "060f4n5srdbb8vsj0m14aqch7im79a4h5g3nrs41p1xc602vhcdl";
|
||||
};
|
||||
|
||||
inherit storeDir stateDir confDir boehmgc;
|
||||
});
|
||||
|
||||
}
|
||||
@ -1,214 +0,0 @@
|
||||
{ lib, fetchurl, fetchFromGitHub, callPackage
|
||||
, storeDir ? "/nix/store"
|
||||
, stateDir ? "/nix/var"
|
||||
, confDir ? "/etc"
|
||||
, boehmgc
|
||||
, stdenv, llvmPackages_6
|
||||
, sandbox-shell ? "/bin/sh"
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
enableStatic = true;
|
||||
|
||||
common =
|
||||
{ lib, stdenv, fetchpatch, perl, curl, bzip2, sqlite, openssl ? null, xz
|
||||
, bash, coreutils, gzip, gnutar
|
||||
, pkg-config, boehmgc, perlPackages, libsodium, brotli, boost, editline, nlohmann_json
|
||||
, autoreconfHook, autoconf-archive, bison, flex, libxml2, libxslt, docbook5, docbook_xsl_ns
|
||||
, jq, libarchive
|
||||
# Used by tests
|
||||
, gmock
|
||||
, storeDir
|
||||
, stateDir
|
||||
, confDir
|
||||
, withLibseccomp ? lib.any (lib.meta.platformMatch stdenv.hostPlatform) libseccomp.meta.platforms, libseccomp
|
||||
, withAWS ? !enableStatic && (stdenv.isLinux || stdenv.isDarwin), aws-sdk-cpp
|
||||
, enableStatic ? true
|
||||
, name, suffix ? "", src
|
||||
|
||||
}:
|
||||
let
|
||||
nix = stdenv.mkDerivation rec {
|
||||
inherit name src;
|
||||
version = lib.getVersion name;
|
||||
|
||||
is24 = lib.versionAtLeast version "2.4pre";
|
||||
isExactly23 = lib.versionAtLeast version "2.3" && lib.versionOlder version "2.4";
|
||||
|
||||
VERSION_SUFFIX = suffix;
|
||||
|
||||
outputs = [ "out" "dev" "man" "doc" ];
|
||||
|
||||
nativeBuildInputs =
|
||||
[ pkg-config ]
|
||||
++ lib.optionals is24 [ autoreconfHook autoconf-archive bison flex libxml2 libxslt
|
||||
docbook5 docbook_xsl_ns jq ];
|
||||
|
||||
buildInputs =
|
||||
[ curl openssl sqlite xz bzip2 nlohmann_json
|
||||
brotli boost editline boehmgc
|
||||
]
|
||||
++ lib.optional (stdenv.isLinux || stdenv.isDarwin) libsodium
|
||||
++ lib.optionals is24 [ libarchive gmock ]
|
||||
++ lib.optional withLibseccomp libseccomp
|
||||
++ lib.optional withAWS
|
||||
((aws-sdk-cpp.override {
|
||||
apis = ["s3" "transfer"];
|
||||
customMemoryManagement = false;
|
||||
}).overrideDerivation (args: {
|
||||
patches = args.patches or [] ++ [(fetchpatch {
|
||||
url = "https://github.com/edolstra/aws-sdk-cpp/commit/7d58e303159b2fb343af9a1ec4512238efa147c7.patch";
|
||||
sha256 = "103phn6kyvs1yc7fibyin3lgxz699qakhw671kl207484im55id1";
|
||||
})];
|
||||
}));
|
||||
|
||||
propagatedBuildInputs = [ boehmgc ];
|
||||
|
||||
# Seems to be required when using std::atomic with 64-bit types
|
||||
NIX_LDFLAGS =
|
||||
# need to list libraries individually until
|
||||
# https://github.com/NixOS/nix/commit/3e85c57a6cbf46d5f0fe8a89b368a43abd26daba
|
||||
# is in a release
|
||||
lib.optionalString enableStatic "-lssl -lbrotlicommon -lssh2 -lz -lnghttp2 -lcrypto"
|
||||
|
||||
# need to detect it here until
|
||||
# https://github.com/NixOS/nix/commits/74b4737d8f0e1922ef5314a158271acf81cd79f8
|
||||
# is in a release
|
||||
+ lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux" || stdenv.hostPlatform.system == "armv6l-linux") "-latomic";
|
||||
|
||||
preConfigure =
|
||||
# Copy libboost_context so we don't get all of Boost in our closure.
|
||||
# https://github.com/NixOS/nixpkgs/issues/45462
|
||||
lib.optionalString (!enableStatic) ''
|
||||
mkdir -p $out/lib
|
||||
cp -pd ${boost}/lib/{libboost_context*,libboost_thread*,libboost_system*} $out/lib
|
||||
rm -f $out/lib/*.a
|
||||
${lib.optionalString stdenv.isLinux ''
|
||||
chmod u+w $out/lib/*.so.*
|
||||
patchelf --set-rpath $out/lib:${stdenv.cc.cc.lib}/lib $out/lib/libboost_thread.so.*
|
||||
''}
|
||||
'' +
|
||||
# For Nix-2.3, patch around an issue where the Nix configure step pulls in the
|
||||
# build system's bash and other utilities when cross-compiling
|
||||
lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform && isExactly23) ''
|
||||
mkdir tmp/
|
||||
substitute corepkgs/config.nix.in tmp/config.nix.in \
|
||||
--subst-var-by bash ${bash}/bin/bash \
|
||||
--subst-var-by coreutils ${coreutils}/bin \
|
||||
--subst-var-by bzip2 ${bzip2}/bin/bzip2 \
|
||||
--subst-var-by gzip ${gzip}/bin/gzip \
|
||||
--subst-var-by xz ${xz}/bin/xz \
|
||||
--subst-var-by tar ${gnutar}/bin/tar \
|
||||
--subst-var-by tr ${coreutils}/bin/tr
|
||||
mv tmp/config.nix.in corepkgs/config.nix.in
|
||||
'';
|
||||
|
||||
configureFlags =
|
||||
[ "--with-store-dir=${storeDir}"
|
||||
"--localstatedir=${stateDir}"
|
||||
"--sysconfdir=${confDir}"
|
||||
"--disable-init-state"
|
||||
"--enable-gc"
|
||||
]
|
||||
++ lib.optionals stdenv.isLinux [
|
||||
"--with-sandbox-shell=${sandbox-shell}"
|
||||
]
|
||||
++ lib.optional (
|
||||
stdenv.hostPlatform != stdenv.buildPlatform && stdenv.hostPlatform ? nix && stdenv.hostPlatform.nix ? system
|
||||
) ''--with-system=${stdenv.hostPlatform.nix.system}''
|
||||
# RISC-V support in progress https://github.com/seccomp/libseccomp/pull/50
|
||||
++ lib.optional (!withLibseccomp) "--disable-seccomp-sandboxing";
|
||||
|
||||
makeFlags = [ "profiledir=$(out)/etc/profile.d" ]
|
||||
++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) "PRECOMPILE_HEADERS=0";
|
||||
|
||||
installFlags = [ "sysconfdir=$(out)/etc" ];
|
||||
|
||||
doInstallCheck = true; # not cross
|
||||
|
||||
# socket path becomes too long otherwise
|
||||
preInstallCheck = lib.optional stdenv.isDarwin ''
|
||||
export TMPDIR=$NIX_BUILD_TOP
|
||||
'';
|
||||
|
||||
separateDebugInfo = stdenv.isLinux;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
description = "Powerful package manager that makes package management reliable and reproducible";
|
||||
longDescription = ''
|
||||
Nix is a powerful package manager for Linux and other Unix systems that
|
||||
makes package management reliable and reproducible. It provides atomic
|
||||
upgrades and rollbacks, side-by-side installation of multiple versions of
|
||||
a package, multi-user package management and easy setup of build
|
||||
environments.
|
||||
'';
|
||||
homepage = "https://nixos.org/";
|
||||
license = lib.licenses.lgpl2Plus;
|
||||
maintainers = [ lib.maintainers.eelco ];
|
||||
platforms = lib.platforms.unix;
|
||||
outputsToInstall = [ "out" "man" ];
|
||||
};
|
||||
|
||||
passthru = {
|
||||
perl-bindings = stdenv.mkDerivation {
|
||||
pname = "nix-perl";
|
||||
inherit version;
|
||||
|
||||
inherit src;
|
||||
|
||||
postUnpack = "sourceRoot=$sourceRoot/perl";
|
||||
|
||||
# This is not cross-compile safe, don't have time to fix right now
|
||||
# but noting for future travellers.
|
||||
nativeBuildInputs =
|
||||
[ perl pkg-config curl nix libsodium boost autoreconfHook autoconf-archive ];
|
||||
|
||||
configureFlags =
|
||||
[ "--with-dbi=${perlPackages.DBI}/${perl.libPrefix}"
|
||||
"--with-dbd-sqlite=${perlPackages.DBDSQLite}/${perl.libPrefix}"
|
||||
];
|
||||
|
||||
preConfigure = "export NIX_STATE_DIR=$TMPDIR";
|
||||
|
||||
preBuild = "unset NIX_INDENT_MAKE";
|
||||
};
|
||||
};
|
||||
};
|
||||
in nix;
|
||||
|
||||
in rec {
|
||||
|
||||
nix = nixStable;
|
||||
|
||||
nixStable = callPackage common (rec {
|
||||
name = "nix-2.3.7";
|
||||
src = fetchurl {
|
||||
url = "https://nixos.org/releases/nix/${name}/${name}.tar.xz";
|
||||
sha256 = "dd8f52849414e5a878afe7e797aa4e22bab77c875d9da5a38d5f1bada704e596";
|
||||
};
|
||||
|
||||
inherit storeDir stateDir confDir boehmgc;
|
||||
} // lib.optionalAttrs stdenv.cc.isClang {
|
||||
stdenv = llvmPackages_6.stdenv;
|
||||
});
|
||||
|
||||
nixUnstable = lib.lowPrio (callPackage common rec {
|
||||
name = "nix-2.4${suffix}";
|
||||
suffix = "pre20200721_ff314f1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "NixOS";
|
||||
repo = "nix";
|
||||
rev = "ff314f186e3f91d87af6ad96c0ae3b472494b940";
|
||||
hash = "sha256-QibpLo4/gf2xYGoeQcgjZzH/qy5TBRVH+QCHgqOwur0=";
|
||||
};
|
||||
|
||||
inherit storeDir stateDir confDir boehmgc;
|
||||
});
|
||||
|
||||
nixFlakes = nixUnstable;
|
||||
|
||||
}
|
||||
@ -1,17 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This post build hook sends the closure of the just built derivation to the
|
||||
# target machine. In our case this is the MareNostrum4 cluster.
|
||||
|
||||
# set -e fails as the profile runs some erroring programs
|
||||
# We need the profile to load nix in the $PATH
|
||||
. /etc/profile
|
||||
|
||||
set -eu
|
||||
set -f # disable globbing
|
||||
export IFS=' '
|
||||
nixroot=/gpfs/projects/bsc15/nix
|
||||
store=$nixroot/nix/store
|
||||
target=ssh://mn
|
||||
|
||||
nix copy --to $target $OUT_PATHS
|
||||
@ -1,22 +0,0 @@
|
||||
{
|
||||
stdenv
|
||||
, lib
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "nixgen";
|
||||
version = "0.0.1";
|
||||
src = ./nixgen;
|
||||
dontUnpack = true;
|
||||
phases = [ "installPhase" ];
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp -a $src $out/bin/nixgen
|
||||
'';
|
||||
meta = {
|
||||
description = "Quickly generate flake.nix from command line";
|
||||
maintainers = with lib.maintainers.bsc; [ rarias ];
|
||||
platforms = lib.platforms.linux;
|
||||
license = lib.licenses.gpl3Plus;
|
||||
};
|
||||
}
|
||||
@ -1,97 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2025, Barcelona Supercomputing Center (BSC)
|
||||
# SPDX-License-Identifier: GPL-3.0+
|
||||
# Author: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
|
||||
|
||||
function usage() {
|
||||
echo "USAGE: nixgen [-f] [package [...]] [-b package [...]]" >&2
|
||||
echo " Generates a flake.nix file with the given packages." >&2
|
||||
echo " After flake.nix is created, use 'nix develop' to enter the shell." >&2
|
||||
echo "OPTIONS" >&2
|
||||
echo " -f Overwrite existing flake.nix (default: no)." >&2
|
||||
echo " packages... Add these packages to the shell." >&2
|
||||
echo " -b packages... Add the dependencies needed to build these packages." >&2
|
||||
echo "EXAMPLE" >&2
|
||||
echo " $ nixgen ovni bigotes -b nosv tampi" >&2
|
||||
echo " Adds the packages ovni and bigotes as well as all required dependencies" >&2
|
||||
echo " to build nosv and tampi." >&2
|
||||
echo "AUTHOR" >&2
|
||||
echo " Rodrigo Arias Mallo <rodrigo.arias@bsc.es>" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
mode=package
|
||||
packages=
|
||||
inputsFrom=
|
||||
force=
|
||||
|
||||
if [[ $# -eq 0 ]]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in -b)
|
||||
mode=build
|
||||
shift
|
||||
;;
|
||||
-f)
|
||||
force=1
|
||||
shift
|
||||
;;
|
||||
-h)
|
||||
usage
|
||||
;;
|
||||
-*|--*)
|
||||
echo "error: unknown option $1" >&2
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
if [ "$mode" == "package" ]; then
|
||||
packages+="${packages:+ }$1"
|
||||
else
|
||||
inputsFrom+="${inputsFrom:+ }$1"
|
||||
fi
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ ! "$force" -a -e flake.nix ]; then
|
||||
echo "error: flake.nix exists, force overwrite with -f" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cat > flake.nix <<EOF
|
||||
{
|
||||
inputs.jungle.url = "git+https://jungle.bsc.es/git/rarias/jungle";
|
||||
outputs = { self, jungle }:
|
||||
let
|
||||
nixpkgs = jungle.inputs.nixpkgs;
|
||||
customOverlay = (final: prev: {
|
||||
# Example overlay, for now empty
|
||||
});
|
||||
pkgs = import nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
overlays = [
|
||||
# Apply jungle overlay to get our BSC custom packages
|
||||
jungle.outputs.bscOverlay
|
||||
# And on top apply our local changes to customize for cluster
|
||||
customOverlay
|
||||
];
|
||||
};
|
||||
in {
|
||||
devShells.x86_64-linux.default = pkgs.mkShell {
|
||||
pname = "devshell";
|
||||
# Include these packages in the shell
|
||||
packages = with pkgs; [
|
||||
$packages
|
||||
];
|
||||
# The dependencies needed to build these packages will be also included
|
||||
inputsFrom = with pkgs; [
|
||||
$inputsFrom
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
EOF
|
||||
@ -3,6 +3,7 @@
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, perl
|
||||
, numactl
|
||||
, hwloc
|
||||
, boost
|
||||
@ -10,23 +11,22 @@
|
||||
, ovni
|
||||
, nosv
|
||||
, clangOmpss2
|
||||
, which
|
||||
, useGit ? false
|
||||
, gitUrl ? "ssh://git@gitlab-internal.bsc.es/nos-v/nodes.git"
|
||||
, gitBranch ? "master"
|
||||
, gitCommit ? "511489e71504a44381e0930562e7ac80ac69a848" # version-1.4
|
||||
, gitCommit ? "6002ec9ae6eb876d962cc34366952a3b26599ba6"
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
release = rec {
|
||||
version = "1.4";
|
||||
version = "1.3";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bsc-pm";
|
||||
repo = "nodes";
|
||||
rev = "version-${version}";
|
||||
hash = "sha256-+lR/R0l3fGZO3XG7whMorFW2y2YZ0ZFnLeOHyQYrAsQ=";
|
||||
hash = "sha256-cFb9pxcjtkMmH0CsGgUO9LTdXDNh7MCqicgGWawLrsU=";
|
||||
};
|
||||
};
|
||||
|
||||
@ -59,7 +59,6 @@ in
|
||||
doCheck = false;
|
||||
nativeCheckInputs = [
|
||||
clangOmpss2
|
||||
which
|
||||
];
|
||||
|
||||
# The "bindnow" flags are incompatible with ifunc resolution mechanism. We
|
||||
|
||||
@ -13,19 +13,19 @@
|
||||
, useGit ? false
|
||||
, gitUrl ? "git@gitlab-internal.bsc.es:nos-v/nos-v.git"
|
||||
, gitBranch ? "master"
|
||||
, gitCommit ? "1108e4786b58e0feb9a16fa093010b763eb2f8e8" # version 4.0.0
|
||||
, gitCommit ? "9f47063873c3aa9d6a47482a82c5000a8c813dd8"
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
release = rec {
|
||||
version = "4.0.0";
|
||||
version = "3.2.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bsc-pm";
|
||||
repo = "nos-v";
|
||||
rev = "${version}";
|
||||
hash = "sha256-llaq73bd/YxLVKNlMebnUHKa4z3sdcsuDUoVwUxNuw8=";
|
||||
hash = "sha256-yaz92426EM8trdkBJlISmAoG9KJCDTvoAW/HKrasvOw=";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@ -1,120 +0,0 @@
|
||||
{ stdenv, lib, fetchurl, fetchpatch, gfortran, perl, libnl
|
||||
, rdma-core, zlib, numactl, libevent, hwloc, targetPackages, symlinkJoin
|
||||
, libpsm2, libfabric, pmix, pmi2, ucx
|
||||
|
||||
# Enable CUDA support
|
||||
, cudaSupport ? false, cudatoolkit ? null
|
||||
|
||||
# Enable the Sun Grid Engine bindings
|
||||
, enableSGE ? false
|
||||
|
||||
# Pass PATH/LD_LIBRARY_PATH to point to current mpirun by default
|
||||
, enablePrefix ? false
|
||||
|
||||
# Enable libfabric support (necessary for Omnipath networks) on x86_64 linux
|
||||
, fabricSupport ? stdenv.isLinux && stdenv.isx86_64
|
||||
|
||||
# Enable mpi_cxx.so
|
||||
, enableCxx ? false
|
||||
|
||||
}:
|
||||
|
||||
assert !cudaSupport || cudatoolkit != null;
|
||||
|
||||
let
|
||||
version = "4.0.4";
|
||||
|
||||
cudatoolkit_joined = symlinkJoin {
|
||||
name = "${cudatoolkit.name}-unsplit";
|
||||
paths = [ cudatoolkit.out cudatoolkit.lib ];
|
||||
};
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "openmpi";
|
||||
inherit version;
|
||||
|
||||
src = with lib.versions; fetchurl {
|
||||
url = "https://www.open-mpi.org/software/ompi/v${major version}.${minor version}/downloads/${pname}-${version}.tar.bz2";
|
||||
sha256 = "1i0slg2dxjdgw513aml1n9dsbdxn2fimi2b5712d5r9z4ar4xqj7";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs ./
|
||||
|
||||
# Ensure build is reproducible
|
||||
ts=`date -d @$SOURCE_DATE_EPOCH`
|
||||
sed -i 's/OPAL_CONFIGURE_USER=.*/OPAL_CONFIGURE_USER="nixbld"/' configure
|
||||
sed -i 's/OPAL_CONFIGURE_HOST=.*/OPAL_CONFIGURE_HOST="localhost"/' configure
|
||||
sed -i "s/OPAL_CONFIGURE_DATE=.*/OPAL_CONFIGURE_DATE=\"$ts\"/" configure
|
||||
find -name "Makefile.in" -exec sed -i "s/\`date\`/$ts/" \{} \;
|
||||
'';
|
||||
|
||||
buildInputs = with stdenv; [ gfortran zlib ]
|
||||
++ lib.optionals isLinux [ libnl numactl pmix ucx ]
|
||||
++ lib.optionals cudaSupport [ cudatoolkit ]
|
||||
++ [ libevent hwloc ]
|
||||
++ lib.optional (isLinux || isFreeBSD) rdma-core
|
||||
++ lib.optional fabricSupport [ libpsm2 libfabric ];
|
||||
|
||||
nativeBuildInputs = [ perl ];
|
||||
|
||||
configureFlags = with stdenv; lib.optional (!cudaSupport) "--disable-mca-dso"
|
||||
++ lib.optionals isLinux [
|
||||
"--with-libnl=${libnl.dev}"
|
||||
"--with-pmix=${pmix}"
|
||||
"--with-pmix-libdir=${pmix}/lib"
|
||||
"--with-pmi=${pmi2}"
|
||||
"--with-pmi-libdir=${pmi2}/lib"
|
||||
] ++ lib.optional enableSGE "--with-sge"
|
||||
++ lib.optional enablePrefix "--enable-mpirun-prefix-by-default"
|
||||
# TODO: add UCX support, which is recommended to use with cuda for the most robust OpenMPI build
|
||||
# https://github.com/openucx/ucx
|
||||
# https://www.open-mpi.org/faq/?category=buildcuda
|
||||
++ lib.optionals cudaSupport [ "--with-cuda=${cudatoolkit_joined}" "--enable-dlopen" ]
|
||||
++ lib.optionals fabricSupport [ "--with-psm2=${libpsm2}" "--with-libfabric=${libfabric}" ]
|
||||
++ lib.optional enableCxx "--enable-mpi-cxx"
|
||||
;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
hardeningDisable = [ "all" ];
|
||||
|
||||
postInstall = ''
|
||||
rm -f $out/lib/*.la
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
# default compilers should be indentical to the
|
||||
# compilers at build time
|
||||
|
||||
sed -i 's:compiler=.*:compiler=${targetPackages.stdenv.cc}/bin/${targetPackages.stdenv.cc.targetPrefix}cc:' \
|
||||
$out/share/openmpi/mpicc-wrapper-data.txt
|
||||
|
||||
sed -i 's:compiler=.*:compiler=${targetPackages.stdenv.cc}/bin/${targetPackages.stdenv.cc.targetPrefix}cc:' \
|
||||
$out/share/openmpi/ortecc-wrapper-data.txt
|
||||
|
||||
sed -i 's:compiler=.*:compiler=${targetPackages.stdenv.cc}/bin/${targetPackages.stdenv.cc.targetPrefix}c++:' \
|
||||
$out/share/openmpi/mpic++-wrapper-data.txt
|
||||
|
||||
sed -i 's:compiler=.*:compiler=${gfortran}/bin/${gfortran.targetPrefix}gfortran:' \
|
||||
$out/share/openmpi/mpifort-wrapper-data.txt
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
passthru = {
|
||||
inherit cudaSupport cudatoolkit;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.open-mpi.org/";
|
||||
description = "Open source MPI-3 implementation";
|
||||
longDescription = "The Open MPI Project is an open source MPI-3 implementation that is developed and maintained by a consortium of academic, research, and industry partners. Open MPI is therefore able to combine the expertise, technologies, and resources from all across the High Performance Computing community in order to build the best MPI library available. Open MPI offers advantages for system and software vendors, application developers and computer science researchers.";
|
||||
maintainers = with maintainers; [ markuskowa ];
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.unix;
|
||||
# In order to use OpenMPI with Extrae we need to keep the Extrae libraries
|
||||
# rather than the ones from OpenMPI. This happens with libompitrace.so, so
|
||||
# we set to a lower priority (higher value) the OpenMPI package.
|
||||
priority = 10;
|
||||
};
|
||||
}
|
||||
@ -1,117 +0,0 @@
|
||||
{ stdenv, lib, fetchurl, fetchpatch, gfortran, perl, libnl
|
||||
, rdma-core, zlib, numactl, libevent, hwloc, targetPackages, symlinkJoin
|
||||
, libpsm2, libfabric
|
||||
|
||||
# Enable CUDA support
|
||||
, cudaSupport ? false, cudatoolkit ? null
|
||||
|
||||
# Enable the Sun Grid Engine bindings
|
||||
, enableSGE ? false
|
||||
|
||||
# Pass PATH/LD_LIBRARY_PATH to point to current mpirun by default
|
||||
, enablePrefix ? false
|
||||
|
||||
# Enable libfabric support (necessary for Omnipath networks) on x86_64 linux
|
||||
, fabricSupport ? stdenv.isLinux && stdenv.isx86_64
|
||||
|
||||
# Enable mpi_cxx.so
|
||||
, enableCxx ? false
|
||||
|
||||
, slurm
|
||||
|
||||
}:
|
||||
|
||||
assert !cudaSupport || cudatoolkit != null;
|
||||
|
||||
let
|
||||
version = "4.0.3";
|
||||
|
||||
cudatoolkit_joined = symlinkJoin {
|
||||
name = "${cudatoolkit.name}-unsplit";
|
||||
paths = [ cudatoolkit.out cudatoolkit.lib ];
|
||||
};
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "openmpi";
|
||||
inherit version;
|
||||
|
||||
src = with lib.versions; fetchurl {
|
||||
url = "https://www.open-mpi.org/software/ompi/v${major version}.${minor version}/downloads/${pname}-${version}.tar.bz2";
|
||||
sha256 = "00zxcw99gr5n693cmcmn4f6a47vx1ywna895p0x7p163v37gw0hl";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs ./
|
||||
|
||||
# Ensure build is reproducible
|
||||
ts=`date -d @$SOURCE_DATE_EPOCH`
|
||||
sed -i 's/OPAL_CONFIGURE_USER=.*/OPAL_CONFIGURE_USER="nixbld"/' configure
|
||||
sed -i 's/OPAL_CONFIGURE_HOST=.*/OPAL_CONFIGURE_HOST="localhost"/' configure
|
||||
sed -i "s/OPAL_CONFIGURE_DATE=.*/OPAL_CONFIGURE_DATE=\"$ts\"/" configure
|
||||
find -name "Makefile.in" -exec sed -i "s/\`date\`/$ts/" \{} \;
|
||||
'';
|
||||
|
||||
buildInputs = with stdenv; [ gfortran zlib ]
|
||||
++ lib.optionals isLinux [ libnl numactl ]
|
||||
++ lib.optionals cudaSupport [ cudatoolkit ]
|
||||
++ [ libevent hwloc ]
|
||||
++ lib.optional (isLinux || isFreeBSD) rdma-core
|
||||
++ lib.optional fabricSupport [ libpsm2 libfabric ]
|
||||
++ [ slurm ];
|
||||
|
||||
nativeBuildInputs = [ perl ];
|
||||
|
||||
configureFlags = with stdenv; lib.optional (!cudaSupport) "--disable-mca-dso"
|
||||
++ lib.optional isLinux "--with-libnl=${libnl.dev}"
|
||||
++ lib.optional enableSGE "--with-sge"
|
||||
++ lib.optional enablePrefix "--enable-mpirun-prefix-by-default"
|
||||
# TODO: add UCX support, which is recommended to use with cuda for the most robust OpenMPI build
|
||||
# https://github.com/openucx/ucx
|
||||
# https://www.open-mpi.org/faq/?category=buildcuda
|
||||
++ lib.optionals cudaSupport [ "--with-cuda=${cudatoolkit_joined}" "--enable-dlopen" ]
|
||||
++ lib.optionals fabricSupport [ "--with-psm2=${libpsm2}" "--with-libfabric=${libfabric}" ]
|
||||
++ lib.optional enableCxx "--enable-mpi-cxx"
|
||||
++ [ "--with-slurm=${slurm}" "--with-pmi" "--enable-static" "--disable-dlopen" ]
|
||||
;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postInstall = ''
|
||||
rm -f $out/lib/*.la
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
# default compilers should be indentical to the
|
||||
# compilers at build time
|
||||
|
||||
sed -i 's:compiler=.*:compiler=${targetPackages.stdenv.cc}/bin/${targetPackages.stdenv.cc.targetPrefix}cc:' \
|
||||
$out/share/openmpi/mpicc-wrapper-data.txt
|
||||
|
||||
sed -i 's:compiler=.*:compiler=${targetPackages.stdenv.cc}/bin/${targetPackages.stdenv.cc.targetPrefix}cc:' \
|
||||
$out/share/openmpi/ortecc-wrapper-data.txt
|
||||
|
||||
sed -i 's:compiler=.*:compiler=${targetPackages.stdenv.cc}/bin/${targetPackages.stdenv.cc.targetPrefix}c++:' \
|
||||
$out/share/openmpi/mpic++-wrapper-data.txt
|
||||
|
||||
sed -i 's:compiler=.*:compiler=${gfortran}/bin/${gfortran.targetPrefix}gfortran:' \
|
||||
$out/share/openmpi/mpifort-wrapper-data.txt
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
passthru = {
|
||||
inherit cudaSupport cudatoolkit;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://www.open-mpi.org/";
|
||||
description = "Open source MPI-3 implementation";
|
||||
longDescription = "The Open MPI Project is an open source MPI-3 implementation that is developed and maintained by a consortium of academic, research, and industry partners. Open MPI is therefore able to combine the expertise, technologies, and resources from all across the High Performance Computing community in order to build the best MPI library available. Open MPI offers advantages for system and software vendors, application developers and computer science researchers.";
|
||||
maintainers = with maintainers; [ markuskowa ];
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.unix;
|
||||
# In order to use OpenMPI with Extrae we need to keep the Extrae libraries
|
||||
# rather than the ones from OpenMPI. This happens with libompitrace.so, so
|
||||
# we set to a lower priority (higher value) the OpenMPI package.
|
||||
priority = 10;
|
||||
};
|
||||
}
|
||||
@ -32,11 +32,6 @@ stdenv.mkDerivation rec {
|
||||
"CXX=mpicxx"
|
||||
];
|
||||
|
||||
env = {
|
||||
MPICH_CC="${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc";
|
||||
MPICH_CXX="${stdenv.cc}/bin/${stdenv.cc.targetPrefix}c++";
|
||||
};
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/bin
|
||||
for f in $(find $out -executable -type f); do
|
||||
@ -49,6 +44,5 @@ stdenv.mkDerivation rec {
|
||||
homepage = "http://mvapich.cse.ohio-state.edu/benchmarks/";
|
||||
maintainers = [ ];
|
||||
platforms = lib.platforms.all;
|
||||
cross = true;
|
||||
};
|
||||
}
|
||||
|
||||
@ -1,17 +0,0 @@
|
||||
{
|
||||
stdenv
|
||||
#, mkDerivation
|
||||
, fetchurl
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.2.18";
|
||||
pname = "otf";
|
||||
src = fetchurl {
|
||||
url =
|
||||
"http://paratools01.rrp.net/wp-content/uploads/2016/06/OTF-SRC-${version}.tar.gz";
|
||||
sha256 = "10k1hyyn6w4lf5kbn1krfacaspvn1xg3qgn4027xal3hjf3kkxap";
|
||||
};
|
||||
|
||||
patches = [ ./printf.patch ];
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
--- a/tools/otfconfig/otfconfig.c 2020-11-21 13:55:23.195530435 +0100
|
||||
+++ b/tools/otfconfig/otfconfig.c 2020-11-21 13:55:53.112402154 +0100
|
||||
@@ -75,7 +75,7 @@ int main( int argc, char** argv ) {
|
||||
|
||||
strcat( tmp, "\n" );
|
||||
|
||||
- printf( tmp );
|
||||
+ printf("%s", tmp );
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
, useGit ? false
|
||||
, gitBranch ? "master"
|
||||
, gitUrl ? "ssh://git@bscpm04.bsc.es/rarias/ovni.git"
|
||||
, gitCommit ? "06432668f346c8bdc1006fabc23e94ccb81b0d8b" # version 1.13.0
|
||||
, gitCommit ? "e4f62382076f0cf0b1d08175cf57cc0bc51abc61"
|
||||
, enableDebug ? false
|
||||
# Only enable MPI if the build is native (fails on cross-compilation)
|
||||
, useMpi ? (stdenv.buildPlatform.canExecute stdenv.hostPlatform)
|
||||
@ -15,13 +15,13 @@
|
||||
|
||||
let
|
||||
release = rec {
|
||||
version = "1.13.0";
|
||||
version = "1.12.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bsc-pm";
|
||||
repo = "ovni";
|
||||
rev = "${version}";
|
||||
hash = "sha256-0l2ryIyWNiZqeYdVlnj/WnQGS3xFCY4ICG8JedX424w=";
|
||||
} // { shortRev = "0643266"; };
|
||||
hash = "sha256-H04JvsVKrdqr3ON7JhU0g17jjlg/jzQ7eTfx9vUNd3E=";
|
||||
} // { shortRev = "a73afcf"; };
|
||||
};
|
||||
|
||||
git = rec {
|
||||
|
||||
@ -1,84 +0,0 @@
|
||||
{ lib, stdenv, kernel, elfutils, python2, python3, perl, newt, slang, asciidoc, xmlto, makeWrapper
|
||||
, docbook_xsl, docbook_xml_dtd_45, libxslt, flex, bison, pkg-config, libunwind, binutils
|
||||
, libiberty, audit, libbfd, libopcodes, openssl, systemtap, numactl
|
||||
, zlib, withGtk ? false, gtk2 ? null
|
||||
, babeltrace
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
assert withGtk -> gtk2 != null;
|
||||
assert versionAtLeast kernel.version "3.12";
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "perf-linux-${kernel.version}";
|
||||
|
||||
inherit (kernel) src;
|
||||
|
||||
preConfigure = ''
|
||||
cd tools/perf
|
||||
|
||||
substituteInPlace Makefile \
|
||||
--replace /usr/include/elfutils $elfutils/include/elfutils
|
||||
|
||||
for x in util/build-id.c util/dso.c; do
|
||||
substituteInPlace $x --replace /usr/lib/debug /run/current-system/sw/lib/debug
|
||||
done
|
||||
|
||||
if [ -f bash_completion ]; then
|
||||
sed -i 's,^have perf,_have perf,' bash_completion
|
||||
fi
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"prefix=$(out)"
|
||||
"WERROR=0"
|
||||
"LIBBABELTRACE=1"
|
||||
"LIBBABELTRACE_DIR=${babeltrace}"
|
||||
] ++ kernel.makeFlags;
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
# perf refers both to newt and slang
|
||||
nativeBuildInputs = [
|
||||
asciidoc xmlto docbook_xsl docbook_xml_dtd_45 libxslt
|
||||
flex bison libiberty audit makeWrapper pkg-config python3
|
||||
];
|
||||
buildInputs = [
|
||||
elfutils newt slang libunwind libbfd zlib openssl systemtap.stapBuild numactl
|
||||
libopcodes python3 perl babeltrace
|
||||
] ++ lib.optional withGtk gtk2
|
||||
++ (if (versionAtLeast kernel.version "4.19") then [ python3 ] else [ python2 ]);
|
||||
|
||||
# Note: we don't add elfutils to buildInputs, since it provides a
|
||||
# bad `ld' and other stuff.
|
||||
NIX_CFLAGS_COMPILE = toString [
|
||||
"-Wno-error=cpp"
|
||||
"-Wno-error=bool-compare"
|
||||
"-Wno-error=deprecated-declarations"
|
||||
"-DOBJDUMP_PATH=\"${binutils}/bin/objdump\""
|
||||
"-Wno-error=stringop-truncation"
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs scripts/bpf_helpers_doc.py
|
||||
'';
|
||||
|
||||
doCheck = false; # requires "sparse"
|
||||
doInstallCheck = false; # same
|
||||
|
||||
separateDebugInfo = true;
|
||||
installFlags = [ "install" "install-man" "ASCIIDOC8=1" "prefix=$(out)" ];
|
||||
|
||||
preFixup = ''
|
||||
wrapProgram $out/bin/perf \
|
||||
--prefix PATH : "${binutils}/bin"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://perf.wiki.kernel.org/";
|
||||
description = "Linux tools to profile with performance counters";
|
||||
maintainers = with lib.maintainers; [viric];
|
||||
platforms = with lib.platforms; linux;
|
||||
};
|
||||
}
|
||||
@ -1,48 +0,0 @@
|
||||
{ stdenv, lib, fetchFromGitHub, perl, autoconf, automake
|
||||
, libtool, flex, libevent, hwloc, munge, zlib
|
||||
} :
|
||||
|
||||
let
|
||||
version = "2.2.4";
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
pname = "pmix";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "openpmix";
|
||||
owner = "openpmix";
|
||||
rev = "v${version}";
|
||||
sha256 = "1wc4sbnbg20lp6l6pk1sawrf5wrdajcijd1cmrpp1d6h9nv23ggv";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs ./autogen.pl
|
||||
patchShebangs ./config
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ perl autoconf automake libtool flex ];
|
||||
|
||||
buildInputs = [ libevent hwloc munge zlib ];
|
||||
|
||||
configureFlags = [
|
||||
"--with-libevent=${libevent.dev}"
|
||||
"--with-munge=${munge}"
|
||||
"--with-hwloc=${hwloc.dev}"
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
./autogen.pl
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Process Management Interface for HPC environments";
|
||||
homepage = "https://openpmix.github.io/";
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.markuskowa ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
||||
@ -1,58 +0,0 @@
|
||||
{ stdenv, lib, fetchFromGitHub, cmake, pkg-config, docutils
|
||||
, pandoc, ethtool, iproute, libnl, udev, python, perl
|
||||
, makeWrapper
|
||||
} :
|
||||
|
||||
let
|
||||
version = "31.1";
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
pname = "rdma-core";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "linux-rdma";
|
||||
repo = "rdma-core";
|
||||
rev = "v${version}";
|
||||
sha256 = "1xkmdix6mgv6kjjj6wi844bfddhl0ybalrp5g8pf5izasc43brg7";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config pandoc docutils makeWrapper ];
|
||||
buildInputs = [ libnl ethtool iproute udev python perl ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_INSTALL_RUNDIR=/run"
|
||||
"-DCMAKE_INSTALL_SHAREDSTATEDIR=/var/lib"
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace srp_daemon/srp_daemon.sh.in \
|
||||
--replace /bin/rm rm
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
# cmake script is buggy, move file manually
|
||||
mkdir -p $out/${perl.libPrefix}
|
||||
mv $out/share/perl5/* $out/${perl.libPrefix}
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
for pls in $out/bin/{ibfindnodesusing.pl,ibidsverify.pl}; do
|
||||
echo "wrapping $pls"
|
||||
chmod +x "$pls"
|
||||
wrapProgram $pls --prefix PERL5LIB : "$out/${perl.libPrefix}"
|
||||
done
|
||||
|
||||
# Remove the binaries as they pull systemd
|
||||
rm -rf $out/bin
|
||||
rm -rf $out/sbin
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "RDMA Core Userspace Libraries and Daemons";
|
||||
homepage = "https://github.com/linux-rdma/rdma-core";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ markuskowa ];
|
||||
};
|
||||
}
|
||||
@ -35,6 +35,5 @@ stdenv.mkDerivation rec {
|
||||
maintainers = with lib.maintainers.bsc; [ rarias ];
|
||||
platforms = lib.platforms.linux;
|
||||
license = lib.licenses.mit;
|
||||
cross = true;
|
||||
};
|
||||
}
|
||||
|
||||
@ -5,14 +5,23 @@
|
||||
, automake
|
||||
, autoconf
|
||||
, libtool
|
||||
, mpi
|
||||
, autoreconfHook
|
||||
, gpi-2
|
||||
, boost
|
||||
, numactl
|
||||
, rdma-core
|
||||
, gfortran
|
||||
, symlinkJoin
|
||||
}:
|
||||
|
||||
let
|
||||
mpiAll = symlinkJoin {
|
||||
name = "mpi-all";
|
||||
paths = [ mpi.all ];
|
||||
};
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tagaspi";
|
||||
enableParallelBuilding = true;
|
||||
@ -26,18 +35,16 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-RGG/Re2uM293HduZfGzKUWioDtwnSYYdfeG9pVrX9EM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
buildInputs = [
|
||||
autoreconfHook
|
||||
automake
|
||||
autoconf
|
||||
libtool
|
||||
gfortran
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
numactl
|
||||
rdma-core
|
||||
gfortran
|
||||
mpiAll
|
||||
];
|
||||
|
||||
dontDisableStatic = true;
|
||||
@ -56,6 +63,5 @@ stdenv.mkDerivation rec {
|
||||
maintainers = with lib.maintainers.bsc; [ rarias ];
|
||||
platforms = lib.platforms.linux;
|
||||
license = lib.licenses.gpl3Plus;
|
||||
cross = false; # gpi-2 cannot cross
|
||||
};
|
||||
}
|
||||
|
||||
@ -68,6 +68,5 @@ in stdenv.mkDerivation {
|
||||
maintainers = with lib.maintainers.bsc; [ rarias ];
|
||||
platforms = lib.platforms.linux;
|
||||
license = lib.licenses.gpl3Plus;
|
||||
cross = true;
|
||||
};
|
||||
}
|
||||
|
||||
@ -1,263 +0,0 @@
|
||||
--- a/src/CMakeLists.txt 2020-11-21 14:05:24.912896596 +0100
|
||||
+++ b/src/CMakeLists.txt 2020-11-21 14:19:30.978284644 +0100
|
||||
@@ -130,8 +130,7 @@ SET(VITE_HDRS
|
||||
# Plugin header
|
||||
plugin/Command_window.hpp
|
||||
plugin/Plugin_window.hpp
|
||||
- plugin/Plugin.hpp
|
||||
- )
|
||||
+ plugin/Plugin.hpp)
|
||||
|
||||
SET(VITE_UIS
|
||||
interface/info_window.ui
|
||||
@@ -142,8 +141,7 @@ SET(VITE_UIS
|
||||
interface/list_of_counter_to_export.ui
|
||||
interface/node_select.ui
|
||||
interface/interval_select.ui
|
||||
- interface/statistics.ui
|
||||
- )
|
||||
+ interface/statistics.ui)
|
||||
|
||||
SET(VITE_SRCS
|
||||
# Messages & Errors
|
||||
@@ -220,29 +218,23 @@ SET(VITE_SRCS
|
||||
core/Core.cpp
|
||||
core/getopt.c
|
||||
# Main
|
||||
- main.cpp
|
||||
- )
|
||||
+ main.cpp)
|
||||
|
||||
-SET(VITE_RCCS
|
||||
- interface/vite.qrc
|
||||
- )
|
||||
+SET(VITE_RCCS interface/vite.qrc)
|
||||
|
||||
#############################################
|
||||
# QtColorPicker
|
||||
#############################################
|
||||
set(QTCOLORPICKERDIR
|
||||
- ${CMAKE_SOURCE_DIR}/externals/qtcolorpicker/src
|
||||
- )
|
||||
+ ${CMAKE_SOURCE_DIR}/externals/qtcolorpicker/src)
|
||||
|
||||
set(VITE_HDRS
|
||||
${VITE_HDRS}
|
||||
- ${QTCOLORPICKERDIR}/qtcolorpicker.h
|
||||
- )
|
||||
+ ${QTCOLORPICKERDIR}/qtcolorpicker.h)
|
||||
|
||||
set(VITE_SRCS
|
||||
${VITE_SRCS}
|
||||
- ${QTCOLORPICKERDIR}/qtcolorpicker.cpp
|
||||
- )
|
||||
+ ${QTCOLORPICKERDIR}/qtcolorpicker.cpp)
|
||||
|
||||
#############################################
|
||||
# VBO
|
||||
@@ -252,15 +244,13 @@ IF(VITE_ENABLE_VBO)
|
||||
${VITE_HDRS}
|
||||
render/vbo.hpp
|
||||
render/Shader.hpp
|
||||
- render/Render_alternate.hpp
|
||||
- )
|
||||
+ render/Render_alternate.hpp)
|
||||
|
||||
SET(VITE_SRCS
|
||||
${VITE_SRCS}
|
||||
render/vbo.cpp
|
||||
render/Shader.cpp
|
||||
- render/Render_alternate.cpp
|
||||
- )
|
||||
+ render/Render_alternate.cpp)
|
||||
ENDIF(VITE_ENABLE_VBO)
|
||||
|
||||
#############################################
|
||||
@@ -271,29 +261,25 @@ IF(VITE_ENABLE_OTF)
|
||||
${VITE_HDRS}
|
||||
parser/OTFParser/ParserDefinitionOTF.hpp
|
||||
parser/OTFParser/ParserEventOTF.hpp
|
||||
- parser/OTFParser/ParserOTF.hpp
|
||||
- )
|
||||
+ parser/OTFParser/ParserOTF.hpp)
|
||||
|
||||
SET(VITE_SRCS
|
||||
${VITE_SRCS}
|
||||
parser/OTFParser/ParserDefinitionOTF.cpp
|
||||
parser/OTFParser/ParserEventOTF.cpp
|
||||
- parser/OTFParser/ParserOTF.cpp
|
||||
- )
|
||||
+ parser/OTFParser/ParserOTF.cpp)
|
||||
|
||||
IF(VITE_ENABLE_MT_PARSERS)
|
||||
SET(VITE_HDRS
|
||||
${VITE_HDRS}
|
||||
parser/OTFParser/mt_ParserEventOTF.hpp
|
||||
parser/OTFParser/mt_ParserOTF.hpp
|
||||
- parser/OTFParser/OTFTraceBuilderThread.hpp
|
||||
- )
|
||||
+ parser/OTFParser/OTFTraceBuilderThread.hpp)
|
||||
SET(VITE_SRCS
|
||||
${VITE_SRCS}
|
||||
parser/OTFParser/mt_ParserEventOTF.cpp
|
||||
parser/OTFParser/mt_ParserOTF.cpp
|
||||
- parser/OTFParser/OTFTraceBuilderThread.cpp
|
||||
- )
|
||||
+ parser/OTFParser/OTFTraceBuilderThread.cpp)
|
||||
ENDIF()
|
||||
|
||||
INCLUDE_DIRECTORIES(BEFORE ${OTF_INCLUDE_DIR})
|
||||
@@ -310,15 +296,13 @@ IF(VITE_ENABLE_OTF2)
|
||||
${VITE_HDRS}
|
||||
parser/OTF2Parser/ParserDefinitionOTF2.hpp
|
||||
parser/OTF2Parser/ParserEventOTF2.hpp
|
||||
- parser/OTF2Parser/ParserOTF2.hpp
|
||||
- )
|
||||
+ parser/OTF2Parser/ParserOTF2.hpp)
|
||||
|
||||
SET(VITE_SRCS
|
||||
${VITE_SRCS}
|
||||
parser/OTF2Parser/ParserDefinitionOTF2.cpp
|
||||
parser/OTF2Parser/ParserEventOTF2.cpp
|
||||
- parser/OTF2Parser/ParserOTF2.cpp
|
||||
- )
|
||||
+ parser/OTF2Parser/ParserOTF2.cpp)
|
||||
|
||||
INCLUDE_DIRECTORIES(${OTF2_INCLUDE_DIR})
|
||||
|
||||
@@ -332,13 +316,11 @@ IF(VITE_ENABLE_TAU)
|
||||
SET(VITE_HDRS
|
||||
${VITE_HDRS}
|
||||
parser/TauParser/ParserTau.hpp
|
||||
- parser/TauParser/TauStructs.hpp
|
||||
- )
|
||||
+ parser/TauParser/TauStructs.hpp)
|
||||
|
||||
SET(VITE_SRCS
|
||||
${VITE_SRCS}
|
||||
- parser/TauParser/ParserTau.cpp
|
||||
- )
|
||||
+ parser/TauParser/ParserTau.cpp)
|
||||
|
||||
INCLUDE_DIRECTORIES(${TAU_INCLUDE_DIR})
|
||||
|
||||
@@ -357,8 +339,7 @@ IF(VITE_ENABLE_MT_PARSERS)
|
||||
parser/PajeParser/mt_ParserPaje.hpp
|
||||
parser/PajeParser/mt_PajeFileManager.hpp
|
||||
parser/PajeParser/BuilderThread.hpp
|
||||
- trace/TraceBuilderThread.hpp
|
||||
- )
|
||||
+ trace/TraceBuilderThread.hpp)
|
||||
|
||||
SET(VITE_SRCS
|
||||
${VITE_SRCS}
|
||||
@@ -367,8 +348,7 @@ IF(VITE_ENABLE_MT_PARSERS)
|
||||
parser/PajeParser/mt_ParserPaje.cpp
|
||||
parser/PajeParser/mt_PajeFileManager.cpp
|
||||
parser/PajeParser/BuilderThread.cpp
|
||||
- trace/TraceBuilderThread.cpp
|
||||
- )
|
||||
+ trace/TraceBuilderThread.cpp)
|
||||
|
||||
ENDIF()
|
||||
|
||||
@@ -385,16 +365,14 @@ IF(VITE_ENABLE_SERIALIZATION)
|
||||
parser/ParserSplitted.hpp
|
||||
trace/IntervalOfContainer.hpp
|
||||
trace/SerializerWriter.hpp
|
||||
- trace/SerializerDispatcher.hpp
|
||||
- )
|
||||
+ trace/SerializerDispatcher.hpp)
|
||||
|
||||
SET(VITE_SRCS
|
||||
${VITE_SRCS}
|
||||
parser/ParserSplitted.cpp
|
||||
trace/IntervalOfContainer.cpp
|
||||
trace/SerializerWriter.cpp
|
||||
- trace/SerializerDispatcher.cpp
|
||||
- )
|
||||
+ trace/SerializerDispatcher.cpp)
|
||||
|
||||
ENDIF(VITE_ENABLE_SERIALIZATION)
|
||||
|
||||
@@ -421,24 +399,22 @@ INCLUDE_DIRECTORIES(
|
||||
${CMAKE_CURRENT_BINARY_DIR}/common
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
- ${QTCOLORPICKERDIR}
|
||||
- )
|
||||
+ ${QTCOLORPICKERDIR})
|
||||
#ADD_LIBRARY(vite2 SHARED ${VITE_SRCS} ${VITE_MOC} ${VITE_RCC_SRCS})
|
||||
|
||||
-IF( VITE_ENABLE_OTF )
|
||||
- LINK_DIRECTORIES( ${OTF_LIBRARY_DIR} )
|
||||
-ENDIF( VITE_ENABLE_OTF )
|
||||
+IF(VITE_ENABLE_OTF)
|
||||
+ LINK_DIRECTORIES(${OTF_LIBRARY_DIR})
|
||||
+ENDIF(VITE_ENABLE_OTF)
|
||||
|
||||
IF(VITE_ENABLE_OTF2)
|
||||
- LINK_DIRECTORIES(${OTF2_LIBRARY_DIR} )
|
||||
+ LINK_DIRECTORIES(${OTF2_LIBRARY_DIR})
|
||||
ENDIF(VITE_ENABLE_OTF2)
|
||||
|
||||
#resource
|
||||
IF(WIN32)
|
||||
set(VITE_RES
|
||||
"${PROJECT_SOURCE_DIR}/src/interface/icon/logo.ico"
|
||||
- "${PROJECT_SOURCE_DIR}/src/interface/windows_icon.rc"
|
||||
- )
|
||||
+ "${PROJECT_SOURCE_DIR}/src/interface/windows_icon.rc")
|
||||
ENDIF(WIN32)
|
||||
|
||||
if( APPLE )
|
||||
@@ -456,7 +432,11 @@ if( APPLE )
|
||||
MACOSX_BUNDLE_COPYRIGHT "INRIA 2006-2012"
|
||||
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/vite-info.plist.in)
|
||||
else( APPLE )
|
||||
- ADD_EXECUTABLE(vite ${VITE_SRCS} ${VITE_MOC} ${VITE_RCC_SRCS} ${VITE_RES})
|
||||
+ message("VITE_SRCS" ${VITE_SRCS} "END")
|
||||
+ message("VITE_MOC" ${VITE_MOC} "END")
|
||||
+ message("VITE_RCC_SRCS" ${VITE_RCC_SRCS} "END")
|
||||
+ message("VITE_RES" ${VITE_RES} "END")
|
||||
+ ADD_EXECUTABLE(vite ${VITE_SRCS} ${VITE_MOC} ${VITE_RCC_SRCS})
|
||||
endif( APPLE )
|
||||
|
||||
#############################################
|
||||
@@ -470,31 +450,22 @@ TARGET_LINK_LIBRARIES(vite
|
||||
${QT_LIBRARIES}
|
||||
${OPENGL_gl_LIBRARY}
|
||||
${OPENGL_glu_LIBRARY}
|
||||
- ${Boost_LIBRARIES}
|
||||
- )
|
||||
+ ${Boost_LIBRARIES})
|
||||
|
||||
IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
- TARGET_LINK_LIBRARIES(vite
|
||||
- rt
|
||||
- )
|
||||
+ TARGET_LINK_LIBRARIES(vite rt)
|
||||
#ADD_DEFINITIONS("-DBOOST_GZIP")
|
||||
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
|
||||
IF(VITE_ENABLE_VBO)
|
||||
- TARGET_LINK_LIBRARIES(vite
|
||||
- ${GLEW_LIBRARY}
|
||||
- )
|
||||
+ TARGET_LINK_LIBRARIES(vite ${GLEW_LIBRARY})
|
||||
ENDIF(VITE_ENABLE_VBO)
|
||||
|
||||
IF(VITE_ENABLE_OTF)
|
||||
- TARGET_LINK_LIBRARIES(vite
|
||||
- ${OTF_LIBRARY}
|
||||
- )
|
||||
+ TARGET_LINK_LIBRARIES(vite ${OTF_LIBRARY})
|
||||
# if OTF is compiled with zlib support we need to add it
|
||||
IF(WIN32)
|
||||
- TARGET_LINK_LIBRARIES(vite
|
||||
- ${ZLIB_LIBRARY}
|
||||
- )
|
||||
+ TARGET_LINK_LIBRARIES(vite ${ZLIB_LIBRARY})
|
||||
ENDIF(WIN32)
|
||||
ENDIF(VITE_ENABLE_OTF)
|
||||
|
||||
@ -1,83 +0,0 @@
|
||||
{
|
||||
fetchgit
|
||||
, stdenv
|
||||
, cmake
|
||||
, qtbase
|
||||
, qttools
|
||||
, qtcharts
|
||||
, libGLU
|
||||
, libGL
|
||||
, glm
|
||||
, glew
|
||||
, wrapQtAppsHook
|
||||
, otf ? null
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
# ViTE 1.1 has several bugs, so use the SVN version.
|
||||
let
|
||||
#rev = "1543";
|
||||
#externals = fetchsvn {
|
||||
# url = "svn://scm.gforge.inria.fr/svn/vite/externals";
|
||||
# sha256 = "1a422n3dp72v4visq5b1i21cf8sj12903sgg5v2hah3sgk02dnyz";
|
||||
# inherit rev;
|
||||
#};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
version = "c6c0ce7";
|
||||
pname = "vite";
|
||||
|
||||
#dontStrip = true;
|
||||
#enableDebugging = true;
|
||||
preferLocalBuild = true;
|
||||
|
||||
#src = ./../../vite-c6c0ce7;
|
||||
src = fetchgit {
|
||||
url = "https://gitlab.inria.fr/solverstack/vite.git";
|
||||
sha256 = "17h57jjcdynnjd6s19hs6zdgvr9j7hj1rf6a62d9qky8wzb78y37";
|
||||
#rev = "373d4a8ebe86aa9ed07c9a8eb5e5e7f1602baef9";
|
||||
rev = "c6c0ce7a75324f03b24243397dfaa0d3bcd5bd1b";
|
||||
};
|
||||
|
||||
#patches = [ ./cmake.patch ];
|
||||
|
||||
#preConfigure = ''
|
||||
# rm -rv externals
|
||||
# ln -sv "${externals}" externals
|
||||
#'';
|
||||
|
||||
buildInputs = [
|
||||
cmake qtbase qttools qtcharts
|
||||
libGLU libGL glm glew wrapQtAppsHook
|
||||
] ++ optional (otf != null) otf;
|
||||
|
||||
#NIX_LDFLAGS = "-lGLU";
|
||||
|
||||
cmakeFlags = [
|
||||
# "-DCMAKE_BUILD_TYPE=Debug"
|
||||
#"-DVITE_ENABLE_OTF2=True"
|
||||
#"-DVITE_ENABLE_TAU=True"
|
||||
]
|
||||
++ optionals (otf != null)
|
||||
[
|
||||
"-DVITE_ENABLE_OTF=True"
|
||||
"-DOTF_LIBRARY_DIR=${otf}/lib"
|
||||
"-DOTF_INCLUDE_DIR=${otf}/include"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Visual Trace Explorer (ViTE), a tool to visualize execution traces";
|
||||
|
||||
longDescription = ''
|
||||
ViTE is a trace explorer. It is a tool to visualize execution
|
||||
traces in Pajé or OTF format for debugging and profiling
|
||||
parallel or distributed applications.
|
||||
'';
|
||||
|
||||
homepage = "http://vite.gforge.inria.fr/";
|
||||
license = lib.licenses.cecill20;
|
||||
maintainers = with lib.maintainers; [ ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
@ -1,77 +0,0 @@
|
||||
{
|
||||
stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, cmake
|
||||
, libGLU
|
||||
, libGL
|
||||
, libX11
|
||||
, xorgproto
|
||||
, libXt
|
||||
, libtiff
|
||||
, qtLib ? null
|
||||
, enablePython ? false, python ? null
|
||||
, mpi ? null
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
os = lib.optionalString;
|
||||
majorVersion = "8.2";
|
||||
minorVersion = "0";
|
||||
version = "${majorVersion}.${minorVersion}";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "vtk-${os (qtLib != null) "qvtk-"}${version}";
|
||||
src = fetchurl {
|
||||
url = "${meta.homepage}files/release/${majorVersion}/VTK-${version}.tar.gz";
|
||||
sha256 = "1fspgp8k0myr6p2a6wkc21ldcswb4bvmb484m12mxgk1a9vxrhrl";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
buildInputs = [ libtiff ]
|
||||
++ optionals (qtLib != null) (with qtLib; [ qtbase qtx11extras qttools ])
|
||||
++ optional (qtLib != null) (with qtLib; [ qtbase qtx11extras qttools ])
|
||||
++ optionals stdenv.isLinux [ libGLU libGL libX11 xorgproto libXt ]
|
||||
++ optional enablePython [ python ]
|
||||
++ optional (mpi != null) [ mpi ];
|
||||
|
||||
preBuild = ''
|
||||
export LD_LIBRARY_PATH="$(pwd)/lib";
|
||||
'';
|
||||
|
||||
# Shared libraries don't work, because of rpath troubles with the current
|
||||
# nixpkgs cmake approach. It wants to call a binary at build time, just
|
||||
# built and requiring one of the shared objects.
|
||||
# At least, we use -fPIC for other packages to be able to use this in shared
|
||||
# objects.
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_C_FLAGS=-fPIC"
|
||||
"-DCMAKE_CXX_FLAGS=-fPIC"
|
||||
"-DVTK_USE_SYSTEM_TIFF=1"
|
||||
"-DVTK_Group_MPI=ON"
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
"-DOPENGL_INCLUDE_DIR=${libGL}/include"
|
||||
]
|
||||
++ optional (mpi != null) [
|
||||
"-DVTK_Group_MPI=ON" ]
|
||||
++ optional (qtLib != null) [
|
||||
"-DVTK_Group_Qt:BOOL=ON" ]
|
||||
++ optional stdenv.isDarwin [
|
||||
"-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks" ]
|
||||
++ optional enablePython [
|
||||
"-DVTK_WRAP_PYTHON:BOOL=ON" ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
description = "Open source libraries for 3D computer graphics, image processing and visualization";
|
||||
homepage = "https://www.vtk.org/";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ knedlsepp ];
|
||||
platforms = with lib.platforms; unix;
|
||||
};
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user