Skip to content

Commit 1f82d12

Browse files
committed
rename course-mate-scraper -> coursemate-scraper, and create default.nix that defines the crate
1 parent 8185c73 commit 1f82d12

File tree

6 files changed

+28
-9
lines changed

6 files changed

+28
-9
lines changed

.cspell.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
"safify",
2121
"supabase",
2222
"swiper",
23-
"lefthook"
23+
"lefthook",
24+
"stdenv",
25+
"rustc"
2426
],
2527
"dictionaries": [
2628
"softwareTerms",

flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
};
5151
};
5252
in {
53+
packages.scraper = pkgs.callPackage ./scraper {toolchain = rust-bin;};
5354
devShells.default = pkgs.mkShell common;
5455
devShells.scraper = pkgs.mkShell {
5556
inherit (common) env;

nix/rust-toolchain.nix

Lines changed: 0 additions & 5 deletions
This file was deleted.

scraper/Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scraper/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "course-mate-scraper"
2+
name = "coursemate-scraper"
33
version = "0.1.0"
44
edition = "2021"
55

scraper/default.nix

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
lib,
3+
stdenv,
4+
openssl,
5+
pkg-config,
6+
makeRustPlatform,
7+
toolchain,
8+
}: let
9+
rustPlatform = makeRustPlatform {
10+
cargo = toolchain;
11+
rustc = toolchain;
12+
};
13+
in
14+
rustPlatform.buildRustPackage {
15+
buildInputs = lib.lists.optional stdenv.isLinux openssl;
16+
nativeBuildInputs = lib.lists.optional stdenv.isLinux pkg-config;
17+
pname = "coursemate-scraper";
18+
version = "0.1.0";
19+
src = ./.;
20+
cargoLock.lockFile = ./Cargo.lock;
21+
}

0 commit comments

Comments
 (0)