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

Add Linux build for NixOS #162

Closed
Tanish2002 opened this issue Feb 23, 2024 · 5 comments
Closed

Add Linux build for NixOS #162

Tanish2002 opened this issue Feb 23, 2024 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Tanish2002
Copy link
Contributor

Currently the project on linux is only packaged for Arch Linux, RPM based distros and Debian based distros.
We should have a Linux build for NixOS

@Tanish2002 Tanish2002 added the enhancement New feature or request label Feb 23, 2024
@animator
Copy link
Member

@Tanish2002 Can you share some details on how software publishing and distributing works in nixOS ecosystem.

@Tanish2002
Copy link
Contributor Author

The process for publishing isn't hard.

The first part is creating a working package.

  1. You need to know the nix language(A functional programming language).
  2. You'll have to create a package using the nix language, and check if it builds fine on your system
  3. You can then simply create a PR to the nixpkgs repo
  4. Their bot can check if the package builds for all the platforms they support, you can omit certain platforms in the package.
  5. If they approve of the package, they'll merge it into master branch, after a few days it will be merged with the nixos-unstable branch. In the next major release of the OS it will be included.

Note: nixpkgs does provide some helper functions for creating flutter applications which should make it easy to package

I'll see if I can create a package myself.😄

@animator
Copy link
Member

Thanks for the info @Tanish2002
Also, is there any guide available which tells how to setup Flutter and install dev dependencies required for desktop app development in nixOS?

@Tanish2002
Copy link
Contributor Author

@animator There is no blog/guide available.
There's the nixpkgs manual
The section regarding flutter applications: here.

I tried to build a package for NixOS, The biggest problem is the printing package that we use for PDF preview.
It tried to download a pdfium binary from the internet.

In NixOS packages are built in a sandbox without internet, so the build fails since it can't download the package. To make it worrk we would need to provide the pdfium binary to the printing package and disable it from downloading it.

I've created an issue on printing package repo to discuss a potential workaround.

@animator animator added the good first issue Good for newcomers label Feb 25, 2024
@animator
Copy link
Member

animator commented Mar 2, 2024

Closing this issue so that we can have a single channel of discussion on the primary discussion thread #240
All the nixOS related discussion in this thread can be referred by people as it is already linked at the start of the discussion.

@animator animator closed this as completed Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants