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

Add Darwin support for directx-shader-compiler #107188

Merged
merged 1 commit into from Dec 24, 2020

Conversation

expipiplus1
Copy link
Contributor

I can't test this so if someone would be kind enough to check it runs
I'd be grateful.

Built on #104377

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 107188 run on x86_64-darwin 1

1 package built:
  • directx-shader-compiler

@SuperSandro2000
Copy link
Member

I merged the other PR. Please rebase this one.

@expipiplus1
Copy link
Contributor Author

I merged the other PR. Please rebase this one.

Done. Why was this necessary?

@SuperSandro2000
Copy link
Member

Done. Why was this necessary?

If am not mistaken it could happen that the init commit could be doubled if the hash changed through rebasing or something. Just wanted to not risk this.

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 107188 run on x86_64-darwin 1

1 package built:
  • directx-shader-compiler

@@ -36,14 +36,14 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin $out/lib $dev/include
mv bin/dxc* $out/bin/
mv lib/libdxcompiler.so* $out/lib/
mv lib/libdxcompiler.so* lib/libdxcompiler.*dylib $out/lib/
Copy link
Member

@prusnak prusnak Dec 20, 2020

Choose a reason for hiding this comment

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

This will not work as expected if either *.so files or *.dylib files are missing

I suggest reworking this into

Suggested change
mv lib/libdxcompiler.so* lib/libdxcompiler.*dylib $out/lib/
mv lib/libdxcompiler.so* $out/lib/ || :
mv lib/libdxcompiler.*dylib $out/lib/ || :

or something similar

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems to build without issue on both linux and osx though, perhaps null_glob is enabled or something.

Copy link
Member

Choose a reason for hiding this comment

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

It seems you are right -

shopt -s nullglob

Thanks, today I learned something new :-)

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 107188 run on x86_64-linux 1

1 package built:
  • directx-shader-compiler

@expipiplus1
Copy link
Contributor Author

Is it possible to merge this, please?

@prusnak
Copy link
Member

prusnak commented Dec 24, 2020

Is it possible to merge this, please?

No unless you address my suggestion above. Don't know why it was marked it as resolved, when it was not addressed

@expipiplus1
Copy link
Contributor Author

sorry, @prusnak I was certain that I left a comment before marking as resolved. I'll re-comment now

@prusnak prusnak merged commit 539410d into NixOS:master Dec 24, 2020
@expipiplus1
Copy link
Contributor Author

expipiplus1 commented Dec 24, 2020 via email

@expipiplus1 expipiplus1 deleted the joe-dxc-darwin branch January 3, 2021 10:01
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

3 participants