Is there a way to have a fetchurl derivation be reused for Linux and macOS (same hash)?

I’m building a Nix cache of Maven dependencies fetched using fetchurl. However, I get different hashes for Linux and macOS, which is not really necessary since we’re dealing with the same download. This seems to stem from env.stdenv and env.system (and maybe builder) values in the derivation:

    "env": {
      "buildInputs": "",
      "builder": "/nix/store/i82x3x0yiijkgyqkzh8ni87gspas0f48-bash-4.4-p23/bin/bash",
      "configureFlags": "",
      "curlOpts": "",
      "depsBuildBuild": "",
      "depsBuildBuildPropagated": "",
      "depsBuildTarget": "",
      "depsBuildTargetPropagated": "",
      "depsHostHost": "",
      "depsHostHostPropagated": "",
      "depsTargetTarget": "",
      "depsTargetTargetPropagated": "",
      "doCheck": "",
      "doInstallCheck": "",
      "downloadToTemp": "",
      "executable": "",
      "mirrorsFile": "/nix/store/6826r8rwvnyyq3j1pxgrw7dy102yihv8-mirrors-list",
      "name": "mockito-core-2.18.0.jar",
      "nativeBuildInputs": "/nix/store/iyhgjyifzv329y8wq0m8n8zjj9xn54xi-curl-7.64.0-dev",
      "nixpkgsVersion": "19.03",
      "out": "/nix/store/298pgbj7c7ahr9na1nan89cnmxwylyqp-mockito-core-2.18.0.jar",
      "outputHash": "0fi09pb2zfqxl78hir17dwnzv4bhxk81vvzga2mzm3cndjfvj2db",
      "outputHashAlgo": "sha256",
      "outputHashMode": "flat",
      "outputs": "out",
      "postFetch": "",
      "preferHashedMirrors": "1",
      "preferLocalBuild": "1",
      "propagatedBuildInputs": "",
      "propagatedNativeBuildInputs": "",
      "showURLs": "",
      "stdenv": "/nix/store/c33fpdjp1iwp4idfvf8gp5q797a473gn-stdenv-linux",
      "strictDeps": "",
      "system": "x86_64-linux",
      "urls": "https://repo1.maven.org/maven2/org/mockito/mockito-core/2.18.0/mockito-core-2.18.0.jar"
    }

I don’t think the attributes like stdenv and system would make the hash different, since for fetchurl it’s a fixed output hash that only depends on the outputs.

Could you please manually check the outputs and compare them? Do they contain the same files? Can you hash them manually and compare the result?