|
52 | 52 | else |
53 | 53 | null; |
54 | 54 |
|
55 | | - # Build refman using cargo-binstall |
56 | | - refman = pkgs.stdenv.mkDerivation { |
57 | | - name = "refman"; |
58 | | - version = "latest"; |
59 | | - |
60 | | - nativeBuildInputs = with pkgs; [ |
61 | | - cargo-binstall |
62 | | - pkg-config |
63 | | - openssl |
64 | | - cacert |
65 | | - ]; |
66 | | - |
67 | | - buildInputs = with pkgs; [ |
68 | | - openssl |
69 | | - ]; |
| 55 | + # Build refman from source |
| 56 | + refman = pkgs.rustPlatform.buildRustPackage rec { |
| 57 | + pname = "refman"; |
| 58 | + version = "1.3.5"; |
70 | 59 |
|
71 | | - dontUnpack = true; |
72 | | - dontBuild = true; |
| 60 | + src = pkgs.fetchFromGitHub { |
| 61 | + owner = "nrminor"; |
| 62 | + repo = "refman"; |
| 63 | + rev = "refman-${version}"; |
| 64 | + hash = "sha256-zKw6/J3x4PupBYbwqTMspXT2ii+fvjtdE/6C3hg04B4="; |
| 65 | + }; |
73 | 66 |
|
74 | | - installPhase = '' |
75 | | - export HOME=$TMPDIR |
76 | | - export CARGO_HOME=$TMPDIR/.cargo |
77 | | - export RUSTUP_HOME=$TMPDIR/.rustup |
78 | | - export SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt |
| 67 | + cargoHash = "sha256-cc8TUf6MdsRgTZmh5mLxNzQopuSVXYdkdiFaoix38mA="; |
79 | 68 |
|
80 | | - # Create output directory |
81 | | - mkdir -p $out/bin |
| 69 | + nativeBuildInputs = with pkgs; [ pkg-config ]; |
| 70 | + buildInputs = with pkgs; [ openssl ]; |
82 | 71 |
|
83 | | - # Install refman using cargo-binstall |
84 | | - ${pkgs.cargo-binstall}/bin/cargo-binstall \ |
85 | | - --no-confirm \ |
86 | | - --no-symlinks \ |
87 | | - --root $TMPDIR \ |
88 | | - refman |
| 72 | + # Use system OpenSSL instead of vendoring |
| 73 | + OPENSSL_NO_VENDOR = 1; |
89 | 74 |
|
90 | | - # Move the binary to the output |
91 | | - mv $TMPDIR/bin/refman $out/bin/refman |
92 | | - chmod +x $out/bin/refman |
93 | | - ''; |
| 75 | + # Skip doctests (they have incomplete examples in refman) |
| 76 | + doCheck = false; |
94 | 77 | }; |
95 | 78 |
|
96 | 79 | in |
|
112 | 95 | pkgs.pixi |
113 | 96 | pkgs.just |
114 | 97 | pkgs.just-lsp |
115 | | - pkgs.pre-commit |
| 98 | + pkgs.prek |
116 | 99 | rustToolchain |
117 | 100 | pkgs.cargo-binstall |
118 | 101 | refman |
|
136 | 119 | if [ -f .pre-commit-config.yaml ]; then |
137 | 120 | if [ ! -f .git/hooks/pre-commit ] || [ ! -f .pre-commit-installed.stamp ]; then |
138 | 121 | echo "📝 Installing pre-commit hooks..." |
139 | | - pre-commit install |
| 122 | + prek install |
140 | 123 | touch .pre-commit-installed.stamp |
141 | 124 | echo "✅ Pre-commit hooks installed successfully" |
142 | 125 | fi |
|
0 commit comments