packages.vaspberry: init

This commit is contained in:
2024-11-19 15:02:13 +08:00
parent 9fff4067dc
commit d167d0ee73
5 changed files with 33 additions and 0 deletions

17
flake.lock generated
View File

@@ -1310,6 +1310,7 @@
"sqlite-orm": "sqlite-orm", "sqlite-orm": "sqlite-orm",
"tgbot-cpp": "tgbot-cpp", "tgbot-cpp": "tgbot-cpp",
"v-sim": "v-sim", "v-sim": "v-sim",
"vaspberry": "vaspberry",
"winapps": "winapps", "winapps": "winapps",
"zpp-bits": "zpp-bits" "zpp-bits": "zpp-bits"
} }
@@ -1639,6 +1640,22 @@
"type": "gitlab" "type": "gitlab"
} }
}, },
"vaspberry": {
"flake": false,
"locked": {
"lastModified": 1724474006,
"narHash": "sha256-3cmidQRusbEdEog6e6Qe0IKBRpscrX2ghU/HApaNcys=",
"owner": "Infant83",
"repo": "VASPBERRY",
"rev": "3b5efc9ed6b748b1149278748024ffeb140ecfdb",
"type": "github"
},
"original": {
"owner": "Infant83",
"repo": "VASPBERRY",
"type": "github"
}
},
"winapps": { "winapps": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_6", "flake-compat": "flake-compat_6",

View File

@@ -68,6 +68,7 @@
blog = { url = "git+https://git.chn.moe/chn/blog-public.git"; flake = false; }; blog = { url = "git+https://git.chn.moe/chn/blog-public.git"; flake = false; };
nixos-wallpaper = { url = "git+https://git.chn.moe/chn/nixos-wallpaper.git"; flake = false; }; nixos-wallpaper = { url = "git+https://git.chn.moe/chn/nixos-wallpaper.git"; flake = false; };
spectroscopy = { url = "github:skelton-group/Phonopy-Spectroscopy"; flake = false; }; spectroscopy = { url = "github:skelton-group/Phonopy-Spectroscopy"; flake = false; };
vaspberry = { url = "github:Infant83/VASPBERRY"; flake = false; };
}; };
outputs = inputs: let localLib = import ./flake/lib.nix inputs.nixpkgs.lib; in outputs = inputs: let localLib = import ./flake/lib.nix inputs.nixpkgs.lib; in

View File

@@ -23,6 +23,11 @@
}; };
chn-bsub = pkgs.pkgsStatic.localPackages.chn-bsub; chn-bsub = pkgs.pkgsStatic.localPackages.chn-bsub;
blog = pkgs.callPackage inputs.blog { inherit (inputs) hextra; }; blog = pkgs.callPackage inputs.blog { inherit (inputs) hextra; };
vaspberry = pkgs.pkgsStatic.localPackages.vaspberry.override
{
gfortran = pkgs.pkgsStatic.gfortran;
lapack = pkgs.pkgsStatic.openblas;
};
} }
// (builtins.listToAttrs (builtins.map // (builtins.listToAttrs (builtins.map
(system: { inherit (system) name; value = system.value.config.system.build.toplevel; }) (system: { inherit (system) name; value = system.value.config.system.build.toplevel; })

View File

@@ -91,6 +91,7 @@ inputs: rec
pocketfft = inputs.pkgs.callPackage ./pocketfft.nix { src = inputs.topInputs.pocketfft; }; pocketfft = inputs.pkgs.callPackage ./pocketfft.nix { src = inputs.topInputs.pocketfft; };
spectroscopy = inputs.pkgs.callPackage ./spectroscopy.nix { src = inputs.topInputs.spectroscopy; }; spectroscopy = inputs.pkgs.callPackage ./spectroscopy.nix { src = inputs.topInputs.spectroscopy; };
mirism = inputs.pkgs.callPackage ./mirism { inherit biu; stdenv = inputs.pkgs.clang18Stdenv; }; mirism = inputs.pkgs.callPackage ./mirism { inherit biu; stdenv = inputs.pkgs.clang18Stdenv; };
vaspberry = inputs.pkgs.callPackage ./vaspberry.nix { src = inputs.topInputs.vaspberry; };
fromYaml = content: builtins.fromJSON (builtins.readFile fromYaml = content: builtins.fromJSON (builtins.readFile
(inputs.pkgs.runCommand "toJSON" {} (inputs.pkgs.runCommand "toJSON" {}

9
packages/vaspberry.nix Normal file
View File

@@ -0,0 +1,9 @@
{ stdenv, src, gfortran, lapack }: stdenv.mkDerivation
{
name = "vaspberry";
inherit src;
nativeBuildInputs = [ gfortran ];
buildInputs = [ lapack ];
buildPhase = "gfortran vaspberry_gfortran_serial.f -std=legacy -llapack -o vaspberry";
installPhase = "mkdir -p $out/bin && cp vaspberry $out/bin";
}