Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mismatched cargoDeps in nix and update attribute syntax #682

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

nakoo
Copy link

@nakoo nakoo commented Aug 14, 2024

Summary

This PR includes

  1. fix mismatched cargoDeps in nix
  2. update mkDerivation not to use override
  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.

NixOS/nixpkgs#119942
NixOS/nixpkgs#293452 (comment)

Checklist

  • I have documented my changes properly to adequate places
  • I have updated the docs/CHANGELOG.md

@nakoo nakoo mentioned this pull request Aug 14, 2024
13 tasks
@nakoo nakoo changed the title Fix mismatched cargoDeps in nix and update mkDerivation to use finalAttrs over rec Fix mismatched cargoDeps in nix and update attribute syntax Aug 15, 2024
@nakoo
Copy link
Author

nakoo commented Aug 19, 2024

nixpkgs has been merged.
NixOS/nixpkgs#334078

@honnip
Copy link

honnip commented Sep 9, 2024

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

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

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

@nakoo
Copy link
Author

nakoo commented Sep 9, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants