From f0edc281b5321e0acb1bbec17deddebaa5213a7f Mon Sep 17 00:00:00 2001 From: EdenEast Date: Thu, 10 Dec 2020 00:54:51 -0500 Subject: [PATCH] fix: Overlay sccache to work with rust v1.48.0 See issue https://github.com/mozilla/sccache/issues/887 for more details --- flake.nix | 1 + nix/overlays/sccache/default.nix | 20 ++++++++++++++++++++ nix/overlays/sccache/metadata.nix | 11 +++++++++++ 3 files changed, 32 insertions(+) create mode 100644 nix/overlays/sccache/default.nix create mode 100644 nix/overlays/sccache/metadata.nix diff --git a/flake.nix b/flake.nix index da29de9f..1e414147 100644 --- a/flake.nix +++ b/flake.nix @@ -135,6 +135,7 @@ (self.overlay."${system}") (import ./nix/overlays/alacritty) (import ./nix/overlays/neovim) + (import ./nix/overlays/sccache) (import inputs.nixpkgs-mozilla) ]); }; diff --git a/nix/overlays/sccache/default.nix b/nix/overlays/sccache/default.nix new file mode 100644 index 00000000..20270be7 --- /dev/null +++ b/nix/overlays/sccache/default.nix @@ -0,0 +1,20 @@ +# Overlay current master version until new release is cut +# see: https://github.com/mozilla/sccache/issues/887 + +self: super: + +let metadata = import ./metadata.nix; +in { + sccache = super.sccache.overrideAttrs (old: rec { + version = metadata.version; + src = super.fetchFromGitHub { + owner = "mozilla"; + repo = "sccache"; + rev = metadata.rev; + sha256 = metadata.sha256; + }; + + cargoSha256 = metadata.cargoSha256; + }); +} + diff --git a/nix/overlays/sccache/metadata.nix b/nix/overlays/sccache/metadata.nix new file mode 100644 index 00000000..a073699c --- /dev/null +++ b/nix/overlays/sccache/metadata.nix @@ -0,0 +1,11 @@ +{ + upattr = "sccache"; + repo_git = "https://github.com/mozilla/sccache"; + version = "0.2.14-dev"; + branch = "master"; + rev = "5c60588e324e3d749c8991b37c76eb7ea82dfd6b"; + + sha256 = "19z9fdkn3bnr8q33m66h2by6bs6kmhw3a2lq2n8bywmnhrjwhxpw"; + cargoSha256 = "sha256-fEiq4yMRk8GNdUiJAaF/NJYRB8JFlx1AE7kQ+xrXaXo="; +} +