Skip to content

Instantly share code, notes, and snippets.

@inclyc
Created April 26, 2024 02:39
Show Gist options
  • Save inclyc/a0810376cbd808be533691cae0e6db42 to your computer and use it in GitHub Desktop.
Save inclyc/a0810376cbd808be533691cae0e6db42 to your computer and use it in GitHub Desktop.
NAMD2 patchelf from binary
{ stdenv
, fetchurl
, autoPatchelfHook
, zlib
}:
let
version = "2.14";
in
stdenv.mkDerivation {
inherit version;
pname = "namd-bin";
src = fetchurl {
url = "https://www.ks.uiuc.edu/Research/namd/2.14/download/946183/NAMD_2.14_Linux-x86_64-multicore-CUDA.tar.gz";
sha256 = "sha256-8VFsebjWunLzTxosCx0JtOr9Ti97sfxYX9n+QY0UGXY=";
};
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [
stdenv.cc.cc.lib
zlib
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp namd2 charmrun flipbinpdb flipdcd psfgen sortreplicas $out/bin
cp -r lib $out/lib
runHook postInstall
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment