diff --git a/Cargo.lock b/Cargo.lock index e66cb8e..166cb74 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -978,19 +978,6 @@ dependencies = [ "winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rust-ticker" -version = "0.1.0" -dependencies = [ - "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "diesel 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "reqwest 0.9.21 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_yaml 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "rustc-demangle" version = "0.1.16" @@ -1175,6 +1162,19 @@ dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "ticker-update" +version = "0.1.0" +dependencies = [ + "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "crossbeam 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "diesel 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "num_cpus 1.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "reqwest 0.9.21 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.101 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_yaml 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "time" version = "0.1.42" diff --git a/default.nix b/default.nix index 04ffc4d..91b0dc3 100644 --- a/default.nix +++ b/default.nix @@ -2,12 +2,18 @@ with pkgs; -rustPlatform.buildRustPackage { - name = "ticker"; - src = ./.; - buildInputs = [ - pkg-config openssl postgresql.lib - cargo rustc - ]; - cargoSha256 = "0igr8k46yl5a89zjymp6914faawcvqza08h6l9pcplpikhbvls42"; +let + ticker-update = rustPlatform.buildRustPackage { + name = "ticker-update"; + src = ./.; + buildInputs = [ + pkg-config openssl postgresql.lib + cargo rustc + ]; + preBuild = "pushd ticker-update"; + postBuild = "popd"; + cargoSha256 = "0igr8k46yl5a89zjymp6914faawcvqza08h6l9pcplpikhbvls42"; + }; +in { + inherit ticker-update; } diff --git a/Cargo.toml b/ticker-update/Cargo.toml similarity index 72% rename from Cargo.toml rename to ticker-update/Cargo.toml index eab1b65..4301d7d 100644 --- a/Cargo.toml +++ b/ticker-update/Cargo.toml @@ -1,11 +1,9 @@ [package] -name = "rust-ticker" +name = "ticker-update" version = "0.1.0" authors = ["Astro "] edition = "2018" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - [dependencies] reqwest = "~0.9" diesel = { version = "~1", features = ["postgres", "chrono"] } diff --git a/src/config.rs b/ticker-update/src/config.rs similarity index 100% rename from src/config.rs rename to ticker-update/src/config.rs diff --git a/src/ics/mod.rs b/ticker-update/src/ics/mod.rs similarity index 100% rename from src/ics/mod.rs rename to ticker-update/src/ics/mod.rs diff --git a/src/ics/parser.rs b/ticker-update/src/ics/parser.rs similarity index 100% rename from src/ics/parser.rs rename to ticker-update/src/ics/parser.rs diff --git a/src/ics/tokenizer.rs b/ticker-update/src/ics/tokenizer.rs similarity index 100% rename from src/ics/tokenizer.rs rename to ticker-update/src/ics/tokenizer.rs diff --git a/src/main.rs b/ticker-update/src/main.rs similarity index 100% rename from src/main.rs rename to ticker-update/src/main.rs diff --git a/src/model.rs b/ticker-update/src/model.rs similarity index 100% rename from src/model.rs rename to ticker-update/src/model.rs diff --git a/src/schema.rs b/ticker-update/src/schema.rs similarity index 100% rename from src/schema.rs rename to ticker-update/src/schema.rs