-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
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
Darwin closed-source apps: init Steam, Spotify #20670
Conversation
@matthewbauer, thanks for your PR! By analyzing the history of the files in this pull request, we identified @mpscholten to be a potential reviewer. |
name = "spotify-mac"; | ||
|
||
src = fetchurl { | ||
url = "http://download.spotify.com/Spotify.dmg"; |
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.
I assume there's no versioned url we can use, it would be nice if we could provide a source that will keep working.
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.
I haven't found a versioned release yet.
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.
Yeah, that's going to be hard for applications like that in general.
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.
I have pulled older versions from here: http://filehippo.com/mac/download_spotify_for_mac/
But I am not sure whether we want to trust a third-party site...
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.
This is what they link to on the website (but with a versioned file)
https://d1clcicqv97n4s.cloudfront.net/Spotify-1.0.42.151.g19de0aa6.dmg
libgcrypt = libgcrypt_1_5; | ||
libpng = libpng12; | ||
}; | ||
spotify_mac = callPackage ../applications/audio/spotify/darwin.nix {}; |
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.
Should we perhaps put them in a darwin.applications
attrset, might be easier if everything is in one 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.
The thing is most of these have equivalent linux derivations that you should have the same name.
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.
shouldn't it pick the correct derivation based on the platform.
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.
To clarify, I was talking about the spotify_mac
attribute here.
72dde27
to
ab028df
Compare
I'm thinking of just starting a "nixpkgs-app" repo. It will be to nixpkgs what cask is to homebrew. |
What would be the advantage of this? Keeping everything in the main |
homepage = http://store.steampowered.com/; | ||
license = licenses.unfreeRedistributable; | ||
platforms = platforms.darwin; | ||
maintainers = with maintainers; [ jagajaga ]; |
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.
Are you sure that @jagajaga has an interest in maintaining Steam for Darwin platform?
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.
woops, I'll get rid of that.
@mpscholten IMO this will lead to nixpkgs repo bloat, so separate repo will be better. Why do we need these macOS only binary things?
In my opinion the real need to add a package for Darwin is when it does invasion into the sytem or is not available in binary form for macOS |
@gnidorah I guess the best answer I have is for completeness: we already have versions of these for Linux so we might as well have macOS versions as well. That being said the lack of a permanent versioned url make things very difficult. |
@gnidorah I strongly disagree with that, for me there's no difference between an unfree derivation that targets linux or darwin. We also have other very large attribute sets that not everybody might care about (eg. the 10929 haskellPackages). However I don't like adding packages that break at any point if a new version is released. |
@matthewbauer can you create a pr for undmg |
@matthewbauer @LnL7 got your points guys. But nix expressions for such packages look similar. Perhaps adding new ones may be somehow simplified? I.e. using single file or whatever.
The difference is that on Linux you need to care about dependencies, but on Darwin they are bundled in case of .app programs, so the role of package manager is not very significant in that case |
That's actually more of a discussion of free vs unfree derivations. Most unfree linux packages are statically linked or have vendored dependencies, |
Regarding the versioning issues: We could build a script which updates the package hashes on a regulary schedule (e.g. every 30 minutes). This way, even when there is only the latest version of a package available for download, a simple In general I really like this idea of being able to install all my software with nix on macOS. |
You could also upload the packages to |
I had no idea that https://archive.org also has software, I think that's a great solution if there are no licence issues with that. Using a different source is not really a problem if we compare it with the latest official version at the point that it's merged in or if we automate the uploads with an update. |
Motivation for this change
This inits derivations for spotify and steam on Darwin. undmg needs to be updated to set the executable bits correctly.
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)