Riey / kime

Korean IME
GNU General Public License v3.0
510 stars 53 forks source link

Fix mismatched cargoDeps in nix and update attribute syntax #682

Open nakoo opened 1 month ago

nakoo commented 1 month ago

Summary

This PR includes

  1. fix mismatched cargoDeps in nix
  2. update mkDerivation to use finalAttrs over rec
  3. replace discouraged with keyword
~ % nix-info -m
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.44, NixOS, 24.11 (Vicuna), 24.11.20240811.a58bc8a`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.5`
 - channels(root): `""`
 - channels(user): `""`
 - nixpkgs: `/nix/store/h60m1fwahjd2mv6gsg77ji3vb4gpj4dk-source`

~ % nix build .\#kime --no-link --print-out-paths 
/nix/store/czi7nb7327z5hwk372kn5hxd16jk432j-kime-3.1.1

Note

mkDerivation finalAttrs makes it possible to use overrideAttrs properly unlike rec. It's current recommendation model of nixpkgs and there's ongoing discussion to replace rec automatically.

https://github.com/NixOS/nixpkgs/pull/119942 https://github.com/NixOS/nixpkgs/issues/293452#issuecomment-2209394047

Checklist

nakoo commented 1 month ago

nixpkgs has been merged. https://github.com/NixOS/nixpkgs/pull/334078

honnip commented 3 weeks ago

nix build github:Riey/kime/refs/pull/682/head

성공적으로 빌드되는 것을 확인했습니다.

변경사항에 반대하는 건 아니지만, 여기서 finalAttrs를 사용하는 이유가 있나요? 그리고 기존의 rec도 필요가 없는 것처럼 보입니다.

nakoo commented 3 weeks ago

nix build github:Riey/kime/refs/pull/682/head

성공적으로 빌드되는 것을 확인했습니다.

변경사항에 반대하는 건 아니지만, 여기서 finalAttrs를 사용하는 이유가 있나요? 그리고 기존의 rec도 필요가 없는 것처럼 보입니다.

You're right. I moved src following your advice. I did this is because I wanted to use flake so don't have to wait nixpkgs merge. I also changed flake.nix to match current spec.