Skip to content

Commit d29862e

Browse files
committed
chore: revive project and update to latest
1 parent 0590276 commit d29862e

10 files changed

Lines changed: 160 additions & 213 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ concurrency:
1818
group: "pages"
1919
cancel-in-progress: false
2020

21-
2221
jobs:
2322
build:
2423
environment:

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: macos-latest
1515

1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v6
1818

1919
- name: Install Nix
2020
uses: DeterminateSystems/nix-installer-action@main

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ pnpm-lock.yaml
1313

1414
# Nix
1515
/result
16+
17+
# Direnv
18+
.direnv

default.nix

Lines changed: 60 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,71 @@
11
{
2-
pkgs ? import <nixpkgs> {},
2+
pkgs ? import <nixpkgs> { },
33
fenix,
4-
}: let
4+
}:
5+
let
56
lib = pkgs.lib;
67
getLibFolder = pkg: "${pkg}/lib";
78

89
toolchain = fenix.packages.${pkgs.system}.fromToolchainFile {
910
file = ./rust-toolchain.toml;
10-
sha256 = "sha256-s1RPtyvDGJaX/BisLT+ifVfuhDT1nZkZ1NcK8sbwELM=";
11+
sha256 = "sha256-zC8E38iDVJ1oPIzCqTk/Ujo9+9kx9dXq7wAwPMpkpg0=";
1112
};
1213

1314
manifest = (pkgs.lib.importTOML ./Cargo.toml).package;
1415
in
15-
pkgs.rustPlatform.buildRustPackage {
16-
pname = "rust-website";
17-
version = manifest.version;
18-
cargoLock.lockFile = ./Cargo.lock;
19-
src = pkgs.lib.cleanSource ./.;
20-
21-
nativeBuildInputs = with pkgs; [
22-
# LLVM & GCC
23-
gcc
24-
cmake
25-
gnumake
26-
pkg-config
27-
llvmPackages.llvm
28-
llvmPackages.clang
29-
llvmPackages.bintools
30-
31-
# Tailwindcss
32-
tailwindcss
33-
34-
# Rust
35-
rustc
36-
cargo
37-
trunk
38-
clippy
39-
libiconv
40-
toolchain
41-
wasm-pack
42-
pkg-config
43-
rust-analyzer
44-
wasm-bindgen-cli
45-
];
46-
47-
buildInputs = with pkgs; [
48-
openssl
49-
];
50-
51-
buildPhase = ''
52-
# Build the css
53-
tailwindcss -i ./style/input.css -o ./style/output.css
54-
55-
# Wasm-bindgen nigga can't build without storing cache at HOME
56-
export HOME="$(pwd)/home"
57-
mkdir -p $HOME
58-
59-
# Test wasm
60-
wasm-bindgen -V
61-
62-
# Build wasm webiste
63-
trunk build --release --public-url=/
64-
'';
65-
66-
installPhase = ''
67-
# Create out directory
68-
mkdir -p $out/www
69-
70-
# Move all finished content
71-
mv ./dist/* $out/www
72-
'';
73-
74-
# If you wanna get thorny
75-
# RUST_BACKTRACE = 1;
76-
NIX_LDFLAGS = "-L${(getLibFolder pkgs.libiconv)}";
77-
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
78-
pkgs.gcc
79-
pkgs.libiconv
80-
pkgs.llvmPackages.llvm
81-
];
82-
CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_LINKER = "lld";
83-
84-
meta = with lib; {
85-
homepage = manifest.package.homepage;
86-
description = "Website of Rust Uzbekistan community";
87-
license = with lib.licenses; [gpl3Only];
88-
89-
platforms = with platforms; linux ++ darwin;
90-
91-
maintainers = [
92-
{
93-
name = "Sokhibjon Orzikulov";
94-
email = "sakhib@orzklv.uz";
95-
handle = "orzklv";
96-
github = "orzklv";
97-
githubId = 54666588;
98-
keys = [
99-
{
100-
fingerprint = "00D2 7BC6 8707 0683 FBB9 137C 3C35 D3AF 0DA1 D6A8";
101-
}
102-
];
103-
}
104-
];
105-
};
106-
}
16+
pkgs.rustPlatform.buildRustPackage {
17+
pname = "rust-website";
18+
version = manifest.version;
19+
cargoLock.lockFile = ./Cargo.lock;
20+
src = pkgs.lib.cleanSource ./.;
21+
22+
nativeBuildInputs = with pkgs; [
23+
# WASM Target specifics
24+
pkg-config
25+
llvmPackages.bintools
26+
wasm-pack
27+
wasm-bindgen-cli
28+
trunk
29+
30+
# Rest
31+
tailwindcss
32+
toolchain
33+
];
34+
35+
buildInputs = with pkgs; [
36+
openssl
37+
];
38+
39+
buildPhase = ''
40+
# Build the css
41+
tailwindcss -i ./style/input.css -o ./style/output.css
42+
43+
# Wasm-bindgen nigga can't build without storing cache at HOME
44+
export HOME="$(pwd)/home"
45+
mkdir -p $HOME
46+
47+
# Test wasm
48+
wasm-bindgen -V
49+
50+
# Build wasm webiste
51+
trunk build --release --public-url=/
52+
'';
53+
54+
installPhase = ''
55+
# Create out directory
56+
mkdir -p $out/www
57+
58+
# Move all finished content
59+
mv ./dist/* $out/www
60+
'';
61+
62+
CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_LINKER = "lld";
63+
64+
meta = with lib; {
65+
homepage = manifest.package.homepage;
66+
description = "Website of Rust Uzbekistan community";
67+
license = with lib.licenses; [ gpl3Only ];
68+
platforms = with platforms; linux ++ darwin;
69+
maintainers = with lib.maintainers; [orzklv];
70+
};
71+
}

flake.lock

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

flake.nix

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@
22
description = "Website for Rust Uzbekistan community";
33

44
inputs = {
5-
# Too old to work with most libraries
6-
# nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
7-
85
# Perfect!
96
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
107

11-
# The flake-utils library
12-
flake-utils.url = "github:numtide/flake-utils";
8+
# The flake-parts library
9+
flake-parts.url = "github:hercules-ci/flake-parts";
1310

1411
# Additional helper Rust toolchain management
1512
fenix = {
@@ -18,25 +15,33 @@
1815
};
1916
};
2017

21-
outputs = {
22-
nixpkgs,
23-
fenix,
24-
flake-utils,
25-
...
26-
}:
27-
flake-utils.lib.eachDefaultSystem
28-
(
29-
system: let
30-
pkgs = nixpkgs.legacyPackages.${system};
31-
in {
32-
# Nix script formatter
33-
formatter = pkgs.alejandra;
18+
outputs =
19+
{
20+
self,
21+
flake-parts,
22+
fenix,
23+
...
24+
}@inputs:
25+
flake-parts.lib.mkFlake { inherit inputs; } (
26+
{ ... }:
27+
{
28+
systems = [
29+
"x86_64-linux"
30+
"aarch64-linux"
31+
"aarch64-darwin"
32+
];
33+
perSystem =
34+
{ pkgs, ... }:
35+
{
36+
# Nix script formatter
37+
formatter = pkgs.nixfmt-tree;
3438

35-
# Development environment
36-
devShells.default = import ./shell.nix {inherit pkgs fenix;};
39+
# Development environment
40+
devShells.default = import ./shell.nix self { inherit pkgs; };
3741

38-
# Output package
39-
packages.default = pkgs.callPackage ./. {inherit pkgs fenix;};
42+
# Output package
43+
packages.default = pkgs.callPackage ./. { inherit pkgs fenix; };
44+
};
4045
}
4146
);
4247
}
-338 KB
Binary file not shown.

images/avatars/contributor.jpg

-468 Bytes
Loading

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[toolchain]
2-
channel = "stable"
2+
channel = "stable-2026-03-26"
33
components = ["rust-src", "rustfmt", "rust-analyzer", "rust-std", "clippy"]
44
targets = ["wasm32-unknown-unknown"]
55
profile = "complete"

0 commit comments

Comments
 (0)