-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
perfect_dark: init at 0-unstable-2025-01-05 #306767
base: master
Are you sure you want to change the base?
Conversation
In 35c30e19cd7a46597f336a08b1d9509a0fb4ba53 you add yourself as a maintainer, but this should be in a separate commit with the message: Also change the pull-request title to |
@yunfachi It's done! Sorry, I missed that the commit needed to be split.. that makes sense actually :) |
Upstream just accepted a PR I sent them, so I updated this PR too to remove the patch I had to carry. |
@qubitnano I'll create a new commit to make more changes. What do you think about the name Perfect Dark is trademarked by Microsoft. |
bdef7c2
to
4b6bed3
Compare
I now pushed a new squashed commit taking into account all the suggestions. Everyone is happy with the name |
I would prefer |
I read that part but it doesn't clear the ambiguity of this situation. And doesn't talk about potential trademark issues. That kind of projects already make many people anxious with respect to legality. For instance, the decomp of Ocarina of Time explicitly avoids any references to "Zelda" or "Ocarina of Time". I really don't like |
Also, the project says its license is MIT but I'm not even sure it's legal. It's obviously a derivative work of an unfree piece of software, so I don't really believe it can be MIT. I think it's important for us because if we mark it as free, its source and binary will be stored and distributed on This might become a source of pain if Microsoft decides to sue the project in the future, similarly to EDIT: For reference, sm64 and shipwright upstream projects don't have a license (and I think it makes sense) and are therefore considered |
The thing for me is that it kinda overly obscures what it's for, and usually shorter names are reserved for more 'fundamental' tools like Thankfully, the worst you can do is to have one or maybe several repos in nix-community that contain these packages, away from Big N's eyes... 👀 |
I am decidedly NOT a lawyer, but judging by the fact the repo contains reverse-engineered code that still compiles to the original binary, I think it would be easier to make the case that the repo contains the original developer's code and cannot be re-licensed under the MIT license by the reverse engineer. However, this is an upstream issue and for now we should follow what's written on the tin. Maybe add a generic unfree license in the mix of licenses so that it's marked as unfree software with (possibly) FOSS parts? |
Oh, it's really not about hiding it, or that there exists mentions of it in the project. We can mention trademark and registered name as much as we want. But naming a piece of software with a registered name, that's exactly what registering a name is supposed to protect from. For instance, the shipwright project is careful about not naming their project with a trademarked name but "Zelda" and "Ocarina of Time" are present hundreds of times in the source code and assets. Also, everyone knows what they are about, including Nintendo, so they're not hiding from anything. The issue I see here, is officially presenting this piece of software with a trademarked name that we don't own or have a license for. I think the shipwright project have the exact same understanding of the situation as me on this. They and I can be wrong as IANAL. |
It's minor, but in the commit |
@PaulGrandperrin I've added Darwin support to I think it would be good to hear thoughts from the other people you pinged re the process here - if this sort of package is not allowed anymore, then we should remove all the others. My two cents: This looks fine to me - it's marked |
@yunfachi Sorry for the ping then, I thought you added yourself as a reviewer 7 months ago and that it was the first time I asked you to review since. |
Figuring out a global policy once and for all would be nice indeed, whatever the outcome ! |
That's not exactly what I meant, but all is good. |
FWIW, Atemu, Emily, myself and a few others had a discussion in the Nixpkgs contributions chat a couple of days ago about this.
https://matrix.to/#/!kjdutkOsheZdjqYmqp:nixos.org/$jf0jebi8EnMowgSXY4xnZGM98B07n--yYUGIOioS34Y
I maintain my approval, as this does not redistribute the ROMs, and similar games are already packaged on Nixpkgs. I do not believe such a package will bring harm to the repository, as Nintendo has no legal precedent of abusing the DMCA to take down a package repository that distributes nothing but links to upstream sources and generic patches. In reply to the proposal of deleting this and the rest of the decompiled abandonware, I said the following:
At this point we might as well nuke every other emulation software in Nixpkgs, as well as QEMU (because it enables people to break Apple's Mac EULA), Tor (because naturally everyone using the spooky dark web is a criminal) and probably every package that might happen to have a legal history. We aren't enabling anyone; Nixpkgs is not the one single source of software - it's not even a source of software, but a source of build scripts. If anything, distributing proprietary code in Hydra would be an issue, but it is not in this situation.
Distributing:
- A list of dependencies
- An abstracted link to questionable code
- A high-level description of the questionable code
- Generic patching needed for any other Nix package
is probably not a crime.
The port still requires one to own a valid cartridge. We shouldn't assume that the cartridge won't be obtained legally.
Not that any of this matters, of course; we aren't redistributing anything, so I fail to see what kind of legal standing any game company would have against us here.
|
Those need to receive the same scrutiny, especially the latter category.
There is no global policy on most things. This is my own opinion on the matter, not anybody else's.
The specific game does not matter. I came across this one before I did the others.
That'd require an RFC that someone would need to write, get a lawyer's opinion on and push to the end. I imagine we do need such a policy and will have it at some point. Until then, I'd prefer to not jeopardise the entire project in predictable manners; that's just common sense.
IANAL but, a decomp from the original machine code is very clearly a derivative work of the machine code which in turn is a derivative work of the original authors's code.
Clean-room reverse engineering is court tested AFAIK. It would be absolutely fine IMV. The WINE project actually has strict policies w.r.t. exactly this in order to minimise the risk of ever receiving legal action from daddy M$. The actual grey area of looking at a decomp yourself but only to inform yourself on internal interfaces and algorithms and then re-building the code through your own creative processes ("dirty-room" RE?) would be fine IMPV, though still hairy. Unless you can get the person who did it testify which case it is beyond a reasonable doubt, I'm going to assume a "decomp" is a derivative work.
No, they can do either option of what I said and that would make me give my approval to this PR.
That'd be news to me as emulation in general has been proven legal in court to a point where I don't see a great risk. If even Oracle lawyers can't make APIs copyrightable, we don't need to worry.
I'm only concerned about two legal standards here: The U.S.' because we're hosted on Github and the EU's because the NixOS foundation is a Dutch Stichting. All others don't have much bearing on us for now. The problem is mostly the U.S. here with its batshit crazy corpocracy laws. (If we moved off of Github onto something with EU domicile, this wouldn't be much of an issue IMV btw. Something, something bagels and ice cream.)
That's the reason I'm so apprehensive here.
I think you're massively misrepresenting the emulation community here. Many projects have taken great efforts in order to stay in the clear legally. Not all of them and I will advocate for their removal if they too give me a whiff of blatant copyright infringement.
Um, yes.
I'm not intimately familiar with each of them but I recognise a few names that have stood the test of time and what I like to call the "Android-test" (aka. has the android port not stirred legal action from Ninty yet).
As mentioned, clean-room and (depending on the circumstances) perhaps "dirty-room" RE games are fine IMV. We will definitely have to check whether it's actually the case with the ones we currently have and yeet the risky ones.
Contrary to popular belief, Ryujinx was not DMCA'd. Its takedown was a private "settlement" between Ninty and gdkchan; we don't know the details. It could have been shut-up money or even the mafia for all we know.
Yuzu was hosted on NixOS infra and Ryujinx continues to be.
Same difference.
You, me; anyone involved in the project. Just because they may not have been aware of the risks doesn't mean they want the project to be DMCA'd.
Read the cover of the cartridge you're holding more closely and you'll discover that it's "distributed exclusively" by Ninty. While they do not own all of the IP, they still own some rights to it. (They technically also own much of the N64 "standard" in the form of patents but those must have all expired by now.)
That's dangerous thinking. Nix isn't even on the radar of most nerds, let alone the general public. We have no way of knowing what Ninty would have done if they were aware of us.
Illegal to distribute and we don't. You can make such modifications to your Linux kernel and use it yourself but you aren't allowed to distribute it to others in any form. (AFAIK, IANAL.)
Illegal to operate depending on where you are. Not an issue of copyright though, so not exactly relevant to this case. I'm not familiar with the laws surrounding this but I don't think breaking them has nearly the same severity as copyright infringement.
Only an issue for the distributor of the binaries which is the NixOS Foundation. The Netherlands doesn't care about software patents to my knowledge. (At least not to a degree that would affect distribution of codecs; see also France's VideoLAN who also don't give a hoot about MPEG's patent trolls when hosting VLC on their website)
That's not what I'm primarily concerned with. I'm concerned with the license of the upstream project you're packaging because if it's a derivative work of the perfect dark ROM, that means they aren't allowed to distribute it and we shouldn't help people in infringing on copyright this blatantly. The assets are another issue actually. If you could reasonably make the case that the vast majority of users aren't going to dump their cartridges but rather acquire the ROMs illegally, you could make the argument that the purpose of the program is to pirate. That's the case Ninty made in the Yuzu SLAPP. It was settled out of court, so we don't know whether that argument stands but I could see it given the crazy U.S. copyright laws. As someone who's looked into dumping N64 cartridges before, I don't think many people are doing that, soooo :/ OTOH we package Mupen which has the same issue but has stood the time- and Android tests, so I'd be willing to take that particular risk. |
@Atemu I won't reply to your answers point by point because it feels too argumentative, and I don't want my answer to give this feeling. I think the main points are:
I think everyone can agree with those points. The divergence is about how likely all those points are to happen, and if that's enough to warrant preemptive self-censuring. I read the good points from your answer and from matrix and have many counterarguments, but it's not important. Considering the massive number of Nixpkgs expressions that could be considered as helping the user build/do illegal things (at least in the US and Netherlands/EU), I see two solutions to purge them from Nixpkgs:
I would be happy if we could materialize the second solution to keep a standard of high quality and discoverability. The downside is that this would make a more obvious target to strike, but fortunately, it wouldn't affect Nixpkgs. |
The NUR fits the bill pretty well though discoverability and standards are considerably poorer, but it's still an option |
I don't know NUR that well but it feels to me more like the first solution, with a single point where all the independent packages are linked to. I think the quality we get by having a monorepo maintained by a dedicated team is much higher. |
The NUR is not a great solution IMHO. It's also going away pretty soon last I've heard because nobody is maintaining it. You can absolutely make a flake or whatever for this. Perhaps even upstream. I don't think we need to get Nixpkgs maintainers involved in that in any way; you can just do that on your own without our input. We're just here to gatekeep Nixpkgs ;) Since you didn't intend for this to be built on NixOS infra anyways, you wouldn't lose anything by doing that either. Other than discoverability of course. |
If all the decompiled games and the game console emulators are indeed going to be purged from Nixpkgs, I think many people would be happy to find them again in one semi-official place, instead of searching for many independent half-maintained flakes. If this happens, I'll be happy to help with creating and hosting this |
Hi, original author of the shipwright package (which maybe kicked all this off? maybe not?) We did not get any special information or permission. Nobody blocked my PR when I made the original and nobody raised any flags in unofficial nix channels so I was under the impression it was okay. You should probably remove my package if it violates the rules of the repository. Thanks. |
Note that, as mentioned, we don't need to purge all of them, only the ones where a blatant copyright violation is likely. Most emulators I know do not fall into that category such as Dolphin or Mupen.
I was thinking something on the line of |
For the record, I just want to reiterate that sharing MIT-licensed build scripts (moreover without any links to the ROM) is certainly not "blatant copyright violation". And there is currently 0 historical events suggesting they might be. Certainly gray area, but it's only speculation to affirm something stronger.
I'm sorry to get a little argumentative here, but I really don't get this argument when in fact history says it's by far the emulators that got attacked over the years. I mean yuzu and ryujinx (which is still in Nixpkgs, built and distributed as a binary) but also dolphin, and basically all the other nintendo emulators. Sony also attacked PS1, PS2 and PS3 emulators, also distributed by Nixpkgs. Speaking of the decompiled games, Nintendo DCMA'd many website distributing ready-to-play binaries of SM64 that were bundling the ROM, but AFAIK they didn't attack the original project. SM64's decompilation is still on GitHub, in contrast to yuzu and ryujinx.
I know it's a joke, but as far as I know, only Nixpkgs actually distributes things that are known to be illegal (allowing use of illegal radio freqs which is a serious crime is almost all countries on earth, and violating patent law in the USA, which hosts GitHub...) The goal of The main idea would be to remove the burden of legal uncertainty surrounding those project from the official Nixpkgs. EDIT: a more appropriate name would be EDIT2: As I saw in the matrix conversation, even the use of |
With the "blatant copyright violation" I meant the software itself, not our build scripts. We generally don't package things that clearly infringe on copyright. I think most of us agree on that. This PR and what we've been discussing so far goes a bit more into the grey area; requiring more nuance.
Attacked yes but rarely with much success AFAIR. Yuzu would be the "greatest success" in this regard that I can think of in recent history but their circumstances were quite a bit different to most other emulators. They did some bad moves that got them caught in the DMCA such as marketing TOTK support before it was possible to acquire legally. (That's explicitly prohibited by the DMCA.)
IANAL but I don't see this as a great threat given that we don't distribute patented software in the U.S. I don't see an argument against build package scripts for doing something that is perfectly legal where you are domiciled and where most of your users are. With patents we also don't have to worry about the DMCA. I personally have never heard of a GH repo being taken down for patent infringement.
IANAL but this isn't as clear as you make it to be. "Infringing" on copyright for the sole purpose for making something compatible with other software is a very different thing to producing a derivative work via decomp. Copyright isn't such a black and white thing. To give you an idea on how significant such distinctions can be, the DMCA has an explicit exemption to breaking DRM for the purpose of making other software compatible with it:
(Emphasis mine.) |
I am not a lawyer, but since the only thing that patchelf modifies is the path to the linker and RPATH (i.e. it doesn't touch any copyrighted portions of the binary), it seems unlikely to ever be considered modification of a copyrighted work in the first place. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, I fear this has gone stale, and eventually someone will need to put their foot down. I maintain my approval here, as I remain unconvinced that this is a threat to Nixpkgs, regardless if courts determine upstream to be illegal or not. I see no reason for this to not be included, especially when there are so many examples of packages that actually redistribute proprietary software - link and all - in Nixpkgs. If Atemu or another committer explicitly says no, then this will need to closed and turned into a flake elsewhere. If that turns out to be the case, then I'd be happy to maintain it alongside you, @PaulGrandperrin.
But ideally this turns out to be unnecessary, and this can be included in the tree while a more permanent legal solution is developed elsewhere (RFC time, anyone?), and that solution may choose to keep the questionable packages, move them to another NixOS-managed repo, or delete them from Nixpkgs.
For now, it seems inconsiderate to not reach a conclusion on this seven-month-old PR.
A PC port of Perfect Dark based on the decompilation of the Nintendo 64 game
I just updated the expression with the latest upstream version. For now I'm pushing here so that people interested can easily find the code. FYI, I'll wait a few more months and see if the other decompilation projects have been removed from nixpkgs. If not, I'll ask the maintainers to reevaluate this package's inclusion. |
Description of changes
A PC port of Perfect Dark based on the decompilation of the Nintendo 64 game
https://github.com/fgsfdsfgs/perfect_dark
To play the game, you need to put the corresponding ROM at
$XDG_DATA_HOME/perfectdark/data/pd.ntsc-final.z64
and thennix run github:NixOS/nixpkgs/pull/306767/head#pd
.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.