Skip to content

Commit 1cf3c6b

Browse files
committed
fatrop: 0.0.1 -> 0.0.3
Diff: meco-group/fatrop@v0.0.1...0.0.3
1 parent 12228ff commit 1cf3c6b

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

pkgs/by-name/fa/fatrop/package.nix

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
blasfeo,
33
cmake,
44
fetchFromGitHub,
5+
fetchpatch,
56
lib,
67
llvmPackages,
78
python3Packages,
@@ -11,25 +12,28 @@
1112

1213
stdenv.mkDerivation (finalAttrs: {
1314
pname = "fatrop";
14-
version = "0.0.1";
15+
version = "0.0.3";
1516

1617
src = fetchFromGitHub {
1718
owner = "meco-group";
1819
repo = "fatrop";
1920
rev = "v${finalAttrs.version}";
20-
hash = "sha256-c4qYh8RutRsMIx3m0oxXy73fnLTBGVZ1QjFcLEJ413Y=";
21+
hash = "sha256-vCGix3qYQR9bY9GoIyBMrTNvsMgt0h7TZUye6wlH9H8=";
2122
};
2223

23-
postPatch = lib.optionalString pythonSupport ''
24-
# avoid submodule
25-
rmdir external/pybind11
26-
ln -s ${python3Packages.pybind11.src} external/pybind11
27-
28-
# install python module
29-
echo "" >> fatropy/CMakeLists.txt
30-
echo "install(DIRECTORY fatropy DESTINATION ${python3Packages.python.sitePackages})" >> fatropy/CMakeLists.txt
31-
echo "install(TARGETS _fatropy DESTINATION ${python3Packages.python.sitePackages}/fatropy)" >> fatropy/CMakeLists.txt
32-
'';
24+
patches = lib.optionals pythonSupport [
25+
# fix python packaging
26+
# ref. https://github.com/meco-group/fatrop/pull/17
27+
# this was merged upstream and can be removed on next release
28+
(fetchpatch {
29+
url = "https://github.com/meco-group/fatrop/pull/17/commits/22e33c216e47df90dc060686d7d1806233642249.patch";
30+
hash = "sha256-0/uSHAXVzXVyR+kklQGvraLA6sJbHzUcAp3eEHQK068=";
31+
})
32+
(fetchpatch {
33+
url = "https://github.com/meco-group/fatrop/pull/17/commits/0c03fd9fec95de42976fed1770a15081d0874ee2.patch";
34+
hash = "sha256-FenQ05rqn9EbU0wDVQQ1OFxSXj1fL/rOFKOcP8t1NwY=";
35+
})
36+
];
3337

3438
nativeBuildInputs = [ cmake ];
3539
buildInputs =

0 commit comments

Comments
 (0)