Skip to content

Commit 4273bea

Browse files
committed
sgroup: init at 1.0
1 parent 77633a7 commit 4273bea

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

overlay.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@ let
252252

253253
scalapackfx = callPackage ./pkgs/lib/scalapackfx { };
254254

255+
sgroup = callPackage ./pkgs/apps/sgroup { };
256+
255257
# blank version
256258
sharc = callPackage ./pkgs/apps/sharc/default.nix {
257259
hdf4 = super.hdf4.override {

pkgs/apps/sgroup/default.nix

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{ stdenv
2+
, fetchurl
3+
, lib
4+
}:
5+
6+
stdenv.mkDerivation rec {
7+
pname = "sgroup";
8+
version = "1.0";
9+
10+
src = fetchurl {
11+
url = "https://elsevier.digitalcommonsdata.com/public-files/datasets/xp76bp3zxs/files/c315c05e-6734-43c1-9205-76b98281c043/file_downloaded";
12+
hash = "sha256-TNaoRQAFjjOmZCq7ZvQYGfxseEzo6mAwWim6HeS+Xig=";
13+
};
14+
15+
unpackPhase = ''
16+
runHook preUnpack
17+
18+
tar -xvf ${src}
19+
cd SpaceGroups
20+
21+
runHook postUnpack
22+
'';
23+
24+
postPatch = ''
25+
substituteInPlace Makefile \
26+
--replace "LDFLAGS = -L/usr/lib" "LDFLAGS =" \
27+
--replace "#FOPT = -O3 -malign-double -malign-loops=4 -malign-jumps=4" "FOPT = -O3 -malign-double -malign-loops=4 -malign-jumps=4"
28+
'';
29+
30+
dontConfigure = true;
31+
32+
installPhase = ''
33+
mkdir -p $out/bin
34+
cp sgroup $out/bin
35+
'';
36+
37+
meta = with lib; {
38+
description = "Determination of the space group and unit cell for a periodic solid";
39+
homepage = "https://elsevier.digitalcommonsdata.com/datasets/xp76bp3zxs/1";
40+
license = licenses.unfree;
41+
maintainers = [ maintainers.sheepforce ];
42+
platforms = [ "x86_64-linux" ];
43+
};
44+
}

0 commit comments

Comments
 (0)