NixOS:master
← MatthewCroughan:mc/mediaeditor
opened 02:52PM - 28 Aug 23 UTC
## Description of changes
An attempt to package https://github.com/opencodewi… n/MediaEditor/ for Nix, currently stuck on the installPhase, as it seems not to respect any CMake vars, most are hardcoded and set in the CMakeLists.txt
<!--
For package updates please link to a changelog or describe changes, this helps your fellow maintainers discover breaking updates.
For new packages please briefly describe the package or provide a link to its homepage.
-->
## Things done
- Built on platform(s)
- [x] x86_64-linux
- [ ] aarch64-linux
- [ ] x86_64-darwin
- [ ] aarch64-darwin
- [ ] For non-Linux: Is `sandbox = true` set in `nix.conf`? (See [Nix manual](https://nixos.org/manual/nix/stable/command-ref/conf-file.html))
- [ ] Tested, as applicable:
- [NixOS test(s)](https://nixos.org/manual/nixos/unstable/index.html#sec-nixos-tests) (look inside [nixos/tests](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests))
- and/or [package tests](https://nixos.org/manual/nixpkgs/unstable/#sec-package-tests)
- or, for functions and "core" functionality, tests in [lib/tests](https://github.com/NixOS/nixpkgs/blob/master/lib/tests) or [pkgs/test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/test)
- made sure NixOS tests are [linked](https://nixos.org/manual/nixpkgs/unstable/#ssec-nixos-tests-linking) to the relevant packages
- [ ] 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](https://github.com/Mic92/nixpkgs-review#usage)
- [ ] Tested basic functionality of all binary files (usually in `./result/bin/`)
- [23.11 Release Notes](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2311.section.md) (or backporting [23.05 Release notes](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2305.section.md))
- [ ] (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
- [x] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).
<!--
To help with the large amounts of pull requests, we would appreciate your
reviews of other pull requests, especially simple package updates. Just leave a
comment describing what you have tested in the relevant package/service.
Reviewing helps to reduce the average time-to-merge for everyone.
Thanks a lot if you do!
List of open PRs: https://github.com/NixOS/nixpkgs/pulls
Reviewing guidelines: https://nixos.org/manual/nixpkgs/unstable/#chap-reviewing-contributions
-->
This PR compiles, but I’m not sure how to implement the installPhase. Due to the way theirCMakeLists.txt is composed, it seems to ignore most cmakeFlags
as set()
is hardcoded multiple times.
Currently, it just seems to spit .so
files and the mec
binary out in the source directory, and the mec
program contains illegal references to /build
.
media-editor> lrwxrwxrwx 1 nixbld nixbld 20 Aug 28 14:39 libBluePrintSDK.so -> libBluePrintSDK.so.1
media-editor> lrwxrwxrwx 1 nixbld nixbld 26 Aug 28 14:39 libBluePrintSDK.so.1 -> libBluePrintSDK.so.1.18.10
media-editor> -rwxr-xr-x 1 nixbld nixbld 1.3M Aug 28 14:39 libBluePrintSDK.so.1.18.10
media-editor> lrwxrwxrwx 1 nixbld nixbld 17 Aug 28 14:39 libMediaCore.so -> libMediaCore.so.1
media-editor> lrwxrwxrwx 1 nixbld nixbld 22 Aug 28 14:39 libMediaCore.so.1 -> libMediaCore.so.1.9.14
media-editor> -rwxr-xr-x 1 nixbld nixbld 2.3M Aug 28 14:39 libMediaCore.so.1.9.14
media-editor> lrwxrwxrwx 1 nixbld nixbld 16 Aug 28 14:39 libVkShader.so -> libVkShader.so.1
media-editor> lrwxrwxrwx 1 nixbld nixbld 21 Aug 28 14:39 libVkShader.so.1 -> libVkShader.so.1.10.1
media-editor> -rwxr-xr-x 1 nixbld nixbld 11M Aug 28 14:39 libVkShader.so.1.10.1
media-editor> lrwxrwxrwx 1 nixbld nixbld 13 Aug 28 14:39 libimgui.so -> libimgui.so.1
media-editor> lrwxrwxrwx 1 nixbld nixbld 19 Aug 28 14:39 libimgui.so.1 -> libimgui.so.1.89.82
media-editor> -rwxr-xr-x 1 nixbld nixbld 19M Aug 28 14:39 libimgui.so.1.89.82
media-editor> -rwxr-xr-x 1 nixbld nixbld 1.5M Aug 28 14:40 mec
media-editor> -rwxr-xr-x 1 nixbld nixbld 108K Aug 28 14:39 media_player_test
media-editor> drwxr-xr-x 3 nixbld nixbld 3 Aug 28 14:39 plugin
media-editor> drwxr-xr-x 6 nixbld nixbld 6 Aug 28 14:39 plugins
This requires so much work that it is better to rewrite the installation logic using Cmake GID:
https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html