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-highlighter,zsh-clipboard}: Remove dependency on Nix files #212336

Merged
merged 2 commits into from
Jan 27, 2023

Conversation

infinisil
Copy link
Member

Description of changes

pkgs.documentation-highlighter and pkgs.zsh-clipboard currently depend on the Nix files that define them, meaning that they have to be rebuilt whenever those files change. This PR fixes that.

Note that the NixOS and nixpkgs manuals depend on documentation-highlighter (ping @grahamc), I verified that they still build.

This was noticed while working on #211832.

Things done

On x86_64-linux:

  • nix-build -A documentation-highlighter
  • nix-build -A zsh-clipboard
  • nix-build nixos/release.nix -A manualHTML.x86_64-linux
  • nix-build doc

Makes the build independency of the default.nix and update.sh file by
explicitly specifying the files that are needed in the result

This allows changing those files without causing a rebuild
@@ -4,13 +4,13 @@ stdenv.mkDerivation rec {
pname = "zsh-clipboard";
version = "1.0";

src = ./.;
dontUnpack = true;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we put dontBuild = true; here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's already there further down, but dontUnpack is also needed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant removing the empty line (8th line).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that could be done yeah

This way, changing the Nix file won't change the derivation
@infinisil infinisil merged commit 0346f6a into NixOS:master Jan 27, 2023
@infinisil infinisil deleted the some-nix-file-deps branch January 27, 2023 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants