namd: Generalize of over specific version numbers
This commit is contained in:
23
namd.nix
23
namd.nix
@@ -1,26 +1,27 @@
|
|||||||
with import <nixpkgs> {};
|
with import <nixpkgs> {};
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation rec {
|
||||||
name = "namd-2.11";
|
version = "2.11";
|
||||||
|
name = "namd-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = http://ppomorsk.sharcnet.ca/namd-2.11.tar.gz;
|
url = "http://ppomorsk.sharcnet.ca/namd-${version}.tar.gz";
|
||||||
md5 = "8a81eb4c883edbf977d0af05351f6914";
|
md5 = "8a81eb4c883edbf977d0af05351f6914";
|
||||||
};
|
};
|
||||||
|
|
||||||
postUnpack = ''
|
postUnpack = ''
|
||||||
cd namd-*
|
cd namd-${version}
|
||||||
tar -xf charm-6.7.0.tar
|
tar -xf charm-*.tar
|
||||||
tar -xzf fftw-linux-x86_64.tar.gz
|
tar -xzf fftw-linux-x86_64.tar.gz
|
||||||
mv linux-x86_64 fftw
|
mv linux-x86_64 fftw
|
||||||
tar -xzf tcl8.5.9-linux-x86_64.tar.gz
|
tar -xzf tcl*-linux-x86_64.tar.gz
|
||||||
mv tcl8.5.9-linux-x86_64 tcl
|
mv tcl*-linux-x86_64 tcl
|
||||||
tar -xzf tcl8.5.9-linux-x86_64-threaded.tar.gz
|
tar -xzf tcl*-linux-x86_64-threaded.tar.gz
|
||||||
mv tcl8.5.9-linux-x86_64-threaded tcl-threaded
|
mv tcl*-linux-x86_64-threaded tcl-threaded
|
||||||
cd ..
|
cd ..
|
||||||
'';
|
'';
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
find charm-6.7.0 -type f | xargs sed -i \
|
find charm-*/ -type f | xargs sed -i \
|
||||||
-e 's,/bin/cp,cp,g' \
|
-e 's,/bin/cp,cp,g' \
|
||||||
-e 's,/bin/rm,rm,g' \
|
-e 's,/bin/rm,rm,g' \
|
||||||
-e 's,/lib/cpp,cpp,g'
|
-e 's,/lib/cpp,cpp,g'
|
||||||
@@ -29,7 +30,7 @@ stdenv.mkDerivation {
|
|||||||
tcsh -f ./config Linux-x86_64-g++ --charm-arch multicore-linux64
|
tcsh -f ./config Linux-x86_64-g++ --charm-arch multicore-linux64
|
||||||
'';
|
'';
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
cd charm-6.7.0
|
cd charm-*/
|
||||||
./build charm++ multicore-linux64 --no-build-shared --with-production
|
./build charm++ multicore-linux64 --no-build-shared --with-production
|
||||||
cd ..
|
cd ..
|
||||||
cd Linux-x86_64-g++
|
cd Linux-x86_64-g++
|
||||||
|
|||||||
Reference in New Issue
Block a user