14 inherit (stdenv.hostPlatform) system;
16 sources = import ./sources.nix;
21 src = fetchurl sources.x86_64-linux;
31 mv usr/share $out/share
32 mkdir -p $out/share/breitbandmessung/resources
34 asar e opt/Breitbandmessung/resources/app.asar $out/share/breitbandmessung/resources
36 # At first start, the program checks for supported operating systems by using the `bizzby-lsb-release`
37 # module and only runs when it finds Debian/Ubuntu. So we present us as Debian and make it happy.
38 cat <<EOF > $out/share/breitbandmessung/resources/node_modules/bizzby-lsb-release/lib/lsb-release.js
39 module.exports = function release() {
41 distributorID: "Debian",
42 description: "Debian GNU/Linux 10 (buster)",
49 makeWrapper ${electron}/bin/electron $out/bin/breitbandmessung \
50 --add-flags $out/share/breitbandmessung/resources/build/electron.js
52 # Fix the desktop link
53 substituteInPlace $out/share/applications/breitbandmessung.desktop \
54 --replace /opt/Breitbandmessung $out/bin
59 src = fetchurl sources.x86_64-darwin;
61 nativeBuildInputs = [ undmg ];
65 mkdir -p $out/Applications/Breitbandmessung.app
66 cp -R . $out/Applications/Breitbandmessung.app
71 aarch64-darwin = x86_64-darwin;
74 src = throw "Unsupported system: ${system}";
79 pname = "breitbandmessung";
80 inherit (sources) version;
82 passthru.tests = { inherit (nixosTests) breitbandmessung; };
83 passthru.updateScript = ./update.sh;
86 description = "Broadband internet speed test app from the german Bundesnetzagentur";
87 homepage = "https://www.breitbandmessung.de";
88 license = licenses.unfree;
89 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
90 maintainers = with maintainers; [ b4dm4n ];