Skip to content

Commit

Permalink
chore(ghcup): no longer need to vendor our own version of installer
Browse files Browse the repository at this point in the history
  • Loading branch information
PhotonQuantum committed Jul 9, 2024
1 parent 47270ef commit eb585bc
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 77 deletions.
7 changes: 0 additions & 7 deletions src/ghcup/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@
use structopt::StructOpt;

use crate::ghcup::packages::GhcupPackages;
use crate::ghcup::script::GhcupScript;
use crate::ghcup::yaml::GhcupYaml;
use crate::utils::CommaSplitVecString;

mod packages;
mod parser;
mod script;
mod utils;
mod yaml;

Expand Down Expand Up @@ -64,11 +62,6 @@ pub struct GhcupRepoConfig {
}

impl Ghcup {
pub fn get_script(&self) -> GhcupScript {
GhcupScript {
script_url: self.script_url.clone(),
}
}
pub fn get_yaml(&self, legacy: bool) -> GhcupYaml {
GhcupYaml::new(self.ghcup_repo_config.clone(), legacy)
}
Expand Down
47 changes: 0 additions & 47 deletions src/ghcup/script.rs

This file was deleted.

23 changes: 0 additions & 23 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@ macro_rules! transfer {
};
}

lazy_static! {
static ref HASKELL_PATTERN: regex::Regex =
regex::Regex::new("https://downloads.haskell.org").unwrap();
}
const HLS_URL: &str = "https://github.com/haskell/haskell-language-server";
const STACK_URL: &str = "https://github.com/commercialhaskell/stack";
const HASKELL_URL: &str = "https://downloads.haskell.org";
Expand Down Expand Up @@ -224,24 +220,6 @@ fn main() {
Source::Ghcup(source) => {
let target_mirror = source.target_mirror.clone();

let script_src = rewrite_pipe::RewritePipe::new(
stream_pipe::ByteStreamPipe::new(
source.get_script(),
buffer_path.clone().expect("buffer path is not present"),
false,
),
buffer_path.clone().unwrap(),
utils::fn_regex_rewrite(
&HASKELL_PATTERN,
Path::new(&target_mirror)
.join("packages")
.to_str()
.unwrap()
.to_string(),
),
999999,
);

let yaml_rewrite_fn = move |src: String| -> Result<String> {
Ok(src
.replace(
Expand Down Expand Up @@ -302,7 +280,6 @@ fn main() {
stack: stack_src,
yaml: yaml_legacy_src,
yaml_v2: yaml_src,
script: script_src,
};

let indexed = index_pipe::IndexPipe::new(
Expand Down

0 comments on commit eb585bc

Please sign in to comment.