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
Package darling #38628
Comments
We already have this part: https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/filesystems/darling-dmg/default.nix |
Just heard of Darling. I would be delighted if it could be used for running |
It seem to be packaged by @matthewbauer, but only for macOS. If i understand the project correctly, that makes no sense. We want it on linux, to run macOS apps. Also, the package has no version. That's probably because they havn't tagged a version yet. So this is pre-alpha state software. https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/darwin/darling/default.nix @matthewbauer could you update the package to the commit the "stable" AUR package uses and add a version as described here: nixpkgs/doc/coding-conventions.xml Line 275 in 1ef7e40
https://aur.archlinux.org/packages/darling/ Then we can close this issue. |
It looks like the project has started using tagged versions: https://github.com/darlinghq/darling/releases/tag/v0.2019.8 |
Thank you for your contributions.
|
I'd still be very interested in seeing this added, especially with the hope of future cross-compilation support |
This would even make it possible to package Mac binaries for Linux! |
I'm interested in this so that I can test cross compiled binaries when running zig tests. |
I marked this as stale due to inactivity. → More info |
Not stale!! |
darling-dmg is just part of darling. To be exact, it is included as a submodule in the source tree of darling. The darling build will come with kernel modules. It would need someone with kernel-packaging experience to pack it into Nixpkgs. Build instructions in the Darling Docs: |
I marked this as stale due to inactivity. → More info |
I'd still like to see this, though largely for much the same reason Andrew mentions at this point -- I've started working with zig and being able to test cross-compiled macos binaries would be brilliant. |
I have got most of a Darling build file running, but I have found an interesting issue. Wever I build I get the following error:
From this cmake file:
As far as I can tell, the |
Well, turns out the issue is that Darling relies on git-submodules, and it looks like this must be built against the Git repo directly, not against the released tarball... |
What would therefore be a derivation? |
What do you mean @danwdart? It's just a |
I tried to re-package the prebuilt deb from darling GitHub releases. default.nix let
pkgs = import <nixpkgs> {};
in {darling-bin = pkgs.callPackage ./darling-bin.nix {};} darling-bin.nix {lib, stdenv, fetchurl, dpkg, fakeroot}:
let
version = "11.5_alpharelease1";
rpath = ":${stdenv.cc.cc.lib}/lib64";
src = fetchurl {
url = "https://github.com/darlinghq/darling/releases/download/v0.1.20220929_update_sources_11_5/darling_0.1.20220929.focal_amd64.deb";
sha256 = "1jjk2rpqzy1qh5w44vxjsacws04sdaclmk923d1n1wymkgadkcl2";
};
in
stdenv.mkDerivation {
pname = "darling-bin";
inherit version;
inherit src;
buildInputs = [ dpkg fakeroot ];
dontUnpack = true;
installPhase = ''
mkdir -p $out
fakeroot dpkg-deb -x $src $out
mv $out/usr/* $out/
rm -r $out/usr
'';
postFixup = ''
for file in $(find $out -type f \( -perm /0111 -o -name \*.so\* \) ); do
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$file" || true
patchelf --set-rpath ${rpath}:$out/lib/x86_64-linux-gnu $file || true
done
'';
} Save these 2 snippets as default.nix and darling-bin.nix, then run With 2 problems:
|
Ah, fantastic, thanks! Looking forward to having this in nixpkgs anyway, but let's see how we go there. |
It could be named |
Good suggestion. |
I got as far as finding out that darlingserver doesn't start with that script because it expects /usr/bin, so updating my shell.nix to a |
After a bit of tinkering I got Darling to build from source. I opened #227765 with more info. Please give it a try! |
It seems that they now use |
@matthewbauer What's the purpose of Update: Opened PR #228113 to do the renaming. |
Issue description
Darling is a compatibility layer for running macOS apps on Linux (think Wine for macOS). I think it would be interesting to work on with macOS support. They have reverse engineered some headers that Apple doesn't release publicly so having them in "libdarling" could be useful.
https://www.darlinghq.org/
The text was updated successfully, but these errors were encountered: