forked from rarias/bscpkgs
Simplify paths
This commit is contained in:
34
garlic/ppong/default.nix
Normal file
34
garlic/ppong/default.nix
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
stdenv
|
||||
, mpi
|
||||
, fetchurl
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "ppong";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.csl.mtu.edu/cs4331/common/PPong.c";
|
||||
sha256 = "0d1w72gq9627448cb7ykknhgp2wszwd117dlbalbrpf7d0la8yc0";
|
||||
};
|
||||
|
||||
unpackCmd = ''
|
||||
mkdir src
|
||||
cp $src src/ppong.c
|
||||
'';
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
buildPhase = ''
|
||||
echo mpicc -include stdlib.h ppong.c -o ppong
|
||||
mpicc -include stdlib.h ppong.c -o ppong
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp ppong $out/bin/ppong
|
||||
ln -s $out/bin/ppong $out/bin/run
|
||||
'';
|
||||
|
||||
buildInputs = [ mpi ];
|
||||
}
|
||||
Reference in New Issue
Block a user