diff --git a/overlays/cross.nix b/overlays/cross.nix index 614b8430d..fd4917351 100644 --- a/overlays/cross.nix +++ b/overlays/cross.nix @@ -349,45 +349,45 @@ in with final; { # 2025/07/27: upstreaming is unblocked by deps; but turns out to not be this simple # ncftp = addNativeInputs [ bintools ] prev.ncftp; - # 2025/08/26: upstreaming is unblocked - newsflash = (prev.newsflash.override { - cargo = crossCargo; - }).overrideAttrs (upstream: { - postPatch = (upstream.postPatch or "") + '' - rm build.rs + # 2025/08/27: upstreaming is unblocked, implemented on desko branch `pr-newsflash-cross` + # newsflash = (prev.newsflash.override { + # cargo = crossCargo; + # }).overrideAttrs (upstream: { + # postPatch = (upstream.postPatch or "") + '' + # rm build.rs - export OUT_DIR=$(pwd) + # export OUT_DIR=$(pwd) - # from build.rs: - glib-compile-resources --sourcedir=data/resources --target=icons.gresource data/resources/icons.gresource.xml - glib-compile-resources --sourcedir=data/resources --target=styles.gresource data/resources/styles.gresource.xml - substitute data/io.gitlab.news_flash.NewsFlash.appdata.xml.in.in \ - data/resources/io.gitlab.news_flash.NewsFlash.appdata.xml \ - --replace-fail '@appid@' 'io.gitlab.news_flash.NewsFlash' - glib-compile-resources --sourcedir=data/resources --target=appdata.gresource data/resources/appdata.gresource.xml - ''; + # # from build.rs: + # glib-compile-resources --sourcedir=data/resources --target=icons.gresource data/resources/icons.gresource.xml + # glib-compile-resources --sourcedir=data/resources --target=styles.gresource data/resources/styles.gresource.xml + # substitute data/io.gitlab.news_flash.NewsFlash.appdata.xml.in.in \ + # data/resources/io.gitlab.news_flash.NewsFlash.appdata.xml \ + # --replace-fail '@appid@' 'io.gitlab.news_flash.NewsFlash' + # glib-compile-resources --sourcedir=data/resources --target=appdata.gresource data/resources/appdata.gresource.xml + # ''; - env = let - ccForBuild = "${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}cc"; - cxxForBuild = "${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}c++"; - ccForHost = "${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc"; - cxxForHost = "${stdenv.cc}/bin/${stdenv.cc.targetPrefix}c++"; - rustBuildPlatform = stdenv.buildPlatform.rust.rustcTarget; - rustTargetPlatform = stdenv.hostPlatform.rust.rustcTarget; - in (upstream.env or {}) // { - # taken from - # fixes "cargo:warning=aarch64-unknown-linux-gnu-gcc: error: unrecognized command-line option ‘-m64’" - # XXX: these aren't necessarily valid environment variables: the referenced nix file is more clever to get them to work. - "CC_${rustBuildPlatform}" = "${ccForBuild}"; - "CXX_${rustBuildPlatform}" = "${cxxForBuild}"; - "CC_${rustTargetPlatform}" = "${ccForHost}"; - "CXX_${rustTargetPlatform}" = "${cxxForHost}"; - # fails to fix "Failed to find OpenSSL development headers." - # OPENSSL_NO_VENDOR = 1; - # OPENSSL_LIB_DIR = "${lib.getLib openssl}/lib"; - # OPENSSL_DIR = "${lib.getDev openssl}"; - }; - }); + # env = let + # ccForBuild = "${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}cc"; + # cxxForBuild = "${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}c++"; + # ccForHost = "${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc"; + # cxxForHost = "${stdenv.cc}/bin/${stdenv.cc.targetPrefix}c++"; + # rustBuildPlatform = stdenv.buildPlatform.rust.rustcTarget; + # rustTargetPlatform = stdenv.hostPlatform.rust.rustcTarget; + # in (upstream.env or {}) // { + # # taken from + # # fixes "cargo:warning=aarch64-unknown-linux-gnu-gcc: error: unrecognized command-line option ‘-m64’" + # # XXX: these aren't necessarily valid environment variables: the referenced nix file is more clever to get them to work. + # "CC_${rustBuildPlatform}" = "${ccForBuild}"; + # "CXX_${rustBuildPlatform}" = "${cxxForBuild}"; + # "CC_${rustTargetPlatform}" = "${ccForHost}"; + # "CXX_${rustTargetPlatform}" = "${cxxForHost}"; + # # fails to fix "Failed to find OpenSSL development headers." + # # OPENSSL_NO_VENDOR = 1; + # # OPENSSL_LIB_DIR = "${lib.getLib openssl}/lib"; + # # OPENSSL_DIR = "${lib.getDev openssl}"; + # }; + # }); # fixes "properties/gresource.xml: Permission denied" # - by providing glib-compile-resources diff --git a/pkgs/by-name/nixpkgs-bootstrap/patches.nix b/pkgs/by-name/nixpkgs-bootstrap/patches.nix index 4be3cbd33..b2cd1e11e 100644 --- a/pkgs/by-name/nixpkgs-bootstrap/patches.nix +++ b/pkgs/by-name/nixpkgs-bootstrap/patches.nix @@ -103,6 +103,12 @@ in hash = "sha256-F6RwprsXOWjk/xNHtBqQWge5edLGJeQUrupKZ1MNphU="; }) + (fetchpatch' { + name = "newsflash: fix cross compilation"; + saneCommit = "0453c58e9acf42c4ba52f3fda21d7e51139c0141"; + hash = "sha256-lLdPik9Iw9Cl7ZdAJIeKsbAfB7eyf57HEQpe3A0NHhM="; + }) + # (fetchpatch' { # # opencv used by alpaca, newelle # name = "opencv: fix cross compliation by patching protobuf";