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

charles: split into versions (major releases) #56159

Merged
merged 1 commit into from Feb 23, 2019
Merged

Conversation

eyJhb
Copy link
Member

@eyJhb eyJhb commented Feb 21, 2019

Motivation for this change

Charles proxy requires a license and each license it bound to the major release version.
Therefor it makes sense to make the previous version available to the users.

Things done

I have created the following two files

charles-4.x.nix
charles-3.x.nix

Which are the most recent of these major versions.
Then there are the 3 following packages, to be able to pin/install them

charles -> charles-4.x.nix
charles4 -> charles-4.x.nix
charles3 ->charles-3.x.nix
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Member

@kalbasit kalbasit left a comment

Choose a reason for hiding this comment

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

Although the way you split is technically correct, there's a lot of duplicated code. Please take a look at how it's done for Terraform:

pkgs/top-level/all-packages.nix Outdated Show resolved Hide resolved
@eyJhb
Copy link
Member Author

eyJhb commented Feb 22, 2019

Should be good to go now @kalbasit ! I used postgresql as the template for basing my changes upon, as it seemed like the easiest way and I had heard good about it!

https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/sql/postgresql/default.nix

Copy link
Member

@kalbasit kalbasit left a comment

Choose a reason for hiding this comment

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

IMO the Postgres example is quite complex as it provides access to create sub-packages under postgresqlPackages (or postgresql.pkgs), take a look at the sub-packages here. The terraform example is pretty straightforward, you don't even need the pluggable function.

pkgs/applications/networking/charles/default.nix Outdated Show resolved Hide resolved
@eyJhb
Copy link
Member Author

eyJhb commented Feb 23, 2019

So, should be rewritten now according to terraform ! :) (I hope at least?)

Copy link
Member

@kalbasit kalbasit left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you for your contribution!

@kalbasit kalbasit merged commit fae3c6f into NixOS:master Feb 23, 2019
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

3 participants