fork
Configure Feed
Select the types of activity you want to include in your feed.
nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
fork
Configure Feed
Select the types of activity you want to include in your feed.
1{
2 lib,
3 stdenv,
4 makeWrapper,
5 fetchFromGitHub,
6 gradle_7,
7 openjdk17,
8}:
9
10let
11 pname = "fastddsgen";
12 version = "4.1.0";
13
14 gradle = gradle_7;
15
16in
17stdenv.mkDerivation {
18 inherit pname version;
19
20 src = fetchFromGitHub {
21 owner = "eProsima";
22 repo = "Fast-DDS-Gen";
23 rev = "v${version}";
24 fetchSubmodules = true;
25 hash = "sha256-4w6DYz0QhD8L27FE+SzptfoMjhiuJ6OFex2LNAqwmPw=";
26 };
27
28 nativeBuildInputs = [
29 gradle
30 openjdk17
31 makeWrapper
32 ];
33
34 mitmCache = gradle.fetchDeps {
35 inherit pname;
36 data = ./deps.json;
37 };
38
39 __darwinAllowLocalNetworking = true;
40
41 gradleFlags = [
42 "-x"
43 "submodulesUpdate"
44 ];
45
46 installPhase = ''
47 runHook preInstall
48
49 gradle install --install_path=$out
50
51 # Override the default start script to use absolute java path.
52 # Make the unwrapped "cpp" available in the path, since the wrapped "cpp"
53 # passes additional flags and produces output incompatible with fastddsgen.
54 makeWrapper ${openjdk17}/bin/java $out/bin/fastddsgen \
55 --add-flags "-jar $out/share/fastddsgen/java/fastddsgen.jar" \
56 --prefix PATH : ${lib.makeBinPath [ stdenv.cc.cc ]}
57
58 runHook postInstall
59 '';
60
61 postGradleUpdate = ''
62 cd thirdparty/idl-parser
63 # fix "Task 'submodulesUpdate' not found"
64 gradleFlags=
65 gradle nixDownloadDeps
66 '';
67
68 meta = with lib; {
69 description = "Fast-DDS IDL code generator tool";
70 mainProgram = "fastddsgen";
71 homepage = "https://github.com/eProsima/Fast-DDS-Gen";
72 license = licenses.asl20;
73 longDescription = ''
74 eProsima Fast DDS-Gen is a Java application that generates
75 eProsima Fast DDS C++ or Python source code using the data types
76 defined in an IDL (Interface Definition Language) file. This
77 generated source code can be used in any Fast DDS application in
78 order to define the data type of a topic, which will later be
79 used to publish or subscribe.
80 '';
81 maintainers = with maintainers; [ wentasah ];
82 platforms = openjdk17.meta.platforms;
83 };
84}