~toastal/easy-purescript-nix

8fa812e468bfb0e5defb907f1fa34318500b825a — toastal 2 years ago 64dd319
Throw on unsupported platforms

Rather than assume a) Linux b) x86_64 architectures.
1 files changed, 10 insertions(+), 9 deletions(-)

M zephyr.nix
M zephyr.nix => zephyr.nix +10 -9
@@ 6,17 6,18 @@ pkgs.stdenv.mkDerivation rec {
  version = "0.5.0";

  src =
    if pkgs.stdenv.isDarwin then
      pkgs.fetchurl
        {
          url = "https://github.com/MaybeJustJames/zephyr/releases/download/v${version}/macOS.tar.gz";
          sha256 = "1qpd0mwnvkxygby467cr0zwcrpwnv9f0s99g7w8hfz0zfcg358bg";
        }
    else
      pkgs.fetchurl {
    if pkgs.stdenv.hostPlatform.system == "x86_64-linux" then
      (pkgs.fetchurl {
        url = "https://github.com/MaybeJustJames/zephyr/releases/download/v${version}/Linux.tar.gz";
        sha256 = "1c44nddlx7hx097klfslhap717fkah20vgf1phsp0gj8imjyvr0h";
      };
      })
    else if pkgs.stdenv.hostPlatform.system == "x86_64-darwin" then
      (pkgs.fetchurl {
        url = "https://github.com/MaybeJustJames/zephyr/releases/download/v${version}/macOS.tar.gz";
        sha256 = "1qpd0mwnvkxygby467cr0zwcrpwnv9f0s99g7w8hfz0zfcg358bg";
      })
    else
      throw "Architecture not supported";

  nativeBuildInputs = [ ]
    ++ pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.fixDarwinDylibNames;