49 stdenv.mkDerivation (finalAttrs: {
53 src = fetchFromGitHub {
56 rev = "Release_${finalAttrs.version}";
57 hash = "sha256-axRI3sssj2Q6IBfIeyvOa494b0EgKFP+lFL/QrGIybQ=";
60 postPatch = lib.optionalString stdenv.hostPlatform.isDarwin ''
61 sed -i '/fixup_bundle/d; /NO_DEFAULT_PATH/d' CMakeLists.txt
68 ] ++ lib.optionals stdenv.hostPlatform.isLinux [
70 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
80 ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
108 ] ++ lib.optionals stdenv.hostPlatform.isLinux [
115 ] ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform elfutils) [
117 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
121 cmakeFlags = [ "-DOCPN_BUNDLE_DOCS=true" ];
123 env.NIX_CFLAGS_COMPILE = toString (lib.optionals (!stdenv.hostPlatform.isx86) [
127 postInstall = lib.optionals stdenv.hostPlatform.isDarwin ''
128 mkdir -p $out/Applications
129 mv $out/bin/OpenCPN.app $out/Applications
130 makeWrapper $out/Applications/OpenCPN.app/Contents/MacOS/OpenCPN $out/bin/opencpn
136 description = "Concise ChartPlotter/Navigator";
137 maintainers = with maintainers; [ kragniz lovesegfault ];
138 platforms = platforms.unix;
139 license = licenses.gpl2Plus;
140 homepage = "https://opencpn.org/";