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

Documentation: nixpkgs Install the specified version #337617

Closed
3 tasks
eqfae opened this issue Aug 27, 2024 · 3 comments
Closed
3 tasks

Documentation: nixpkgs Install the specified version #337617

eqfae opened this issue Aug 27, 2024 · 3 comments

Comments

@eqfae
Copy link

eqfae commented Aug 27, 2024

Problem

图片
过去我遇到了两个错误 64gram和wezterm 更新失败 当时不得不移除了他们 不知道怎么固定版本 网上的教程还是一头雾水
使用https://github.com/XNM1/linux-nixos-hyprland-config-dotfiles 为基础

In the past I've had two errors, 64gram and wezterm update failure, and had to remove them at the time. I don't know how to fix the version, and the online tutorials are still confusing.
Use https://github.com/XNM1/linux-nixos-hyprland-config-dotfiles as a base.

https://www.nixhub.io/packages/linuxKernel.packages.linux_lqx.zfs
图片
想使用2.2.5-6.9.11 这是zfs最新支持的内核 相关配置在https://github.com/XNM1/linux-nixos-hyprland-config-dotfiles/blob/main/nixos/linux-kernel.nix
Would like to use 2.2.5-6.9.11 This is the latest supported kernel for zfs The relevant configuration is at https://github.com/XNM1/linux-nixos-hyprland-config-dotfiles/blob/main/nixos/linux-kernel.nix
希望有针对linuxKernel.packages.linux_lqx指定版本 和 64gram这类普通软件包的示例
I'd like to see examples for linuxKernel.packages.linux_lqx for specific versions and 64gram for common packages.

Proposal

Checklist


Add a 👍 reaction to issues you find important.

@jian-lin
Copy link
Contributor

@eqfae those comments about downloading "gcc" are phishing, be careful


In nix, fixing version of a package can be done by either fixing the commit of Nixpkgs or fixing only the version of package. The former is easy to do but has disadvantages such as not getting security updates. The latter is done with overrideAttrs. Here is its doc in the Nixpkgs manual: https://nixos.org/manual/nixpkgs/unstable/#sec-pkg-overrideAttrs. Note that Rust packages does not support finalAttrs yet. In addition, it is a bit tricky to use overrideAttrs for a Rust package for now. There is an example in NixOS wiki: https://wiki.nixos.org/wiki/Rust#Using_overrideArgs_with_Rust_Packages. Note that the overlay used there is optional. I would say both of these documents are not very beginner-friendly😅. So yes, we need to improve the documentation.

Meanwhile, you can ask questions in discourse. There is even a dedicated space for Chinese users. You can also ask questions in Matrix rooms such as Nix / NixOS and NixOS 中文. These rooms are quite active.


FYI, there is a workaround for wezterm.

@eqfae
Copy link
Author

eqfae commented Aug 27, 2024

@eqfae those comments about downloading "gcc" are phishing, be careful

In nix, fixing version of a package can be done by either fixing the commit of Nixpkgs or fixing only the version of package. The former is easy to do but has disadvantages such as not getting security updates. The latter is done with overrideAttrs. Here is its doc in the Nixpkgs manual: https://nixos.org/manual/nixpkgs/unstable/#sec-pkg-overrideAttrs. Note that Rust packages does not support finalAttrs yet. In addition, it is a bit tricky to use overrideAttrs for a Rust package for now. There is an example in NixOS wiki: https://wiki.nixos.org/wiki/Rust#Using_overrideArgs_with_Rust_Packages. Note that the overlay used there is optional. I would say both of these documents are not very beginner-friendly😅. So yes, we need to improve the documentation.

Meanwhile, you can ask questions in discourse. There is even a dedicated space for Chinese users. You can also ask questions in Matrix rooms such as Nix / NixOS and NixOS 中文. These rooms are quite active.

FYI, there is a workaround for wezterm.

#36266 (comment)
版本提供的信息只有
The only information provided by the versionnixpkgs/0cb2fd7c59fed0cd82ef858cbcbdb552b9a33465#linuxKernel.packages.linux_lqx.zfs

  reallyOld = import (pkgs.fetchFromGitHub {
    owner = "NixOS";
    repo = "nixpkgs";
    rev = "0cb2fd7c59fed0cd82ef858cbcbdb552b9a33465";
    sha256 = "?";
  }) {};

There's a lot missing.

图片
This only teaches name change.
Change the version to find this

coqPackages.multinomials.override {
  version = "1.5.1";
}

最好基于 https://github.com/XNM1/linux-nixos-hyprland-config-dotfiles 的修改示例 以后能照着样子改
It's better to base the modification example on https://github.com/XNM1/linux-nixos-hyprland-config-dotfiles
I'll be able to change it in the future.

@NixOS NixOS deleted a comment Aug 27, 2024
@NixOS NixOS deleted a comment Aug 27, 2024
@github-staff github-staff deleted a comment from eqfae Aug 27, 2024
@SuperSandro2000
Copy link
Member

dupe of #93327

@SuperSandro2000 SuperSandro2000 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 1, 2024
@eqfae eqfae mentioned this issue Sep 6, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
@SuperSandro2000 @jian-lin @eqfae and others