From f90163ad343a38cd4e858d0109489d97537a054a Mon Sep 17 00:00:00 2001 From: RGBCube Date: Sun, 9 Feb 2025 15:15:22 +0300 Subject: [PATCH] Fix rust project building --- modules/common/helix/default.nix | 32 +++++++++-------------- modules/common/nushell/default.nix | 42 ++++++++++++++++++++---------- 2 files changed, 41 insertions(+), 33 deletions(-) diff --git a/modules/common/helix/default.nix b/modules/common/helix/default.nix index d1edc0f..f74d59d 100644 --- a/modules/common/helix/default.nix +++ b/modules/common/helix/default.nix @@ -6,26 +6,20 @@ in { shellAliases.x = "hx"; }; - # nixpkgs.overlays = [(self: super: { - # helix = super.helix.overrideAttrs (old: { - # version = "25.01.1"; - - # src = self.fetchzip { - # url = "https://github.com/cull-os/helix/releases/download/ci-release-25.01.1/helix-ci-release-25.01.1-source.tar.xz"; - # hash = "sha256-bvlzXRAdPvz8P49KENSw9gupQNaUm/+3eZZ1q7+fTsw="; - # stripRoot = false; - # }; - - # # TODO: Delete this as this was fixed on latest unstable. - # preVersionCheck = ""; - - # cargoDeps = super.helix.cargoDeps.overrideAttrs (_: { - # inherit (self.helix) src; - # outputHash = "sha256-O5ECrKyF9x5r7w9wMIqbYYuGFIeUaRgtzDfYK9dFjp4="; - # }); - # }); - # })]; + nixpkgs.overlays = [(self: super: { + helix = super.helix.overrideAttrs (old: { + src = self.fetchzip { + url = "https://github.com/cull-os/helix/releases/download/ci-release-25.01.1/helix-ci-release-25.01.1-source.tar.xz"; + hash = "sha256-bvlzXRAdPvz8P49KENSw9gupQNaUm/+3eZZ1q7+fTsw="; + stripRoot = false; + }; + cargoDeps = self.rustPlatform.fetchCargoVendor { + inherit (self.helix) src; + hash = "sha256-soOnSRvWO7OzxYENFUBGmgSAk1Oy9Av+wDDLKkcuIbs="; + }; + }); + })]; home-manager.sharedModules = [{ programs.nushell.configFile.text = mkIf (config.isDesktop && config.isLinux) <| mkAfter '' diff --git a/modules/common/nushell/default.nix b/modules/common/nushell/default.nix index af8bb5b..e973c37 100644 --- a/modules/common/nushell/default.nix +++ b/modules/common/nushell/default.nix @@ -26,21 +26,35 @@ in { environment.variables.STARSHIP_LOG = "error"; - # nixpkgs.overlays = [(self: super: { - # starship = super.starship.overrideAttrs (old: { - # src = self.fetchFromGitHub { - # owner = "poliorcetics"; - # repo = "starship"; - # rev = "19926e1e0aa25eddf63f93ba270d60eef023338f"; - # hash = "sha256-mi2O8JzXNLIF0/GuXVyf27JVV7d6zoskIjB29r5fPso="; - # }; + nixpkgs.overlays = [(self: super: { + zoxide = super.zoxide.overrideAttrs (old: { + src = self.fetchFromGitHub { + owner = "Bahex"; + repo = "zoxide"; + rev = "0450775af9b1430460967ba8fb5aa434f95c4bc4"; + hash = "sha256-WhACxJMuhI9HGohcwg+ztZpQCVUZ4uibIQqGfJEEp/Y="; + }; - # cargoDeps = super.starship.cargoDeps.overrideAttrs (_: { - # inherit (self.starship) src; - # outputHash = "sha256-3NJV+hsgX3H8pycso0gCdzxJg8SgVwGMbIoHDDRZBvY="; - # }); - # }); - # })]; + cargoDeps = self.rustPlatform.fetchCargoVendor { + inherit (self.zoxide) src; + hash = "sha256-v3tcQaEXfGyt1j2fShvxxrA9Xc90AWxEzEUT09cQ+is="; + }; + }); + + starship = super.starship.overrideAttrs (old: { + src = self.fetchFromGitHub { + owner = "poliorcetics"; + repo = "starship"; + rev = "19926e1e0aa25eddf63f93ba270d60eef023338f"; + hash = "sha256-mi2O8JzXNLIF0/GuXVyf27JVV7d6zoskIjB29r5fPso="; + }; + + cargoDeps = self.rustPlatform.fetchCargoVendor { + inherit (self.starship) src; + hash = "sha256-EvslXwa4xGrrWLTqJlj/+iviBibPY0lRKcErNpb1FFo="; + }; + }); + })]; home-manager.sharedModules = [(homeArgs: let homeConfig = homeArgs.config;