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

[WIP] lossless-cut: Init at version 3.23.7 #91683

Closed
wants to merge 2 commits into from

Conversation

ShamrockLee
Copy link
Contributor

@ShamrockLee ShamrockLee commented Jun 27, 2020

This is a draft to package lossless-cut .
As a beginner, I may need help from others often.
Any advise, contributions or corrections are more than welcome. If you would like to be added as a maintainer, please go ahead or inform me.

Motivation for this change

LosslessCut is an intuitive GUI application that cuts videos/audios losslessly.
If applied, we will be able to natively install this app.

Things done

Create a simple default.nix that makes use of mkYarnPackage.
Create yarn.nix using yarn2nix.
Add entry lossless-cut to all-packages.nix.

Takes 50 minutes to build on my slow usb-stick-based NixOS system,
and most of the time is spent on the node dependencies.
Closure size: 1,614,691,296 bytes, where
$out/libexec/lossless-cut/node_modules occupies 686,152,094 bytes.

Problem: $out/bin is empty.
TODO: Add something to the installPhase.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@ShamrockLee ShamrockLee changed the title lossless-cut: Init at version 3.23.7 [WIP] lossless-cut: Init at version 3.23.7 Jun 27, 2020
@veprbl veprbl linked an issue Jun 27, 2020 that may be closed by this pull request

yarnNix = ./yarn.nix;
yarnLock = "${src}/yarn.lock";
packageJSON = "${src}/package.json";
Copy link
Member

Choose a reason for hiding this comment

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

I guess, this relies on Import From Derivation, which is not allowed in nixpkgs. Seems like other packages put this file into nixpkgs directly.

Also these two lines seem to be set by default:

packageJSON ? src + "/package.json",
yarnLock ? src + "/yarn.lock",

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 removed the three lines specifying yarnNix, yarnLock and packageJSON and deleted yarn.nix.

Copy link
Member

Choose a reason for hiding this comment

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

I didn't mean to say that the default settings will work for nixpkgs. You might need to copy file to nixpkgs repo at least for packageJSON to avoid IFD.

Create a simple default.nix that make use of mkYarnPackage.
Create `yarn.nix` using `yarn2nix`.
Add entry lossless-cut to `all-packages.nix`.

Takes 50 minutes to build on my slow usb-stick-based NixOS system.
Closure size: 1,614,691,296 bytes, where
$out/libexec/lossless-cut/node_modules occupies 686,152,094 bytes.

Problem: $out/bin is empty.
TODO: Add something to the `installPhase`.
Add a wrapper that use electron
to execute the app
@stale
Copy link

stale bot commented Mar 16, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 16, 2021
@ShamrockLee
Copy link
Contributor Author

Close due to difficulties faced during source-packaging Electron apps.
If you are interested in making LosslessCut available in Nixpkgs, please help review/merge th binary build PR: #108512 😀
It would still be great if we can build Electron apps from source with Nix one day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Packaging requests: lossless-cut
2 participants