Skip to content

nv-codec-headers: recreate under by-name#324199

Merged
Aleksanaa merged 1 commit intoNixOS:masterfrom
atorres1985-contrib:nv-codec-headers-master
Jul 6, 2024
Merged

nv-codec-headers: recreate under by-name#324199
Aleksanaa merged 1 commit intoNixOS:masterfrom
atorres1985-contrib:nv-codec-headers-master

Conversation

@AndersonTorres
Copy link
Member

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Jul 3, 2024
@AndersonTorres AndersonTorres marked this pull request as ready for review July 3, 2024 14:08
@AndersonTorres AndersonTorres mentioned this pull request Jul 3, 2024
13 tasks
@AndersonTorres
Copy link
Member Author

I will split handbrake in its own PR: #324418

@Aleksanaa
Copy link
Member

Could you split migration and format in two commits to have a good log?

@AndersonTorres
Copy link
Member Author

AndersonTorres commented Jul 4, 2024

Formatting? This is a whole new derivation written basically from scratch that does the same as the previous one.
There is no nixfmt happening here.

Any "intermediate steps" would be broken by definition.

@Aleksanaa
Copy link
Member

Then I have to say that your commit message is a bit misleading 😅

@AndersonTorres
Copy link
Member Author

I will reformulate as soon as possible.

@AndersonTorres AndersonTorres changed the title nv-codec-headers: migrate to by-name nv-codec-headers: recreate under by-name Jul 5, 2024
This commit merely deletes the old directory, creates the new files in the new
location and rewrite the overrides.

The whole change needs to be made "atomically", since it is not pratical to
create intermediate steps that compile cleanly.
@AndersonTorres AndersonTorres requested a review from Aleksanaa July 6, 2024 04:11
@AndersonTorres
Copy link
Member Author

@Aleksanaa done.

@flokli
Copy link
Member

flokli commented Jul 7, 2024

It looks like this broke eval:

error:
       … while calling the 'head' builtin

         at /nix/store/pps0ryglnbx1p277ghzv4ax1is1lsb3c-nixpkgs-src/lib/attrsets.nix:1575:11:

         1574|         || pred here (elemAt values 1) (head values) then
         1575|           head values
             |           ^
         1576|         else

       … while evaluating the attribute 'value'

         at /nix/store/pps0ryglnbx1p277ghzv4ax1is1lsb3c-nixpkgs-src/lib/modules.nix:821:9:

          820|     in warnDeprecation opt //
          821|       { value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          822|         inherit (res.defsFinal') highestPrio;

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: attribute 'nv-codec-headers-12' missing

       at /nix/store/pps0ryglnbx1p277ghzv4ax1is1lsb3c-nixpkgs-src/pkgs/by-name/nv/nv-codec-headers/package.nix:16:12:

           15|     "11" = sources.nv-codec-headers-11;
           16|     "12" = sources.nv-codec-headers-12;
             |            ^
           17|   }.${majorVersion};

flokli added a commit to flokli/nixpkgs that referenced this pull request Jul 7, 2024
This reverts commit 01f7c8a.

It broke NixOS config evaluation, as in
NixOS#324199 (comment).
@flokli
Copy link
Member

flokli commented Jul 7, 2024

Revert in #325242.

@Aleksanaa
Copy link
Member

I don't quite get it:

=> nix build .#nv-codec-headers-12
path '/home/aleksana/works/nixpkgs/pkgs/by-name/nv/nv-codec-headers' does not contain a 'flake.nix', searching up

=> tree ./result/
./result/
├── include
│   └── ffnvcodec
│       ├── dynlink_cuda.h
│       ├── dynlink_cuviddec.h
│       ├── dynlink_loader.h
│       ├── dynlink_nvcuvid.h
│       └── nvEncodeAPI.h
└── lib
    └── pkgconfig
        └── ffnvcodec.pc

5 directories, 6 files

Looks normal?

@Aleksanaa
Copy link
Member

This PR only drops nv-codec-headers-versions, but that's not used anywhere within Nixpkgs either.

@AndersonTorres
Copy link
Member Author

Oh boi, just when I was updating nvch 12...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants