File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4848 arch
4949 ".deb"
5050 ] ;
51- expectedHash = if pkgs . lib . hasAttr versionDetail sha256dict then pkgs . lib . getAttr versionDetail sha256dict else "" ;
52- debFile = pkgs . stdenvNoCC . mkDerivation {
53- name = "mongodb-deb-${ version } " ;
54- inherit system ;
55- unpackPhase = "true" ;
56- installPhase = ( pkgs . lib . concatStringsSep "\n " ( map
57- ( mirror : ''
58- echo "Trying to download from ${ mirror } ${ buildDownloadUrl system version } "
59- SSL_CERT_FILE="${ pkgs . cacert } /etc/ssl/certs/ca-bundle.crt" ${ pkgs . curl } /bin/curl -o $out ${ mirror } ${ buildDownloadUrl system version } || true
60- hash=$(${ pkgs . nix } /bin/nix --extra-experimental-features nix-command --extra-experimental-features flakes hash file $out --type sha256)
61- echo "Got hash $hash , expect ${ expectedHash } "
62- if [ "$hash" == "${ expectedHash } " ]; then
63- echo "Download success"
64- exit 0
65- fi
66- '' )
67- mirrors ) ) + ''
68- exit 1
69- '' ;
70- outputHashMode = "flat" ;
71- outputHashAlgo = "sha256" ;
72- outputHash = expectedHash ;
73- } ;
7451in
7552pkgs . stdenvNoCC . mkDerivation {
7653 name = "hydro-mongodb-${ version } " ;
7754 inherit system ;
78- src = debFile ;
55+ src = pkgs . fetchurl {
56+ urls = map ( mirror : "${ mirror } ${ buildDownloadUrl system version } " ) mirrors ;
57+ hash = if pkgs . lib . hasAttr versionDetail sha256dict then pkgs . lib . getAttr versionDetail sha256dict else "" ;
58+ } ;
7959 # https://github.com/oxalica/rust-overlay/commit/c949d341f2b507857d589c48d1bd719896a2a224
8060 depsHostHost = pkgs . lib . optional ( ! pkgs . stdenv . hostPlatform . isDarwin ) pkgs . gccForLibs . lib ;
8161 nativeBuildInputs = [
You can’t perform that action at this time.
0 commit comments