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

localsend: 1.11.1 -> 1.12.0, build from source #259901

Merged
merged 1 commit into from
Nov 22, 2023

Conversation

linsui
Copy link
Contributor

@linsui linsui commented Oct 9, 2023

Description of changes

Because why not? And the closure size is smaller (1.7G -> 372.8M). The update script can't update the linux package though.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Copy link
Contributor

@adamcstephens adamcstephens left a comment

Choose a reason for hiding this comment

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

Please rename the resulting binary, result/bin/localsend_app -> result/bin/localsend

Did you attempt to build from source on Darwin as well, or not?

@linsui
Copy link
Contributor Author

linsui commented Oct 11, 2023

Did you attempt to build from source on Darwin as well, or not?

No, currently it's not supported.

# absolutely no mac support for now

@linsui linsui force-pushed the localsend branch 2 times, most recently from 7111cd8 to f205a69 Compare October 18, 2023 13:50
@linsui
Copy link
Contributor Author

linsui commented Oct 18, 2023

@sikmir Do you still maintain localsend?

Copy link
Contributor

@adamcstephens adamcstephens left a comment

Choose a reason for hiding this comment

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

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

2 packages built:
  • localsend
  • localsend.debug

Result of nixpkgs-review pr 259901 run on aarch64-linux 1

2 packages built:
  • localsend
  • localsend.debug

@sikmir
Copy link
Member

sikmir commented Oct 18, 2023

@sikmir Do you still maintain localsend?

Yes, LGTM.

@linsui
Copy link
Contributor Author

linsui commented Oct 25, 2023

@sikmir Good to merge? :)

@sikmir
Copy link
Member

sikmir commented Oct 26, 2023

1.12.0 is out meanwhile

@linsui
Copy link
Contributor Author

linsui commented Oct 27, 2023

I don't know how but the buildFlutterApplication is broken currently. See #263723.

@hacker1024
Copy link
Member

This PR should not include #263723.

pkgs/applications/networking/localsend/default.nix Outdated Show resolved Hide resolved
pkgs/build-support/flutter/default.nix Outdated Show resolved Hide resolved
# $PUB_CACHE/hosted is a symlink to a store path.
mv $PUB_CACHE/hosted $PUB_CACHE/hosted_copy
cp -HR $PUB_CACHE/hosted_copy $PUB_CACHE/hosted
substituteInPlace $PUB_CACHE/hosted/pub.dev/system_tray-*/linux/tray.cc \
Copy link
Member

Choose a reason for hiding this comment

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

Normally patching the code like this would be a good solution, but modifying the package cache is a bit hacky. Would something like patchelf --add-rpath or --add-needed not work? The other alternative is adding to LD_LIBRARY_PATH.

This will be obsoleted by #263345 anyway, so I'm not too hung up on which solution we use for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was told that such patch is preferred. :) Could you add something like cargoDepsCopy to buildFlutterApplication?

@linsui
Copy link
Contributor Author

linsui commented Oct 29, 2023

Please rename the resulting binary, result/bin/localsend_app -> result/bin/localsend

Did you attempt to build from source on Darwin as well, or not?

Localsend has a cli. It seems it's not ready yet but maybe we want the keep the localsend binary name for it.

@linsui
Copy link
Contributor Author

linsui commented Oct 30, 2023

This MR is still blocked by #263939.

@linsui linsui changed the title localsend: build from source localsend: 1.11.1 -> 1.12.0, build from source Nov 18, 2023
@linsui
Copy link
Contributor Author

linsui commented Nov 18, 2023

@ofborg build localsend

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/1244

Copy link
Contributor

@adamcstephens adamcstephens left a comment

Choose a reason for hiding this comment

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

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

1 package built:
  • localsend

Result of nixpkgs-review pr 259901 run on aarch64-linux 1

1 package built:
  • localsend

Result of nixpkgs-review pr 259901 run on aarch64-darwin 1

1 package built:
  • localsend

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

1 package built:
  • localsend

@@ -1,5 +1,5 @@
#! /usr/bin/env nix-shell
#! nix-shell -I nixpkgs=./. -i bash -p curl gnused
#! nix-shell -I nixpkgs=./. -i bash -p curl gnused jq
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you add a jq dependency here?

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's used at line 8.

@@ -16,10 +16,6 @@ fi

sed -i "s/version = \".*\"/version = \"${latestVersion}\"/" "$ROOT/default.nix"

LINUX_x64_URL="https://github.com/localsend/localsend/releases/download/v${latestVersion}/LocalSend-${latestVersion}-linux-x86-64.AppImage"
Copy link
Contributor

Choose a reason for hiding this comment

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

Would you be willing to fix updating Linux instead of just removing it?

Copy link
Contributor

Choose a reason for hiding this comment

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

If so, we should also add passthru.updateScript = ./update.sh;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know how to do that. I would like to have a try but not in this PR.

@adamcstephens adamcstephens merged commit 3106b26 into NixOS:master Nov 22, 2023
27 checks passed
@linsui linsui deleted the localsend branch November 22, 2023 15:19
@pbsds
Copy link
Contributor

pbsds commented Nov 22, 2023

#269239

@linsui
Copy link
Contributor Author

linsui commented Nov 22, 2023

Localsend has a cli. It seems it's not ready yet but maybe we want the keep the localsend binary name for it.

@pbsds
Copy link
Contributor

pbsds commented Nov 22, 2023

Well, that goes against mv $out/bin/localsend_app $out/bin/localsend which was merged in this PR. Either the desktop application is moved back to localsend_app, or mainProgram is changed to point to localsend. The current state is that nix run nixpkgs#localsend does not works since it points at a binary that does not exist.

@pbsds pbsds mentioned this pull request Nov 22, 2023
13 tasks
@linsui
Copy link
Contributor Author

linsui commented Nov 22, 2023

Oh, sorry, the line was added by mistake when I rebase the MR. I thought we should use localsend_app and leave localsend to the cli.

@linsui
Copy link
Contributor Author

linsui commented Nov 22, 2023

I opened #269253 instead.

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

6 participants