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

update-python-libraries: enable top-level github attrs #100632

Merged
merged 1 commit into from Oct 15, 2020

Conversation

@jonringer
Copy link
Contributor

@jonringer jonringer commented Oct 15, 2020

Motivation for this change

allow for the python update script read the attr path when determining the homepage for a given package. This should allow for packages which live outside of python-modules to be updated as well.

The old

  $ ./update-python-libraries ../../pkgs/development/python-modules/**/default.nix

workflow should still be valid

before:

[12:11:22] jon@nixos ~/projects/nixpkgs (master)
$ nix-shell maintainers/scripts/update.nix --argstr package pdd
these derivations will be built:
  /nix/store/90rjy3d79651ib866izghivqc2aik413-update-python-libraries.drv
  /nix/store/cxs6jwz7n9jdh57pz77rxkp4sbx71f4d-packages.json.drv
building '/nix/store/90rjy3d79651ib866izghivqc2aik413-update-python-libraries.drv'...
patching script interpreter paths in /nix/store/dnwlyxz8nmqb5sxq4v4mzrfx9ypcp2d3-update-python-libraries
/nix/store/dnwlyxz8nmqb5sxq4v4mzrfx9ypcp2d3-update-python-libraries: interpreter directive changed from "/usr/bin/env python3" to "/nix/store/9kw0xpxizyrjlcrxmh2knzrq3rzv08fn-python3-3.8.6-env/bin/python3"
building '/nix/store/cxs6jwz7n9jdh57pz77rxkp4sbx71f4d-packages.json.drv'...

Going to be running update for following packages:
 - pdd-1.4

Press Enter key to continue...

Running update for:
 - pdd-1.4: UPDATING ...
 - pdd-1.4: DONE.

Packages updated!
[12:11:29] jon@nixos ~/projects/nixpkgs (master)
$ git diff pkgs/
[12:11:33] jon@nixos ~/projects/nixpkgs (master)

after:

[12:10:45] jon@nixos ~/projects/nixpkgs (python-app-update-script)
$ nix-shell maintainers/scripts/update.nix --argstr package pdd
these derivations will be built:
  /nix/store/cj4hl0mzip0xlfp7b52gpavs611g8yfa-update-python-libraries.drv
  /nix/store/x7csanpj5byp5jvw5f88a0ir6z0vpgpk-packages.json.drv
building '/nix/store/cj4hl0mzip0xlfp7b52gpavs611g8yfa-update-python-libraries.drv'...
patching script interpreter paths in /nix/store/f9w5zlmawwcn99qmnrwhn4vk4fbpg7gi-update-python-libraries
/nix/store/f9w5zlmawwcn99qmnrwhn4vk4fbpg7gi-update-python-libraries: interpreter directive changed from "/usr/bin/env python3" to "/nix/store/9kw0xpxizyrjlcrxmh2knzrq3rzv08fn-python3-3.8.6-env/bin/python3"
building '/nix/store/x7csanpj5byp5jvw5f88a0ir6z0vpgpk-packages.json.drv'...

Going to be running update for following packages:
 - pdd-1.4

Press Enter key to continue...

Running update for:
 - pdd-1.4: UPDATING ...
 - pdd-1.4: DONE.

Packages updated!
[12:10:53] jon@nixos ~/projects/nixpkgs (python-app-update-script)
$ git diff pkgs/
diff --git a/pkgs/tools/misc/pdd/default.nix b/pkgs/tools/misc/pdd/default.nix
index f94d2cc2737..37f9e2f4ce5 100644
--- a/pkgs/tools/misc/pdd/default.nix
+++ b/pkgs/tools/misc/pdd/default.nix
@@ -2,13 +2,13 @@

 buildPythonApplication rec {
   pname = "pdd";
-  version = "1.4";
+  version = "1.5";

   src = fetchFromGitHub {
     owner = "jarun";
     repo = "pdd";
     rev = "v${version}";
-    sha256 = "1cirb8mmxxadks7az6a3a4sp8djv45cwa9dx0zrarzfmw0x7xb9g";
+    sha256 = "1ivzcbm888aibiihw03idp38qbl8mywj1lc1x0q787v0pzqfb4ss";
   };

   format = "other";
Things done
  • 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.
@jonringer jonringer requested a review from FRidh as a code owner Oct 15, 2020
@jonringer jonringer changed the title update-python-libraries: allow for top-level attrs to be updated with… update-python-libraries: enable top-level github attrs Oct 15, 2020
ryantm
ryantm approved these changes Oct 15, 2020
Copy link
Member

@ryantm ryantm left a comment

LGTM

@ryantm ryantm merged commit 9d84a1a into NixOS:master Oct 15, 2020
19 of 20 checks passed
@jonringer jonringer deleted the python-app-update-script branch Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants