-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
signal-desktop: init darwin at 7.5.1 #286188
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
8 changes: 3 additions & 5 deletions
8
pkgs/applications/networking/instant-messengers/signal-desktop/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
{ hostPlatform, callPackage }: { | ||
signal-desktop = if hostPlatform.system == "aarch64-linux" | ||
then callPackage ./signal-desktop-aarch64.nix { } | ||
else callPackage ./signal-desktop.nix { }; | ||
signal-desktop-beta = callPackage ./signal-desktop-beta.nix{ }; | ||
{ targetPlatform, callPackage }: { | ||
signal-desktop = callPackage ./signal-desktop-${targetPlatform.system}.nix { }; | ||
signal-desktop-beta = callPackage ./signal-desktop-beta.nix { }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...plications/networking/instant-messengers/signal-desktop/signal-desktop-aarch64-darwin.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ callPackage }: | ||
callPackage ./generic.nix { } rec { | ||
pname = "signal-desktop"; | ||
dir = "Signal"; | ||
version = "7.5.1"; | ||
url = "https://updates.signal.org/desktop/signal-desktop-mac-arm64-${version}.dmg"; | ||
hash = "sha256-q3+v5u//niA+ortlGMsNuVSJaIM72PF97NgG0yaGHlI="; | ||
} |
File renamed without changes.
8 changes: 8 additions & 0 deletions
8
...pplications/networking/instant-messengers/signal-desktop/signal-desktop-x86_64-darwin.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ callPackage }: | ||
callPackage ./generic.nix { } rec { | ||
pname = "signal-desktop"; | ||
dir = "Signal"; | ||
version = "7.5.1"; | ||
url = "https://updates.signal.org/desktop/signal-desktop-mac-x64-${version}.dmg"; | ||
hash = "sha256-3GFGiMWYQSQX1EQPYPWikr+0iAo36KZUjsTGkR9MQdA="; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Mhm. This will cause eval errors in case we have a new unsupported platform.
This needs to be fixed. signal-desktop should always point to some derivation even if this derivation doesn't build on the current 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.
How do you suggest it to be fixed? Perhaps we could pick a default derivation to fall back onto if one doesn't exist for an unsupported 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.
Maybe builtins.pathExists with a fallback to x86_64-linux? But otherwise the previous if statement was also good enough, easier to read than some other complex logic.
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.
Perhaps we could do something like this?
Or we could use
builtins.pathExists
like thisI think I prefer the latter. Evaluating
meta
in the first one would work but it's harder to follow.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.
@Mic92 Wouldn't it be better to just
throw
and say your platform is not supported? Since there isn't any guarantee thex86_64-linux
will work properly on a new platform either?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.
We already have quite a few eval errors here and we should not keep adding to it: https://hydra.nixos.org/jobset/nixpkgs/trunk#tabs-errors
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.
You're right, although what now? Do we default to building
x86_64-linux
? Wouldn't it be better to mark anything that isn't inmeta.platforms
as broken so we can entirely skip making a derivation and save resources?Also, if we were to default to building for
x86_64-linux
, wouldn't it be an issue if we could build it on another platform but not run it?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.
According to @wegank,
targePlatform
is only required when building a compiler #310053 (comment), see https://nix.dev/tutorials/cross-compilation.html#platforms.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.
If
hostPlatform
were used and you were to cross compile architectures, wouldn't you end up with a binary that's incompatible?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 cross-compiled program, in that example the compiler, still runs on the host platform (and produces executables that run on the target platform).