mirror of
https://github.com/CHN-beta/nixos.git
synced 2024-10-22 23:39:02 +08:00
localPackages.mumax: init
This commit is contained in:
parent
82fb082006
commit
8d5a663ae0
17
flake.lock
17
flake.lock
@ -1125,6 +1125,22 @@
|
||||
"url": "https://github.com/CHN-beta/misskey"
|
||||
}
|
||||
},
|
||||
"mumax": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1709298542,
|
||||
"narHash": "sha256-w3VuxnEqkwwplNXwzdhC2mVMuVG7bBdzzzRcWZ4nRM8=",
|
||||
"owner": "CHN-beta",
|
||||
"repo": "mumax",
|
||||
"rev": "3658ac4ec975a58ba3ad5e7ede61bd26bdadfe23",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "CHN-beta",
|
||||
"repo": "mumax",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nameof": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
@ -1950,6 +1966,7 @@
|
||||
"lmod": "lmod",
|
||||
"matplotplusplus": "matplotplusplus",
|
||||
"misskey": "misskey",
|
||||
"mumax": "mumax",
|
||||
"nameof": "nameof",
|
||||
"napalm": "napalm",
|
||||
"nix-alien": "nix-alien",
|
||||
|
@ -67,6 +67,7 @@
|
||||
linux-surface = { url = "github:linux-surface/linux-surface"; flake = false; };
|
||||
lepton = { url = "github:black7375/Firefox-UI-Fix"; flake = false; };
|
||||
lmod = { url = "github:TACC/Lmod"; flake = false; };
|
||||
mumax = { url = "github:CHN-beta/mumax"; flake = false; };
|
||||
};
|
||||
|
||||
outputs = inputs:
|
||||
|
@ -65,4 +65,5 @@
|
||||
};
|
||||
hdf5-nvhpc = callPackage ./hdf5-nvhpc { inherit lmod; inherit (hdf5) src; nvhpc = nvhpc."24.1"; };
|
||||
oneapi = callPackage ./oneapi {};
|
||||
mumax = callPackage ./mumax { src = topInputs.mumax; };
|
||||
}
|
||||
|
22
local/pkgs/mumax/default.nix
Normal file
22
local/pkgs/mumax/default.nix
Normal file
@ -0,0 +1,22 @@
|
||||
{ buildGoModule, cudatoolkit, src, config, cudaCapabilities ? config.cudaCapabilities, gcc, makeWrapper }:
|
||||
# TODO: use addDriverRunpath
|
||||
buildGoModule
|
||||
{
|
||||
name = "mumax";
|
||||
inherit src;
|
||||
vendorHash = null;
|
||||
nativeBuildInputs = [ cudatoolkit gcc makeWrapper ];
|
||||
CUDA_CC = builtins.concatStringsSep " " cudaCapabilities;
|
||||
CPATH = "${cudatoolkit}/include";
|
||||
LIBRARY_PATH = "${cudatoolkit}/lib/stubs";
|
||||
doCheck = false;
|
||||
postInstall =
|
||||
''
|
||||
rm $out/bin/{doc,test}
|
||||
for i in $out/bin/*; do
|
||||
if [ -f $i ]; then
|
||||
wrapProgram $i --prefix LD_LIBRARY_PATH ":" "/run/opengl-driver/lib:${cudatoolkit}/lib"
|
||||
fi
|
||||
done
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue
Block a user